Acces from internet to Home assistant web interface / API REST NGIXN

Hi.

I have a mini-pc with Proxmox. I have a LXC with PiHole + unbound, another with some dockers (192.168.100.4), other with WireGuard and a VM with Home Assistant OS (192.168.100.6).

The LAN “mode” works without problems.

For a new project I need acces to Home assistant from internet without VPN.
I installed a docker of NGINX in the LXC with Docker, and I configured a entry with the follow configuration


The home assistant configuration is this


The Docker configuration is this:


Obviously I have the ports on the router forwarded to the IP of LXC with NGINX docker:

When I try to acces from Internet, after login page apears a another Home Assistant web with the message “Unable to connect to Home assistant” and a countdown no another try.

For me, the point it’s send request to API Rest of my home assistant instalation but obvyously don’t work neither.

Can resolve the domain but can acces to Home assitant.

I spent 2 days trying configurations but I’m lost.

Thanks

Check trusted_proxies and use_x_forwarded_for

Also with docker it is best to use hostname and not IP unless you set static docker network IP for containers

Hi.
Like you can saw, these parameters in configuration.yalm are set yet, but doesn´t work. The hostname in docler containers only work between containers in the same Docker network, but I have the HA in a VM (no docker container) but in my local network.

Thanks.