Skip to content

Instantly share code, notes, and snippets.

@uda
Last active February 18, 2018 08:14
Show Gist options
  • Save uda/a1c8a7fc0773dcb439dd255517a45cf2 to your computer and use it in GitHub Desktop.
Save uda/a1c8a7fc0773dcb439dd255517a45cf2 to your computer and use it in GitHub Desktop.
Let's Encrypt / CertBot crontab
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# Replace letsencrypt with certbot / certbot-auto or the full path to letsencrypt command
# Replace nginx test and reload with relevant HTTP server
# Try renewing certs once a week
0 0 * * 0 root letsencrypt renew && nginx -t && service nginx reload
# certbot-auto with apache2
#0 0 * * 0 root certbot-auto renew && apache2ctl configtest && service apache2 reload
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment