Skip to content

Releases: serversideup/docker-certbot-dns-cloudflare

v1.1.0

09 Jan 17:35
Compare
Choose a tag to compare

🤩 What's new

  • Added PUID and PGID variables so you can control which user you want to save the certificates as
  • Support for multiple domains by @cowwoc in #5
  • Added Native Docker healthchecks
  • Added DEBUG variable for debugging scripts
  • Add ability to replace symlinks by @cowwoc in #9

🐛 Bug fixes

  • Changed chmod entrypoint.sh from 755 to 700 for improved se… by @cowwoc in #10
  • Resolved docker build warnings about leaking credentials by @cowwoc in #11
  • Shut down quicker in response to "docker stop" by @cowwoc in #7

🙏 Contributors

Special thanks to @cowwoc for his hardwork!

Full Changelog: v1.0.0...v1.1.0

v1.0.0

08 Jan 21:27
Compare
Choose a tag to compare

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: