Skip to content

Instantly share code, notes, and snippets.

@alfredocambera
Last active March 19, 2022 07:20
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 alfredocambera/bc894d34a665b9ae1a13d55e0e86d4aa to your computer and use it in GitHub Desktop.
Save alfredocambera/bc894d34a665b9ae1a13d55e0e86d4aa to your computer and use it in GitHub Desktop.
Certbot commands to work with Cloudflare's plugin

Certbot and CloudFlare

Example usage of Certbot's CloudFlare plugin:

Create certificates

$ sudo certbot certonly \
  --non-interactive \
  --agree-tos \
  --dns-cloudflare \
  --dns-cloudflare-propagation-seconds 60 \
  --dns-cloudflare-credentials cloudflare.ini \
  --domains  "*.this.domain.com"

Renew certificates

$ sudo certbot certonly \
  --non-interactive \
  ----force-renewal \
  --dns-cloudflare \
  --dns-cloudflare-propagation-seconds 60 \
  --dns-cloudflare-credentials cloudflare.ini \
  --domains  "*.this.domain.com"

List certificates

$ sudo certbot certificates \
  --non-interactive \
  --dns-cloudflare-credentials cloudflare.ini

Revoque certificates

$ sudo certbot revoke \
  --non-interactive \
  --cert-name  "this.domain.com"  # note that the wildcard was excluded!!

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment