Homekit and Docker

Hi everybody,
since a few day my oh2 instance runs inside docker enviroment. Everything works perfectly exept homekit integration:
My oh container is located in a docker bridge network and is not configured with “network_mode=host”.
On my docker host runs a avahi-daemon, which reflects mdns to the host’s network.
On my client I can see, homekit is advertising with the internal docker ip. When I set the configuration option ‘network interface’ to the hosts’s ip, nothing will be advertised.
I think after configuring the network interface, homekit’s socket cannot be bound to the specified ip, because it does not exist inside the container.
Is the an additional configuration option where fqnd and/or ip for mdns advertisements can be set?

Thank you vor your help!

Regards,

Oliver

1 Like

You need network mode host.

That’s bad :frowning:
I think network mod host i a little bit against the logic of docker containers…

I can understand your feeling, but it is needed for some openHAB bindings.

Another example would be the phillips hue gateway or the network binding.
They can not communicate with openHAB if not present in the local net.

ok. i understand. is there a way to restrict access to port 8080 and 8443 to my nginx instance only? i generally want that all web traffic to openhab goes to my reverse proxy.

thank you!

Finally I switched to network_mode host either for my openhab and nginx container. I also added "OPENHAB_HTTP_ADDRESS: “127.0.0.1” to my docker-compose.yml to prevent oh being accessed directly.

1 Like