Servetor

Hosting a static site with nginx on a 1 GB VPS

September 7, 2026

A static site needs almost nothing: nginx, a certificate from Let's Encrypt and a directory of HTML. The whole config fits on one screen.

server {
    listen 443 ssl http2;
    server_name example.org;
    root /var/www/site;
    location / { try_files $uri $uri/ =404; }
}

Certbot's webroot mode renews the certificate without stopping nginx, and its systemd timer runs twice a day. I add a deploy hook that reloads nginx and forget about it.

On a 1 GB instance nginx uses a few megabytes of memory, which leaves the rest for the side projects that actually need it.