"Unable to connect to Home Assistant" via vps, vpn, reverse proxy

So, I have a vps and want to use it to connect to google assistant.
First I installed zero tier to HA and to my VPS. Works fine ping goes both directions.
Then I have nginx-pm in my VPS, my own domain, and set up https://ha.domain.com with ssl encryption which frist gave bad request.
Then I added trusted_proxies in config and saw login page by connecting to my address: https://ha.domain.com
But now I see what’s in the picture and have no errors in browser or in HA logs, so I don’t have any idea what exactly the issue.
Any ideas?

2024-10-10 17_09_45-Window

Hi sergentum,

First try https://YourHAIPAddress:8123

If that don’t work try with http:// instead.

Also 10.147.20.27 is a valid address, but it’s a zerotier-one address. if you are using that do you have it all set up correctly?

Hi @Sir_Goodenough

10.147.20.27 is a valid address, but it’s a zerotier-one address

I know that, I’ve installed zerotier to my VPS, my rpi5 HA instance as i mentioned in the first message.

This doesn’t work and should not work if you mean my local IP at home or zerotier IP address, because ssl and https installed in nginx-pm only on VPS. So from internet my HA accessible via https, but inside my VPN (zero tier) nginx talk to HA via http.

If you mean https://VPS_ip:8123 this also doesn’t work and can’t work because 8123 port isn’t exposed in my VPS.

http://10.147.20.27:8123 - this way it works with my laptop connected to zerotier, but I think it doesn’t mean that the issue on nginx side, because it might something like reverse proxy trusted_proxies related.

Ok, I’ve figured it out.

The problem is related to HA expected headers which aren’t passed by nginx. I don’t know which one exactly or all of them are needed but this post https://community.home-assistant.io/t/home-assistant-community-add-on-nginx-proxy-manager/111830/543 contains correct config for nginx, which can be also added via UI of nginx-pm: