Surveillance station behind HAProxy

Hi, Everyone.

Hope you guys can help me, I have setup HAProxy in my pfsense. I am using Cloudflare to host my domain and external DNS. I have Synology NAS behind the HAProxy, I am able to make Synology Drive and Photos work with HAProxy but I am having trouble making Surveillance Station work. Here is a breakdown of the issues that is happening:

  1. Using the mobile client behind my network. I am not able to login using

  2. Using a mobile client connected 4G/5G, I am able to authenticate but not able to play live view or any recording

  3. On a Desktop Client using I am able to login and view the live video and recording

I have attached the stats for my camera:

Please let me know what information you needed to help me address this issue so I can provide it.

I have never use HAPorxy with Synology but since it works on desktop my guess the mobile app is looking for something that HAProxy does not pass over the proxy connection.

Hi, Tom.

Thanks for the reply, yeah I guess this is more of mobile client issue. I have also open a ticket with Synology and I will update this thread once we get a response from support.

Hi, Everyone.

I have finally fixed the issue, the Synology support provide me this kb article: What can I do if I see "Cannot connect to WebSocket" when playing Live View or recordings? - Synology Knowledge Center

Surveillance station is using websocket, I have a bit of googling and found this discussion in netgate forum: Websockets configuration in HAProxy | Netgate Forum

This help me fix my issue. Here is what I have added in frontend configuration:

1 Like