I have a question
Currently i run docker on my synology nas with mutiple containers inside
the 2 containers giving me grief is Homeassistant and HomeBridge
Both containers are setup to use the “same IP as host” and are bonded to the bon0 network
bon0 IP is
HomeAssistant is port 8123
HomeBridge is port 8581
Now this is the problem…
On homeassistant it can see everything on my LAN fine, scans and picksup my devices BUT it can not see homebridge.
As a test i turned off the homebridge docker and setup another homebridge docker this time with the LAN bonded to the bridge network of docker
the ip of this new docker was 172.17.0.5
This is of course the inbuilt docker LAN
Now when doing this homeassistant then see’s homebridge and i can see its homekit offering.
I presume because homebridge is mutiplecasting on the same IP/subnet it has an issue seeing itself.
What would be the method to add a static route or some code so that 192.168.1.0/24 can see 172.17.0.0/24 i have tried playing around with static routes in the synology gui but to no luck.
What you call “homebridge docker” is a “homebridge container”.
It is odd that running both container with “same IP as host” (which applies
--network=host under the hood) doesn’t work. Containers started with
--network=host use the network namespace of the host network and as such behave network-wise as every other process running on the host.
Is it a known restriction of homeassint that it’s not able to find hombridge if both are running on the same host? I would be surprised it this would be the case - but it almost looks like it.
corect homebridge in a docker/container.
both the docker containers are in host mode so have the same IP as the NAS 192.168.1.60
if i move homebridge to another container and put it on the docker network 172.17.x.x it then works and they can see each other is there a way i can edit the routing or network code so 172.17.0.0 can see 192.168.x.x and visa/versa?
You don’t have to route anything. The host can reach every container in a bridged network, as it alredy has an ip in that network for the networks gateway. A container with
--network=host behaves network-wise like every other native process on the host, thus the previous sentence is valid for such a container as well.
But adding a route for a bridged network so that other lan devices can acess it, is a bad practice. I realy urge you to ask in the Homeassistant forum, what the suggested solution is. Adding a route to access it from other lan devices doesn’t look right. It looks like a solution pattern someone would apply that tries to enforce a solution from the vm world to the container world while ignoring the solution patterns of the container world…
this is only for my internal hoem network which isnt exposed so im not bothered about “best practice” as long as it works…
I’ll also ask in the homebridge world to see what they have to say also.