Installing the Certbot Nginx Plugin

This one error string had me baffled for a good half hour.

$ sudo certbot --nginx
The requested nginx plugin does not appear to be installed

The Certbot Nginx Plugin

The Nginx plugin has been distributed with Certbot since version 0.9.0 and should work for most configurations.

That wasn’t helpful at all… some soul-searching later revealed the solution.

$ sudo apt install python-certbot-nginx

The Cron

$ sudo crontab -e
# m h  dom mon dow   command
# certbot renew once per 12 hours on a random minute
22 3,15 * * * certbot --nginx renew --quiet

The command itself can be tested by running

$ sudo certbot --nginx --force-renewal renew

Not to worry though, if the cron has mistakes Let’s Encrypt sends will be a gentle reminder when renewal time comes.

Confusing Names

It’s all certbot or certbot-auto from here on. The former is the command you get when installing through the OS package manager. The latter is a self-updating (by editing itself) script downloadable for distributions that don’t have certbot on package managers, like for your Raspberry Pi Server.

They used to be called letsencrypt or letsencrypt-auto, respectively, until just recently.