Skip to content

Instantly share code, notes, and snippets.

@magician11
Last active January 19, 2018 19:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magician11/8d8e10b5585418f90f3b7ebb17d63111 to your computer and use it in GitHub Desktop.
Save magician11/8d8e10b5585418f90f3b7ebb17d63111 to your computer and use it in GitHub Desktop.
How to add pre and post hooks for Certbot automatic renewals running Nginx
# renew_before_expiry = 30 days
version = 0.19.0
archive_dir = /etc/letsencrypt/archive/my-domain.com
cert = /etc/letsencrypt/live/my-domain.com/cert.pem
privkey = /etc/letsencrypt/live/my-domain.com/privkey.pem
chain = /etc/letsencrypt/live/my-domain.com/chain.pem
fullchain = /etc/letsencrypt/live/my-domain.com/fullchain.pem
# Options used in the renewal process
[renewalparams]
authenticator = standalone
installer = None
account = 207645b6bf251bcfc91b4fddd042b70f
pre_hook = service nginx stop
post_hook = service nginx start
@magician11
Copy link
Author

this file will live in /etc/letsencrypt/renewal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment