Still use Let's Encrypt after set Cloudflare

1. My Caddy version (caddy version):

v1.0.4

2. How I run Caddy:

a. System environment:

Ubuntu 18.04 LTS

b. Command:

caddy -conf ~/.caddy/Caddyfiles/qbit

c. Service/unit/compose file:

This is from my ~/.zshrc file

export CLOUDFLARE_EMAIL="XXXX@XXXX"
export CLOUDFLARE_API_KEY="XXXXXXXX"

d. My complete Caddyfile or JSON config:

qbit.ninzero.com {
    gzip
    tls {
        dns cloudflare
    }
    log /home/ninzero/.caddy/Caddylog/qbit_access.log
    proxy / localhost:8080
}
➜  ~

3. The problem I’m having:

I am trying to use Cloudflare for my certificates. But when I run the command, Caddy still ask me to agree Let’s Encrypt’s User Agreement.

4. Error messages and/or full log output:

Activating privacy features…

Your sites will be served over HTTPS automatically using Let’s Encrypt.
By continuing, you agree to the Let’s Encrypt Subscriber Agreement at:
https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf
Please enter your email address to signify agreement and to be notified
in case of issues. You can leave it blank, but we don’t recommend it.
Email address:

5. What I already tried:

6. Links to relevant resources:

If you run Caddy with the -agree flag in CLI, it should work fine. See https://caddyserver.com/v1/docs/cli

Also, you should be specifying an email address with the -email CLI option, or in the tls directive, like this:

tls your@email.com {
    dns cloudflare
}

To clarify, when you use the Cloudflare DNS plugin, that doesn’t mean that Cloudflare will provide the certificates. What it does is make it possible to use the ACME DNS challenge and it will use the Cloudflare API to set a TXT record on your domain so that LE can attest that you own the domain. See Challenge Types - Let's Encrypt

3 Likes

Solved. Thank you so much for help.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.