Skip to content

Instantly share code, notes, and snippets.

@TimothyYe
Last active March 24, 2022 11:02
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TimothyYe/2e1f6254b3db07f689e21a05c11c5d25 to your computer and use it in GitHub Desktop.
Save TimothyYe/2e1f6254b3db07f689e21a05c11c5d25 to your computer and use it in GitHub Desktop.
Create LetsEncrypt cert with docker
#!/bin/bash
docker run -it --rm --name certbot \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
-v "/data/letsencrypt:/.secrets" \
-p 80:80 \
-p 443:443 \
certbot/dns-cloudflare certonly \
-d $1
#!/bin/bash
docker run -it --rm --name certbot \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
-v "/data/letsencrypt:/.secrets" \
-p 80:80 \
-p 443:443 \
certbot/dns-cloudflare renew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment