Docker compose and bluetooth

I’m struggling regarding usage of bluetooth in Docker-compose.
First: I have Home assistant working nicely as well as traeffik for external access to it.

Then i wanted to install my Asus bluetooth dongle on the Pi. It worked. I looked around to see if can have access to bluetooth through docker compose for HA to have a presence detection… And the results i found was to use network-mode: Host on the compose file for HA.

But now, i can’t have access to HA when i’m not in the same network…

Do you know if there is a solution for mapping bluetooth through the container and disable network-mode host as i want to have access through traefik to my instance ?


I have the same problem.
I’m looking for a solution which can use the Bluetooth on a bridge driver.

Any ideas?
Thanks in advance

Solution I think :slight_smile:

I tried this solution, and indeed, it works perfectly.

The thing is that in network mode: Host, traefik doesn’t see the Home assistant docker anymore.

One solution that i have tried is to create a python script and update via mqtt a presence sensor. It worked smoothly, but i want to know if it is not better to create the same python script and run it inside a docker container.


you have to make some changes to your traefik.toml to help Traefik find your host internal and to be able to expose it to Traefik

Change to the IP of your Docker machine
Change to your own domain

Thats it, thanks to @piotr who learned me …

Solution #2

         url = ""
         weight = 0

     backend = "backend-homeassistant"
     passHostHeader = true
       rule = ""

Thanks a lot, i’ve been reading traefik configuration a lot lately…
With Traefik V2 it seems to be different.

The fact is that Ble component on is not very effective and i have one time or another a problem with the ble component which cause Home assistant to put me “not_home” even if i’m still at home…

Nevertheless, i am now capable of accessing through traefik in a docker container