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.
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:
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 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.
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
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!