IPv6, Docker, & Proxmox

I’ve been racking my brain on this for a while and can’t seem to find a good answer so I figured I’d post here.

I’ve got Home Assistant running in a Proxmox LXC, and while most things are working fine Matter/Thread & IPv6 is making me want to put my head through a brick wall.

I’m able to add Matter-over-WiFi devices to HA fine, but adding Thread devices (whether they’re Matter over Thread or Homekit over Thread) to HA fails. I have no IPv6 options in Settings -->System–>Network.

Should’ve mentioned originally that I’ve got my Apple TV and Homepod’s Thread network set as the Preferred Network in the Thread Integration. These issues also persist with Homeklt Only Thread Devices like the Onvis Smart Button - after adding and removing from Apple Home the button becomes visible in HA to be added as a Homekit Device which I assume has to be visible via Thread as my HA host doesn’t have bluetooth.

My docker compose has the network mode for the HA container as host, I have IPv6 enabled in my daemon.json file, IPv6 is enabled in the LXC and in the PvE host itself, and the bridge for the LXC has an IPv6 address via DHCP from my router - yet running a docker network inspect reveals that the docker “host” network has ipv6_enabled=false.

I’m assuming this is the source of my issues adding Thread devices to my HA instance - is this something any of you have dealt with and does anyone have any guidance they can offer me? Any advice would be much appreciated.

AFAIK, adding a Matter over Thread device needs a Thread Border Router. Do you have a Thread Border Router? Go to Settings → Integrations → Thread → Configure. Do you see a TBR in there? There are several devices which have TBR built into them. For example, I have Amazon Echo Gen4 which has TBR built into it.

Can’t believe I forgot to mention, but yes I do! I have both a 3rd Gen 128 GB Apple TV 4k and Homepod Mini that I currently use for Homekit and they are my “Preferred Network” in Home Assistant.

When trying to add my Onvis Thread Smart Button I added it to Apple Home, then removed it (which to my knowlege keeps it in the thread network) - at that point it became visible in HA as a Homekit device. It seems like HA can see into the Thread Network (the Onvis button only has thread and BT radios, and my HA host doesn’t have bluetooth on board) but can’t actually access the devices connected to it.

I am not familiar with Apple TBR devices, but here is how it works for Alexa.

I add a Govee Matter light to Alexa app first. Then in Alexa app, I select the Govee light and go to settings. There is an option in settings called Other Assistants and Apps. Clicking on that shows me a Matter code. Then I come back to HA and select Settings → Device → Add a Device → Add a Matter Device. When asked for code, I enter the code from Alexa app. That’s it.

Yeah, it’s essentially the same in Apple Home - you enter pairing mode and get a Matter code in the app, but again this seems to be more of a thread problem than it is a Matter problem considering my Govee Matter Lamp was able to be added to HA without a problem.

You mentioned that you do not have IPv6 in HA. I have this in Settings → System → Network:

Matter over Thread definitely needs IPv6. I have always had IPv6 option in HA. The only other thing I remember is that I did not need a separate DHCPv6 server. The TBR supplies its own IPv6 addresses to the connected devices. Apologize for not being able to help further.

Yeah the Thread stack is only IPv6. It may be the case that the TBR is sending out device discovery on an IPv4 address (as well as IPv6), but I would think in general it should not be sending on IPv4.

Yeah I would have thought you would have this option regardless, but it maybe because the underlying IP stack has IPv6 disabled altogether.

My knowledge of compose is lacking, but let’s check to see what network “driver” the Docker container is using.
docker network ls should show some network that uses the host driver. For the moment let’s assume the name of the network is also “host”.
docker network inspect host should show that your container is using the host network (the network with a host driver).

In my HAOS based setup, it shows that the ha_core container is using the host network and the inspect host also shows that the “host” network’s settings are:
“Driver”: “host”,
“EnableIPv6”: false
What this all means is that the so called Docker network itself does not have to have IPv6 enabled as it is going to use the native “host”'s IP stack for IPv4 and IPv6.

If your setup looks to be correct, then I’m at a bit of a loss why your HA container doesn’t give you an IPv6 option.

Yep, my HA container is running in host which also has IPv6_enabled as false. I’ll have to spin up another VM and test some stuff out.