Monthly autoupdates of letsencrypt certs

** This is outdated. Use one of the following tools instead: **


Old Post: is cool, because it provides SSL certs for all of your domains for free! The only thing which is a bit challenging is that you have to renew your certs every 3 months. I made a script which, monthly triggered by cron, can do this for you.

This script assumes you’re using nginx webserver (which is reloaded by the script after recreating certs) and that your domains are located in “/var/www/” directory. Your letsenrypt installation is configured via the “LETSENCRYPT_DIR” var. The certs are linked to the directory configured via “WEBSERVER_CERTS” var which is used to have a static symlink that points to your cert without getting renamed so you can keep your webserver config untouched.

The “DOMAIN” var can have any FQDN. If its a normal domain the cert is also created for the “www” subdomain automaticly. If its a subdomain like “” this step is skipped.


Find it here:

You can run this script manually to check if everything works. If so just create the following cronjob, which triggers this monthly.


  • @monthly root /etc/letsencrypt/ 2>&1 > /var/tmp/letsencrypt.log

Thats it. Have fun. Never care about renewing you SSL certs again :-)