HAProxy proxy server issue

Greetings!

I am new to Home Assistant and I came over from openHAB. Been up and running with Home Assistant for a couple days now and learning it has been a blast. Much better than the latter. Anyways, I seem to be having an issue accessing Home Assistant through my proxy server. I have HAProxy setup with my pfsense box and I’m running a few websites without any issues. I was able to set up a reverse proxy to my Home Assistant server which I can access from anywhere now. Frontend is HTTPS and backend is HTTP. I’m noticing that after I connect in, I get quick random disconnects/reconnects, every 20 to 30 seconds. Sometimes longer. If I connect locally using the direct IP and port, no issues. Been trying to figure out the issue all day with no luck. It’s very annoying because it basically refreshes the page and I can’t work on anything for long periods of time. Hopefully that all makes sense. Any help would be greatly appreciate! Thank you.

Welcome.

Smells like a websocket issue.

Maybe this can help:

Thanks for the response. Your post helped me find this reddit thread: https://www.reddit.com/r/homeassistant/comments/hzslh5/ha_behind_haproxy_issues_websockets/

In HAProxy under the specific backend > Advanced Settings > Backend pass thru, I set “timeout tunnel 3600s”. That fixed the issue I was having.

Hi there.
I’ve been able to configure Cloudflare (without reverse proxy) to forward to my modem, which then passes to the pfSense running haproxy (ACME certs).
I can get to my HA through a browser, be that laptop or mobile phone, but not from the HA mobile app. even thought it’s telling me invalid cert…

Would you mind sharing what you did/how to resolve it.

G