Network Adapters missing on Docker install

I am struggling to get a docker container installation to find my network adapters. I have my local lan and a vlan with my iot devices. Basically, it appears that the container sees the network and Home Assistant sees it but it is disabled.

You can see that eth0 is disabled in the System Information.

And for some reason I don’t have an option for network adapters where I normally would. I cant post a second screenshot due to having a new account.

This is a brand new installation so everything is the default except my docker compose file which shows this:

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
#    network_mode: host
    networks:
      lan:
        mac_address: 78:c7:85:40:56:23
        ipv4_address: 192.168.1.30
      iot_lan:
        mac_address: 78:c7:85:40:57:24
        ipv4_address: 192.168.10.30

networks:
  lan:
    driver: macvlan
    driver_opts:
      parent: enp4s0
    ipam:
      config:
        - subnet: 192.168.1.0/24
          gateway: 192.168.1.1
  iot_lan:
    driver: macvlan
    driver_opts:
      parent: enp4s0.10
    ipam:
      config:
        - subnet: 192.168.10.0/24
          gateway: 192.168.10.1

Running docker network ls shows the networks are there as well:

f522ab5edc8f   homeassistant_default     bridge    local
53627c8b977b   homeassistant_lan         macvlan   local
c943e5338a69   homeassistant_iot_lan   macvlan   local

Is there anything that I am missing in this setup? I can’t find any one having the same issue.

Hello,

Docker network ls is just listing the networks available.

I believe you have to connect home assistant docker to the iot_lan network, even if I don’t see the mistakes in your docker config file.
Use the following command to ensure that the docker is connected to all the requested network.

docker network connect

If you prefer using a GUI you can use Portainer too.
Hope it helps.

The docker network adapter will not be same as host network adaptor name.

I think enp4s0 is same as docker eth1. This seem correct since IP matches. Looks like you configured docker to use only that adaptor. I don’t configure my macvlan networks in compose but that looks correct.

Everything appears correct. You have nothing connected to eth0

What specific issue is this causing for you?
Knowing that will probably give better idea of issue cause.

EDIT
Portainer has nice tool that allows you to connect command line in container
dig and ping commands work inside HA container and useful for troubleshooting

Hmmm, I tried that but it appears to be connected.

sudo docker network connect homeassistant_iot_lan homeassistant
Error response from daemon: endpoint with name homeassistant already exists in network homeassistant_iot_lan

When you say I have nothing connected to eth0, I’m not sure I understand what you mean. That is mapped to enp4s0.10 or at least that was what I thought? This is my iot network and has 30+ devices running on it.

The issue that I am having is that I usually see the Network Adapter option in the UI like this:

But with docker I only see this with no option to select the other interfaces:

So Im stumped at what is happening.

It is. You explicitly tell the container to connect and assign IPs and MAC address. One of your first screenshots confirms it.

Are you trying to enable something unnecessarily? What issue is the disabled connection causing?

I’m only able to post one image every 5 mins but this is what I am seeing with Docker:

I believe if I am unable to check both adapters then HA will only look at my lan right?

I’m saying eth0 may have no meaning. Everything is using eth1 en4s0 or .10 in your first screenshots.

Your latest screenshots shows both your macvlan are connected and being used. I find it weird that the ip addresses do not match what you have in compose. This may point to an issue but if HA can utilize conmection it’s Ok for now

You have both checked currently I believe. Reboot is needed after change.

Currently you only have the macvlan connections configured. You should create or add an internal docker network for connections container to container. On docker network you may use hostname instead of IP which helps if docker ip changes after container rebuild. Also macvlan cannot connect back Into docker network to communicate with other docker containers.

It’s not a concern unless you cannot connect to devices or use the interfaces. Localhost has no purpose — in this specific case — and auto will only cause issues if your connect to device on seperate lans. My opinion.

Bigger issue is determine why IPs were not assigned as defined in compose and add an internal docker network for containers to talk

To clarify, the first screenshot is from a different HA instance that is not running in docker but rather directly on the host. The second image is showing everything I see in the network tab within the docker instance. As you can see there are no network adapters visible. Im not sure how to get it to appear, but currently I am unable to see my IoT devices because I cannot tell HA what interface to use.

I would remove network setup from compose file. Setup networks independently outside the compose file

After that retry your compose
Only idea I have is the network is setup incorrectly

In your screenshot it does show eth0 disabled but eth1 is enabled and shows your configured IPs. I would presume that works but don’t have complete details of your system

I’m still at a loss to what is happening. I pulled the latest docker image. Then created my networks with:

sudo docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=enp4s0 lan
sudo docker network create -d macvlan --subnet=192.168.10.0/24 --gateway=192.168.10.1 -o parent=enp4s0.10 nexus

Then I started my docker compose.

My docker-compose.yaml now looks like such:

services:
  homeassistant:
    container_name: homeassistant
    image: "ghcr.io/home-assistant/home-assistant:stable"
    volumes:
      - /opt/homeassistant2/config:/config
      - /etc/localtime:/etc/localtime:ro
      - /run/dbus:/run/dbus:ro
    restart: unless-stopped
    privileged: true
    networks:
      lan:
        mac_address: 98:b7:85:20:56:23
        ipv4_address: 192.168.1.30
      nexus:
        mac_address: 98:b7:85:20:57:24
        ipv4_address: 192.168.10.30
    stdin_open: true
    tty: true

networks:
  lan:
    name: lan
    external: true
  nexus:
    name: nexus
    external: true

I then jumped into the container with sudo docker compose exec homeassistant bash

c399426758d2:/config# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
133: eth0@if4: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 98:b7:85:20:57:24 brd ff:ff:ff:ff:ff:ff
    inet 192.168.10.30/24 brd 192.168.10.255 scope global eth0
       valid_lft forever preferred_lft forever
134: eth1@if3: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1500 qdisc noqueue state UP 
    link/ether 98:b7:85:20:56:23 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.30/24 brd 192.168.1.255 scope global eth1
       valid_lft forever preferred_lft forever
c399426758d2:/config# cat home-assistant.log*
2025-04-22 18:49:43.549 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
2025-04-22 18:49:43.570 WARNING (Recorder) [homeassistant.components.recorder.util] Ended unfinished session (id=21 from 2025-04-22 22:43:23.871716)
2025-04-22 18:43:23.875 WARNING (Recorder) [homeassistant.components.recorder.util] The system could not validate that the sqlite3 database at //config/home-assistant_v2.db was shutdown cleanly
c399426758d2:/config# 

Everything is looking fine and I see both interfaces. My configuration.yaml is this:

# Loads default set of integrations. Do not remove.
default_config:

http:
  server_port: 9123
  use_x_forwarded_for: true
  trusted_proxies:
  - 127.0.0.1
  - ::1
  ip_ban_enabled: false
  login_attempts_threshold: 5

And my Network Settings section is still completely missing the Network Adapter section.

Is there a new configuration.yaml option or something to make this appear? Or has this been removed from the docker version?

No. I haven’t checked 2025.4 but I doubt it’s changed and saw no breaking change

Did you enabled “advanced mode” in user profile. I did this years back so I forget if it’s related

That was the solution! My network adapters now appear. I guess I toggled that on my previous install years ago and completely forgot about it. I only see one device currently but I will fiddle with the docker settings again until I get them to show up! Thank you so much @tmjpugh

If @tmjpugh gave you a solution then mark his post as solution, not yours. Give a man a credit for his effort.

Thanks for the heads up @ddaniel ! This is my first time posting on the forums here and thought the check/solution box marked the whole thread as solved. Fixed and noted for the future!

1 Like

No problem.