Skip to content

Latest commit

 

History

History
143 lines (108 loc) · 9.83 KB

README.md

File metadata and controls

143 lines (108 loc) · 9.83 KB

Docker Images Logo

Build Status License Support us Discourse users Discord

Certbot Cloudflare DNS Docker Container

This container is used to generate and automatically renew SSL certificates from Let's Encrypt using the Cloudflare DNS plugin. It's based off the official Certbot image with some modifications to make it more flexible and configurable.

Docker Image Size
serversideup/certbot-dns-cloudflare Docker Image Size

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="your-email@example.com" \
 -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:

Resources

  • Discord for friendly support from the community and the team.
  • GitHub for source code, bug reports, and project management.
  • Get Professional Help - Get video + screen-sharing help directly from the core contributors.

Contributing

As an open-source project, we strive for transparency and collaboration in our development process. We greatly appreciate any contributions members of our community can provide. Whether you're fixing bugs, proposing features, improving documentation, or spreading awareness - your involvement strengthens the project.

Need help getting started? Join our Discord community and we'll help you out!

Our Sponsors

All of our software is free an open to the world. None of this can be brought to you without the financial backing of our sponsors.

Sponsors

Bronze Sponsors

No bronze sponsors yet. Become a sponsor →

Individual Supporters

GeekDougle  JQuilty  MaltMethodDev  

About Us

We're Dan and Jay - a two person team with a passion for open source products. We created Server Side Up to help share what we learn.

Dan Pastori
Jay Rogers


Find us at:

  • 📖 Blog - Get the latest guides and free courses on all things web/mobile development.
  • 🙋 Community - Get friendly help from our community members.
  • 🤵‍♂️ Get Professional Help - Get video + screen-sharing support from the core contributors.
  • 💻 GitHub - Check out our other open source projects.
  • 📫 Newsletter - Skip the algorithms and get quality content right to your inbox.
  • 🐥 Twitter - You can also follow Dan and Jay.
  • ❤️ Sponsor Us - Please consider sponsoring us so we can create more helpful resources.

Our products

If you appreciate this project, be sure to check out our other projects.

📚 Books

🛠️ Software-as-a-Service

  • Bugflow: Get visual bug reports directly in GitHub, GitLab, and more.
  • SelfHost Pro: Connect Stripe or Lemonsqueezy to a private docker registry for self-hosted apps.

🌍 Open Source

  • AmplitudeJS: Open-source HTML5 & JavaScript Web Audio Library.
  • Spin: Laravel Sail alternative for running Docker from development → production.
  • Financial Freedom: Open source alternative to Mint, YNAB, & Monarch Money.