Skip to content

Instantly share code, notes, and snippets.

@randy3k
Created September 4, 2024 19:08
Show Gist options
  • Save randy3k/220ece0b5069086f527d8ad9cd215fa8 to your computer and use it in GitHub Desktop.
Save randy3k/220ece0b5069086f527d8ad9cd215fa8 to your computer and use it in GitHub Desktop.
Docker setup for letsencrypt certbot cloudflare
dns_cloudflare_api_token = <CLOUDFLARE-API-TOKEN>
services:
certbot:
image: certbot/dns-cloudflare:latest
volumes:
- ./letsencrypt/:/etc/letsencrypt
- ./cloudflare.ini:/config/cloudflare.ini
command:
- certonly
- --noninteractive
- --agree-tos
- --register-unsafely-without-email
- --dns-cloudflare
- --dns-cloudflare-credentials=/config/cloudflare.ini
- -d <DOMAIN>
- -d *.<DOMAIN>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment