Host/domain ambiguity

In the process of debugging Jellyfin and Chromecast, I ended up splitting my Traefik instance in two (one per host). However, there are still a few instances where the Traefik instance isn’t on the same IP as the service it’s providing.

There are some other examples, but the pattern here is devices that expose their data on non-standard ports.

Maybe I’m overcomplicating things here, but it’s frustrating to know that the device one reaches through HTTP/HTTPS isn’t the same one reaches through ICMP or any other protocol. ping unifi.home.lan will actually be pinging system-apps, not unifi. Misleading!

Two solutions come to mind:

  1. I could try to get Traefik to route all traffic based on the requested domain name, but I’m not sure if Traefik is capable of that. Would that play well with UDP? With SSH? Would that drastically overcomplicate my Traefik setup?
  2. Alternatively, I could set up a second domain (say hosts.lan) and map these domains to the correct IPs, while home.lan continues to act as an HTTP/HTTPS shortcut. For example:
    • unifi.home.lan to where Traefik routes it to
    • unifi.hosts.lan directly to

Given the expected investigation time the first would require, I’ve opted for the second approach. I’m still unsure if this is absolutely necessary or if mDNS would be sufficient, but I can always revisit this later.