Struggling to get HA working with wireguard in a docker environment

Hi there,

Been struggling for a few days trying to understand how to “connect” my HA containter to my wireguard container.

I’ve installed both separately via portainer.

I manage to access my HA web interface from a remote location through the VPN.
I have an ESP setup with ESPHome connected through the VPN working fine. I can access its web server from a client connected to the VPN.

BUT HA cannot see this device.

From the HA container console, i’m not able to ping this device. If i add the proper static route on the host, i’m able to ping this device from the host, but not from within the HA container.
Both containers are on the same network.
It’s impossible to add a static route from inside a container.

My knowledge in routing is limited. I’ve read tons of documentation on this topic but cannot solve my issue.

Is anybody able to help?