Created
March 21, 2017 21:54
-
-
Save kosso/513b9f94c6a1f39c163d8d45ee0e3f21 to your computer and use it in GitHub Desktop.
LetsEncrypt autorenewal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LetsEncrypt Autorenewal | |
----------------------- | |
Let's say you created and installed an Apache certificate with: | |
./certbot-auto -n --apache --agree-tos -m [email protected] -d yourdomain.com -d www.yourdomain.com | |
Create a file called 'letsencrypt-autorenew' (or anything really) | |
containing: | |
#! /usr/bin/env bash | |
cd /opt/letsencrypt | |
./certbot-auto renew --post-hook "service apache2 reload" | |
And copy that to /etc/cron.monthly/ | |
This will check for expiry of all certificates and renew any expiring in the next 30 days then reload Apache. | |
Job done! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment