HASS, Docker, Networking and Discovery

I wish I could find the original source of the solution to give credit, but…
If you want to run home assistant in a docker container without --net=host or even in a swarm and maintain the discovery functionality the solution is do the following on the host(s).

  1. Edit /etc/avahi/avahi-daemon.conf to have the following
[reflector]
enable-reflector=yes
reflect-ipv=no
  1. sudo systemctl restart avahi-daemon
  2. repeat for all nodes in swarm, if applicable

Edit: Found the source all credits go here.

1 Like