External integration DNS gotcha! #904
Replies: 1 comment 2 replies
-
|
Hi @SteveDockar, thank you for the detailed explanation! This will definitely come in handy for anyone working with a similar setup. I hadn't considered CNAMEs in this context before. Currently, I'm using Cloudflare to route my homelab wildcard subdomain ( This approach has been a huge time-saver. I can just deploy a new container with the proper labels and skip manually creating DNS records for every single service. That said, it's still surprising to me that CNAME resolution doesn't work as expected here. Given how long CNAMEs have been a core part of the DNS standard, you'd think this would be more straightforward. Either way, thanks again for clarifying! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This isn't a Reitti specific problem but as it has just tripped me up I thought I'd call it out here in case anyone else hits the same issue.
TL;DR - Docker internal DNS does not like CNAME records / chains and won't correctly resolve them from external DNS
The Issue
I have Reitti running on top of TrueNAS Scale and it is now working fine with Authentik OAUTH and Immich integration, both of which run on other hosts on my network. Unfortunately, to get to this point, both of those external connections initially failed even though I had successfully added MQTT connections to my existing broker, and that had worked first time.
The Cause
Adding Authentik, and then Immich did not work first time, but the cause was the same in both cases. As both are behind a Caddy proxy, on my local AdGuardHome instances, their DNS records are CNAMES to the A record of the Caddy instance. Docker integrated DNS does not seem to like CNAME chains, and apparently, this is a longstanding issue. running
nslookup immich.<my-domain>.netin the reitti container resulted in an NXDOMAIN and the actual result as you can see here:The (well "a") Solution
I added "extra_hosts" entries to my docker-compose.yml file inside the reitti service block like this:
N.B.
I hope this helps somebody who might stumble over the same issue.
Beta Was this translation helpful? Give feedback.
All reactions