Free automatic HTTPS in 2 minutes with certbot — the industry standard.
Prerequisites
- Domain pointing to your VPS (A record)
- Nginx installed and ports 80/443 open (UFW)
Install
apt install -y certbot python3-certbot-nginx
Get the certificate
certbot --nginx -d mysite.com -d www.mysite.com
Certbot edits your Nginx config, obtains the certificate and sets up the HTTP→HTTPS redirect automatically.
Auto-renewal
certbot renew --dry-run # test
systemctl status certbot.timer # auto-renewal is already active











