My Profile Photo

Ionut Gavrilut


DevOps Enthusiast | Linux System Administrator | Certified Jenkins Engineer


Auto Renew LetsEncrypt certs with crontab in Linux

To renew all LetsEncrypt certs that you have, there is a nice Bash script. Download this script in /etc/letsencrypt, and make it executable.

cd /etc/letsencrypt/
wget https://dl.eff.org/certbot-auto
chmod +x certbot-auto

Crontab entry

Now in your crontab or in your shell command, you will have something like this:

0 6 15 * * cd /etc/letsencrypt/ && ./certbot-auto renew && systemctl reload httpd

Adjust it for your needs.