Certbot — Free SSL for Nginx
Install Certbot
apt install certbot python3-certbot-nginx -yGet a Certificate
certbot --nginx -d yourdomain.com -d www.yourdomain.comCertbot will automatically update your Nginx config for HTTPS.
Auto-renewal
Certbot installs a systemd timer for auto-renewal. Check it:
systemctl status certbot.timer