Home / Guides / Website

Host a website with free HTTPS in 7 minutes

Caddy gets and renews Let's Encrypt certificates automatically โ€” no certbot timers, no config gymnastics. Prereq: a domain with an A record pointing to your VPS IP.

1. Install Caddy

ssh root@YOUR_SERVER_IP
apt update && apt install -y caddy
# for the latest version consider the official caddy.com repo

2. Upload your site

mkdir -p /var/www/mysite
# from your computer:
scp -r ./dist/* root@YOUR_SERVER_IP:/var/www/mysite/

3. Point Caddy at it

cat > /etc/caddy/Caddyfile <<'EOF'
mysite.com {
    root * /var/www/mysite
    encode gzip
    file_server
}
EOF
systemctl reload caddy

4. Done โ€” check it

Open https://mysite.com โ€” the padlock is already there. Caddy issued and will auto-renew the certificate itself. SPA routing? Add try_files {path} /index.html inside the site block.

No server yet? A Buran-1 (โ‚ฌ6.5/mo) comfortably hosts several sites.

Related