Nginx SSL

Install SSL certificate for Nginx with Certbot on Ubuntu

Nginx SSL

Install packages

sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com --register-unsafely-without-email

Automatically Renew Let’s Encrypt Certificates

Let’s Encrypt certificates expire after 90 days. We encourage you to renew your certificates automatically. Here we add a cron job to an existing crontab file to do this.

crontab -e
# Run renew command at 12 AM
0 12 * * * /usr/bin/certbot renew --quiet