Free SSL on your VPS with Certbot
Let's Encrypt certificates for Nginx or Apache on Linux.
On this page
On your own Linux server you can get free certificates from Let's Encrypt with Certbot. Make sure your domain already points to the server (see Pointing a domain to your server) and that ports 80 and 443 are open.
Ubuntu / Debian with Nginx
sudo apt update
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.comWith Apache
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d example.com -d www.example.comCertbot installs the certificate, sets up the HTTPS redirect, and renews automatically. Test renewal with:
sudo certbot renew --dry-run