Using Lets Encrypt with Debian and nginx

Installing Certbot

These instructions work on Debian 10. They may work on other systems.

sudo apt install python3-certbot-nginx

This should take care of any dependencies.

Getting an Initial Certificate

The next step is to get an initial certificate. You should only need to do this once.

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

Keeping Up to Date

SSL certificates require occasional updating. Just run the following code:

sudo certbot renew --nginx

You can schedule this via cron as well.

home