Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Automatically Renew SSL Certificates On Debian 10 Using Certbot

Related Posts


sudo apt-get install certbot -y

Install the plugin for certbot to work with Apache.

sudo apt-get install python-certbot-apache -y

... Alternatively, if you are using nginx:

sudo apt-get install python-certbot-nginx -y

Have certbot install SSL certificates for your site (this will need to be the server these domains actually point to).

sudo certbot --apache -d $DOMAIN_1 -d $DOMAIN_2

If you just have one domain to renew, then specify just one -d, if you have 3, then specify 3 x -d parameters. You get the gist.

Automatically Renew

To configure certbot to automatically renew your certificates, edit your cronjobs with:

sudo crontab -e

Add a line to try and renew the certificates daily

@daily /usr/bin/certbot renew --quiet
Last updated: 19th January 2021
First published: 19th January 2021