Hello,
I recently migrated my home assistant (hass) installation from running on a raspberry pi to running inside a truenas VM. I was going to use the home assistant truenas app, but the app doesn’t support using hass backups, so I ended up using a VM instead.
Prior to this migration, I had nginx running a reverse proxy to redirect hass.placeholder-domain.com to 192.168.0.50:8123 which was the hass IP address. I had no issues with this, but once I migrated to the hass VM, the reverse proxy stopped working and I just get Error Code: 502. I’ve made sure that nginx now points to the VM’s IP address which is now 192.168.0.78:8123 and I know that’s not the problem.
In home assistant I have the http configured as follows:
http:
server_port: 8123
use_x_forwarded_for: true
trusted_proxies:
- 0.0.0.0/0
The 0.0.0.0/0 is just for testing, if I could get reverse proxy working, I would set that to the actual IP address.
My nginx configuration didn’t change besides the new IP address but here is what I’ve enabled anyways:
- Block common exploits
- Websocket support
- Force SSL
- HTTP/2 Support
- HSTS enabled
I’ve also tried pretty much every combination of enabling/disabling these options in nginx.
For SSL support I use the SSL certificate generated by cloudlfare which covers all of my subdomains. It was generated for *.placeholder-domain.com. I use the same certificate for my nextcloud and jellyfin reverse proxies with no problems.
The only other configuration which I think could be relevent is my truenas networking configuration.
I have truenas configured to use a single interface “enp2s0” which has a static IP of 192.168.0.76/22. My home assistant NIC is then configured for VirtIO and is attached to “enp2s0”.
Any help with this issue would be appreciated, I’ve been bashing my head against this problem on and off for a ocuple of months. Thanks!