Skip to content

Instantly share code, notes, and snippets.

@disorder
Created January 14, 2018 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save disorder/a2a8f17da9fd59cf31bbadb2411f817e to your computer and use it in GitHub Desktop.
Save disorder/a2a8f17da9fd59cf31bbadb2411f817e to your computer and use it in GitHub Desktop.
letsencrypt snippets

letsencrypt snippets

certbot

# no wildcard certificates yet
certbot certonly --nginx -d domain.tld -d www.domain.tld
certbot renew --nginx
certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"

certbot certonly --apache -d domain.tld -d www.domain.tld
certbot renew --apache
certbot renew --pre-hook "service apache2 stop" --post-hook "service apache2 start"

Or now that tls-sni-01 is disabled:

certbot --authenticator standalone --installer nginx -d domain.tld --pre-hook "service nginx stop" --post-hook "service nginx start"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment