Websockets for Synology DSM

It’s happened to me several times now that an application I run on my DS 1817+ has problems with websockets. This is because I use the reverse proxy built into DSM, which does not support websockets by default. For this reason, here’s a little tutorial on how to enable Websockets for Synology DSM reverse proxy.

Enable Websockets in DSM Reverse Proxy

Actually, it is extremely easy to enable Websockets for Synology DSM reverse proxy:

  1. Open Control Panel > Application Portal
  2. Change to the Reverse Proxy tab
  3. Select the proxy rule for which you want to enable Websockets and click on Edit
  4. Change to the Custom Headers tab
  5. Add two entries in the list:
    • Name: “Upgrade”, Value: “$http_upgrade”
    • Name: “Connection”, Value: “$connection_upgrade”

Repeat these steps for every rule where you want to enable Websockets.

In my local setup, I need this for GitLab Mattermost (running within a docker container) and DSM Virtual Machine Manager Console.

11 thoughts to “Websockets for Synology DSM”

  1. Running into authentication issues with Home Assistant I’ve found your write-up and wanted to say thanks for this excellent explanation!

  2. It appears this is now available by default: just click the down arrow on the Create button in that Custom Headers tab, and select “WebSocket”.

  3. So grateful for your post, helped me out running rocket chat behind synology reverse proxy. On mobile phone app gave me websocket related error and with your guide fixed the problem!

  4. Your instructions were so clear and worked perfectly.

    You helped me a lot.

    Thank you very much Matthias ­čśë

Leave a Reply

Your email address will not be published. Required fields are marked *