Getting a website up on Vultr

TLDR : Or any VPS really. Digital Ocean too.

Step 1 (Installing Nginx)

Follow this article on how to install nginx: https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-22-04

sudo ufw allow 'Nginx HTTP'
sudo ufw allow 'Nginx Full'

Step 2 (Installing Certbot)

Installing certbot : https://certbot.eff.org/instructions?ws=nginx&os=ubuntufocal

certbot --nginx

Step 3

Note: I’m going to assume you have a domain name. If you don’t, buy one. Cheapest is 10$ or ₹799 for a year. Can be cheaper. After you’ve bought the domain, make a free cloudflare account. Point it to the IP location of your VPS.

certbot --nginx -d YourDomainName.com -d www.YourDomainName.com
certbot --nginx -d adityagudimetla.com -d www.adityagudimetla.com
$ cd etc/nginx/sites-enabled
$ vi adityagudimetla.com
server {...
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
...
}

Step 4 (Installing node)

Installing Node : Rather than directly installing node, I’d recommend using NVM to install it. So install NVM using the following command.

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
nvm install node

Step 5

Installing PM2

npm install pm2 -g

Step 6

Use filezilla to transfer your applications to the VPS. I’m going to assume that this is a node application and there is an entry point file (index.js).

pm2 start index.js

--

--

I do stuff. Like stuff about policy. And book stuff. And gaming stuff. And stuff about life. And stuff about stuff.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aditya Sujith Gudimetla

I do stuff. Like stuff about policy. And book stuff. And gaming stuff. And stuff about life. And stuff about stuff.