HTTPS Reverse Proxy to Home Assistant issues

Hi everyone,

I setup home assistant http and exposed it to the outside and it works but I would like to add more security which means using https. I managed to do this by using Nethserver’s WebServer and configuring a reverse proxy. I defined a domain name that hits my NethServer and from there, the WebServer sees the request for the URL and terminates HTTPS and forwards to my Home Assistant using HTTP.

I manage to get to my login page but then I am displayed this page :

image

Anyone else has this problem and knows how to fix this?

Your reverse proxy also needs to accept and forward websocket requests. If you got this working for HTTP and WS, you will now need to make this work HTTPS and WSS. When you check for example in Chrome’s developer tools you should be able to see if the browser can successfully establish a secure websocket connection or not.

Cool, good to know. What ports should I open for WSS?

I mean what is the websocket path I should map?

Same port as HTTPS.

The path to map is: /api/websocket

It actually is WSS, as reported by the error message in the console. The path you provided is correct and also specified in the console error message.

Was able to reverse proxy a https call to my homeassistant system and it works through a web browser however, with the android application it will not work. Is there a fix for this? The application works with a reverse proxy only if not using https, http works. HTTPS and HTTP work fine through a browser.

Hi,
could you share your reverse proxy settings?
I’m having the same issue but i don’t understand what i’m missing.
Could you help me?

http:
  base_url: http://Hostname
  use_x_forwarded_for: true
  trusted_proxies:
    - 127.0.0.1 
    - 192.168.1.140  


websocket