OPNSense, nginx and Home Assistant

Started by Lowrider614, March 29, 2023, 09:28:57 PM

Previous topic - Next topic
Hello,
I have nginx setup as reverse proxy with SSL and that works. When I enter the dome to my Home Assistant docker running on my Synology nas on port 8123, I get a "400: Bad Request" error.

Does anyone have some screenshots for me how to setup nginx so I can access Home Assistant?

Thanks!

Tim

Hi
i'm not using HomeAssistant but as I understand it requires an explicitly specified port in the Host header.
(https://github.com/opnsense/plugins/issues/3317)
So far, there is no way to do this in the nginx plugin gui (will need to use hooks).
although i haven't come across such a solution with quick qoogling, i would suggest (if possible) to add an external_url option with a standard port (like https://somerandomname.duckdns.org) in the application settings and use it to configure upstream in nginx.
might work

Wouldn't HAPROXY be a better fit?

You can definitely get HAPROXY to change the header etc on the fly.

There is configuration to be done on the HA side, there are various guides on the subject, for example: https://community.home-assistant.io/t/reverse-proxy-using-nginx/196954