Hello People of the Forums, I’m new to Caddy and I thinks it’s an awesome Solution to replace my current Reverse Prox setup for my Smarthome (HomeAssistant) which is makes use of Traefik. (As it’s much easier to configure). But currently I won’t get the DNS Challenge working and I hope you can help me. More information below, thanks in advance, any kind of help is appreciated!
1. Caddy version (2.11
):
with Cloudflare DNS as written here.
2. How I run Caddy:
I’m running Caddy through an Home-Assistant Addon which makes use of Docker.
I’m using a binary with Cloudflare DNS
a. System environment:
Ubuntu 18.04.4, Docker - HomeAssistant
b. Command:
none
c. Service/unit/compose file:
Only the Enviroment Variable for the API Token
log-level: debug
d. My complete Caddyfile or JSON config:
my.domain.de {
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
header {
Strict-Transport-Security "max-age=31536000; includeSubdomains"
X-XSS-Protection "1; mode=block"
X-Content-Type-Options "nosniff"
X-Frame-Options "SAMEORIGIN"
Referrer-Policy "same-origin"
-Server
}
encode gzip zstd
reverse_proxy localhost:8123
}
3. The problem I’m having:
Dns Propagation fails and I get an NXDOMAIN error. I’m not sure if Cloudflare even receives the TXT entry. The certificate is only for local use and this is why I use the DNS Challenge, I don’t want to expose any ports.
4. Error messages and/or full log output:
2020/08/03 18:53:50 [INFO] [my.domain.de] acme: Waiting for DNS record propagation.
2020/08/03 18:53:59 [INFO] [my.domain.de] acme: Cleaning DNS-01 challenge
2020/08/03 18:54:00 [INFO] Deactivating auth: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/someauth
2020/08/03 18:54:00 [INFO] Unable to deactivate the authorization: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/someauth
2020/08/03 18:54:00 [ERROR] error: one or more domains had a problem:
[my.domain.de] acme: error: 400 :: urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for _acme-challenge.my.domain.de - check that a DNS record exists for this domain, url:
(challenge=dns-01 remaining=[])
5. What I already tried:
- Checked the Cloudflare API Permissions, should be allright.
- Created a DNS entry (A-Record) for the subdomain as I thought the DNS Validation needed an entry
- Tried it after removing the fancy schmancy header and encode stuff
- Read all threads that are related to Cloudflare DNS Challenge (that google gave me, I hope lol
)
6. Links to relevant resources:
Hope this everything relevant you guys need to help me out