Home Assistant docker: domain name resolution

Dear community,

I am running HA in a docker container. Usually, I access HA via IP-address.
Recently, I started to think about introducing https to all my containers. Therefore, I need domain names to make it more sexy. :slight_smile:

For HA, we can specify the URL within the application. I did not specify the domain name within the docker compose.yaml. But it works: I can access HA via http://homeassistant.internal:8123.

The problem is, I have 5 other containers that are not accessible via domain name and I am struggling to find the reason.


  • Where within the container is the domain name / URL defined? I had a look at /etc/hostname and /etc/hosts, but there is nothing there.
  • How does my Unifi USG-3P know, where to direct me, if I come along with the domain name?
  • I am running AdGuard Home in a separate container and I am 99.9% sure that I did not do any domain-name-ip-address-mapping there.

A side note: HA is connected via a macvlan, whereas the other, not accessible via domain name containers are connected via ipvlan.

Any help is very much appreciated.

I have spend a couple of nights on this. Turns out, its not Docker and its not AdGuard Home, but a messy /etc/hosts-file on my Unifi USG-3P Gateway. After having deleted all entries from the last 5 years, the data was gathered again and now, all hostnames and domain names are there. (only devices, who get their IP via DHCP-reservation…)

For my docker containers, I probably need to do some manual DNS-entries… :man_shrugging: (I will either try in Unifi Network Application or I will give Pi-Hole a try.)

If you are interested in the details: