Skip to content

v1.0.0

Compare
Choose a tag to compare
@jaydrogers jaydrogers released this 08 Jan 21:27
· 25 commits to main since this release

Initial release 🥳

Base Image

The image is based on certbot/dns-cloudflare:latest, providing a stable and up-to-date environment for running Certbot with Cloudflare DNS authentication.

Features

  • Automatic SSL certificate generation and renewal using Let's Encrypt
  • No configs needed, this image generates the cloudflare.ini file for you
  • Cloudflare DNS authentication for domain validation
  • Customizable configuration via environment variables
  • Periodic certificate renewal checks

Environment Variables

The following environment variables can be used to customize the Certbot container:

Variable Description Default Value
CERTBOT_DOMAIN Domain for which to obtain the certificate -
CERTBOT_EMAIL Email address for Let's Encrypt notifications -
CERTBOT_KEY_TYPE Type of private key to generate ecdsa
CLOUDFLARE_API_TOKEN Cloudflare API token for DNS authentication -
RENEWAL_INTERVAL Interval between certificate renewal checks 43200 seconds (12 hours)

Usage

  1. Pull the Docker image:

    docker pull serversideup/certbot-dns-cloudflare:latest
  2. Run the container with the required environment variables:

[!CAUTION ]
Make sure to replace the -v /path/to/your/certs:/etc/letsencrypt with a valid path on your host machine.

docker run \
 -e CERTBOT_DOMAIN="yourdomain.com" \
 -e CERTBOT_EMAIL="[email protected]" \
 -e CLOUDFLARE_API_TOKEN="your-cloudflare-api-token" \
 -v /path/to/your/certs:/etc/letsencrypt \
serversideup/certbot-dns-cloudflare:latest
  1. The container will automatically generate and renew the certificate.

Works great for orchestrated deployments

We designed this image to work great in orchestrated deployments like Kubernetes, Docker Swarm, or even in Github Actions. Look how simple the syntax is:

  certbot:
    image: serversideup/certbot-dns-cloudflare
    volumes:
      - certbot_data:/etc/letsencrypt
    environment:
      CLOUDFLARE_API_TOKEN: "${CLOUDFLARE_API_TOKEN}"
      CERTBOT_EMAIL: "${CERTBOT_EMAIL}"
      CERTBOT_DOMAIN: "${CERTBOT_DOMAIN}"
      CERTBOT_KEY_TYPE: "rsa"
  
  volumes:
    certbot_data: