loading...

How to add a free SSL to an NGINX server on Ubuntu

stuartcreed profile image StuartCreed ・1 min read

sudo app-get install python3-certbot-nginx

sudo certbot --nginx -d websitename.com -d www.websitename.com

When prompted select "2: redirect":

Alt Text

The website will now show as secure.

This expires every 90 days. Add this to a crontab so that it runs everyday to avoid this expiring:

crontab -e

Paste in the following

0 12 * * * /usr/bin/certbot renew --quiet

Discussion

markdown guide