Code Monkey home page Code Monkey logo

caddy-cloudflaredns's Introduction

Latest Release caddy on DockerHub Docker Build

caddy-cloudflaredns

Please see the official Caddy Docker Image for deployment instructions.

Builds are available at the following Docker repositories:

Few things to note:

  1. You should add CLOUDFLARE_EMAIL and CLOUDFLARE_API_TOKEN as environment variables to your docker run command. Example:

    docker run -it --name caddy \
      -p 80:80 \
      -p 443:443 \
      -v caddy_data:/data \
      -v caddy_config:/config \
      -v $PWD/Caddyfile:/etc/caddy/Caddyfile \
      -e [email protected] \
      -e CLOUDFLARE_API_TOKEN=12345 \
      -e ACME_AGREE=true \
      slothcroissant/caddy-cloudflaredns:latest
    

    You can obtain your Cloudflare API token via the Cloudflare Portal. To create a API token with minimal scope, the following steps are needed:

    1. Log into your dashboard, go to account settings, create API token

    2. grant the following permissions:

      • Zone / Zone / Read
      • Zone / DNS / Edit
  2. You should add the following to your Caddyfile as the tls directive.

    tls {$CLOUDFLARE_EMAIL} { 
      dns cloudflare {$CLOUDFLARE_API_TOKEN}
    }
    
  3. This image now supports tagging! See available tags here. To select a specific version of caddy, set your Docker image tag to the caddy version you'd like to use.

    Example: slothcroissant/caddy-cloudflaredns:2.4.3

caddy-cloudflaredns's People

Contributors

bfcoder avatar dependabot[bot] avatar keriati avatar slothcroissant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

caddy-cloudflaredns's Issues

Multi-arch support

Hi, i was looking for an already available image that included the cloudflare module to avoid building it myself locally or create yet another image on the Docker registry and i found yours!

It's just what i needed the only problem i have is that i'm trying to deploy it on a RPi 4 wich is an arm based system and your image only has builds for x64, i was wondering if you could add multi-arch support images

Thanks again

Compatibility with caddy-docker-proxy?

Forgive my ignorance, as I'm working on migrating from Namecheap registrar + DNS using Nginx Proxy Manager, to Namecheap registrar + Cloudflare DNS using Caddy.

Does this project have the ability to work with https://github.com/lucaslorentz/caddy-docker-proxy? That way I can define my desired subdomains using labels in my existing docker-compose.yaml file?

Additionally, is there a full example of a Caddyfile?

Certificate renewal

Does this image handle certificate renewal automatically? I set it up a few months ago and I'm getting emails from the Let's Encrypt Certificate Bot warning me that my certificates will soon expire (in 11 days). If not, do you know of how to manually force a renewal? Thanks

caddy 2.4.5 broken on Ubuntu 20.04 hosts

Hey @SlothCroissant

2.4.5 seems to be broken on Ubuntu Hosts. See here --> caddyserver/caddy#4118
Woke up this morning with this exact issue using your image.

Since your image does not provide tagged versions, I was unable to revert back to 2.4.3. So I edited a Dockerfile real quick to build caddy-cloudflaredns with 2.4.3. Worked perfectly. Sharing this here in case other people experience the same issue.

Issue is some random Go error like the follwing:

qtls.ClientHelloInfo doesn't match caddy

Solution for now:

  1. Create a new folder.
  2. nano Dockerfile
  3. Paste:
FROM caddy:2.4.3-builder AS builder

RUN caddy-builder \
    github.com/caddy-dns/cloudflare

FROM caddy:2.4.3

COPY --from=builder /usr/bin/caddy /usr/bin/caddy
  1. Build it:
    docker build -t caddyemergency .

  2. Change your container image from slothcroissant/caddy-cloudflaredns to caddyemergency:latest

Run it, you should be fine. After caddy updates the main image with a fixed version, you may revert back to using slothcroissant/caddy-cloudflaredns

Email field is not needed

I didn't fill in an email address but still completed the DNS challenge and got the certificate,

i applied 3 domains ,2 succesed from let encrypt,the last one failed with “"error":"HTTP 404 urn:ietf:params:acme:error:malformed - Certificate not found"}”

then caddy tried ZeroSSL ,it succeed but with the msg “missing email address for ZeroSSL; it is strongly recommended to set one for next time”

I'd like to ask,

  1. if I don't set email, what negative impact will it have?

  2. Does this email address necessarily have to be The Cloudflare Email Address?

  3. what should i do now?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.