Skip to content

Instantly share code, notes, and snippets.

@davidjb
Created September 29, 2016 04:05
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidjb/3bde458163267b33823c67b6cf37bbab to your computer and use it in GitHub Desktop.
Save davidjb/3bde458163267b33823c67b6cf37bbab to your computer and use it in GitHub Desktop.
Certbot install and certificate renewal for nginx
  • Install Certbot (via https://certbot.eff.org/)

  • Insert this into /etc/crontab:

    /usr/local/bin/certbot-auto renew --renew-hook "service nginx reload" --no-self-upgrade -v >> /var/log/letsencrypt/renew.log 2>&1

Check to make sure everything is working okay. This should cause nginx to auto-reload whenever there's a new cert.

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