Skip to content

Instantly share code, notes, and snippets.

@bouroo
Created January 4, 2018 16:36
Show Gist options
  • Select an option

  • Save bouroo/4b4e432ce90a40539deb3dcedeecd7c3 to your computer and use it in GitHub Desktop.

Select an option

Save bouroo/4b4e432ce90a40539deb3dcedeecd7c3 to your computer and use it in GitHub Desktop.
certbot letsencrypt script
#!/usr/bin/env bash
CERT_BOT=$(which certbot)
${CERT_BOT} certonly \
--rsa-key-size 4096 \
--expand \
--webroot \
--agree-tos \
--email your@email \
--preferred-challenges http-01 \
-w /etc/letsencrypt/webroot/ \
-d your.domain1 \
-d your.domain2
nginx -s reload
exit 0
#!/usr/bin/env bash
CERT_BOT=$(which certbot)
${CERT_BOT} renew \
--rsa-key-size 4096 \
--webroot \
--agree-tos \
--email your@email \
--preferred-challenges http-01 \
-w /etc/letsencrypt/webroot/
nginx -s reload
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment