TABI CLOUD
VPS

Host a website on a VPS: nginx, Let's Encrypt SSL and your domain

7 min read · Updated October 2026 · By Tabi Cloud

Hosting a site on your own VPS gives you full control and is simpler than it sounds. This guide uses Ubuntu or Debian commands, which can vary on other distributions.

1. Point your domain at the VPS

In your domain registrar's DNS settings, add an A record.

  1. Type A, name @, value YOUR_SERVER_IP
  2. Add a second A record with name www and the same IP
  3. Wait for DNS to update, which can take minutes to a few hours

Check with dig +short yourdomain.com or nslookup yourdomain.com. If your server has an IPv6 address, an AAAA record works the same way.

2. Install nginx

  1. sudo apt update
  2. sudo apt install nginx -y
  3. sudo ufw allow 'Nginx Full' if you use UFW
  4. Open http://YOUR_SERVER_IP and look for the welcome page

3. Create your site

  1. sudo mkdir -p /var/www/yourdomain.com
  2. Put an index.html file in that folder
  3. sudo nano /etc/nginx/sites-available/yourdomain.com

Use this server block:

server {

listen 80;

server_name yourdomain.com www.yourdomain.com;

root /var/www/yourdomain.com;

index index.html;

}

Remove the braces formatting concerns by keeping it exactly as nginx expects, with a semicolon after each line and the block closed.

  1. sudo ln -s /etc/nginx/sites-available/yourdomain.com /etc/nginx/sites-enabled/
  2. sudo nginx -t
  3. sudo systemctl reload nginx

4. Add free HTTPS

Let's Encrypt issues free certificates, and certbot automates it. Your DNS must already point at the server.

  1. sudo apt install certbot python3-certbot-nginx -y
  2. sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com
  3. Choose to redirect HTTP to HTTPS when asked
  4. sudo certbot renew --dry-run to test automatic renewal

Troubleshooting

Tips

Tabi Cloud offers 24/7 uptime, and you can ask us for help over Discord ticket or email.

Want your own server? Join our Discord and tell us the game. We set it up and send you the details. Need help with an error from this guide? Open a ticket there.

GET STARTED ON DISCORD

More guides

VPSWhat is a VPS and how is it different from shared hosting?VPSHow to choose a VPS plan: vCPU, RAM and diskVPSFirst steps on a new Linux VPS: SSH, updates, user and keys