I am running several docker containers and decided to reorganize them (split the configurations into folders gathering dependent services instead of having one big heap). Everything was going fine until I moved my Home Assistant configuration.

I did not change anything in the previous configuration, except enforcing a network common to all containers visible "externally" (outside of the private docker network). It works fine with the 20+ other containers.

      - /dev/serial/by-id/usb-1a86_USB_Serial-if00-port0:/dev/serial/by-id/usb-1a86_USB_Serial-if00-port0
    image: homeassistant/home-assistant:2022.7
    network_mode: host
    restart: unless-stopped
      - /etc/docker/domotique/data/hass:/config
      - /etc/localtime:/etc/localtime:ro
      - mqtt
      - srv


    external: true
    name: srv

When starting this container I get an error:

root@srv /e/d/domotique# docker-compose up hass
[+] Running 1/0
 ⠿ Container domotique-mqtt-1  Running                                                                             0.0s
Attaching to domotique-hass-1
Error response from daemon: failed to add interface veth6eb29e9 to sandbox: error setting interface "veth6eb29e9" IP to cannot program address in sandbox interface because it conflicts with existing route {Ifindex: 7 Dst: Src: Gw: <nil> Flags: [] Table: 254}

It disappears when I comment out network_mode: host. The running container has then the IP Removing existing Home Assistant containers to force a recreation does not help.

What does this message mean in this context?

1 Answer 1


The problem is that I used network_mode: host and set at the same time the network to use (srv).

Removing the networks section solved the issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .