Nginx proxy 502 bad gateway

I figured it out. You need to install mariadb, (maybe not, I don’t know yet) nginx proxy manager (NOT the ssl proxy). To get Ngnix you need to enable advanced mode in user settings. The default credentials for nginx are: [email protected], and the password is changeme. you then need to set up your info, after that set up a proxy host with your domain name, ip of home assistant os for the hostname/ip, and port 8123 with websockets support. after you set that up visit you domain and if you get 400: bad request, use a file browser of your choice, and check the home assistant log for something like this:

2024-01-28 09:32:19.013 ERROR (MainThread) [homeassistant.components.http.forwarded] Received X-Forwarded-For header from an untrusted proxy 172.30.33.2

get the ip and remember it in configuration.yaml put this in:

http:
  use_x_forwarded_for: true
  trusted_proxies:
    - home assistant machine ip
    - ip from log

then reboot home assistant and when you visit your domain you should be greeted with the log in screen.

1 Like