Skip to content

Instantly share code, notes, and snippets.

@SourLemonJuice
Created May 10, 2025 17:27
Show Gist options
  • Save SourLemonJuice/56b64e2a4e12b7e43320b0538e9ae77e to your computer and use it in GitHub Desktop.
Save SourLemonJuice/56b64e2a4e12b7e43320b0538e9ae77e to your computer and use it in GitHub Desktop.
Use Certbot in Docker to do some ACME tasks quickly.
#!/usr/bin/env bash
# Please fill you real email
docker run --rm -it \
-v "./token/cloudflare.ini:/workdir/token/cloudflare.ini" \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
certbot/dns-cloudflare \
--server https://acme-v02.api.letsencrypt.org/directory \
--dns-cloudflare \
--email [email protected] \
--dns-cloudflare-credentials /workdir/token/cloudflare.ini \
--dns-cloudflare-propagation-seconds 8 \
"$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment