Bluetooth in Docker without --net=host

Hello! I’m trying to set up Bluetooth for hass in a docker container. So far it has worked just fine with --net=host, however I would like to include the hass container in a virtual docker network, so I can’t just pass through the adapter by assigning the host network to the container. How would I be able to achieve this? Any help regarding this would be greatly appreciated.

1 Like

Did you ever find a solution to this?

No, I just ended up firewalling off external access to the other services.

I need this too

Hi, I would be very interested in this too. Putting HA in host mode is really not ideal because it means I have to set 7 other containers in host mode too (Music Assistant, Piper, Whisper, OpenWakeWord…) so that HA can connect to them. Is there in 2023 a way to give HA access to my Bluetooth dongle without seting it as host ?

Not the solution you are asking for (bluetooth) but you can easily give a ip from your network to each container using docker macvlan (useful when you dont want to manage port conflicts).

You can set only home assistant to host mode and if you want to establish a communication between containers that aren’t in host mode and HA container you can use the ip address followed by the port.