How to fix Synology DSM Socket Close issue
A great feature of some models of the Synology NAS is to be able to run Docker containers directly from the DiskStation Manager (DSM - web-based operating system for every Synology NAS). You can search and download Docker images and configure and run new containers. Synology even gives you a terminal to access the containers.
The issue that motivated this blog post happens when the NAS is behind a reverse proxy. The DSM Reverse Proxy doesn’t support web socket by default, breaking the terminal app on Docker with the following exception:
Socket closed.
Despite the error message not being clear, the fix is quite simple:
- Open Control Panel and then Application Portal
- Select the Reverse Proxy tab
- Select the rule you want to fix and click in Edit
- At the Custom Header tab, create a new entry for Websocket
Now, the custom header should have the following two entries:
Done! The docker terminal app should be working now.
o/
This makes absolutely no sense, as there are exactly NO rules in the reverse proxy tab.
Hey! I only got the "socket closed" issue when using the NAS behind a reverse proxy, you might have missed that part in the text. I was not aware of this happening also when not using reverse proxy, but how are you accessing your Synology? I can try to replicate it.
Thank you my friend ))
You're very welcome!
This doesnt work on my DSM 7.0 I need to fill in following options to save the headers:
Reverse Proxy Name:, Souce Port:, Destination Port:
Hi Dennis, this configuration is only needed if you're already using Synology behind a reverse proxy. If that's not your case, it's most likely you have a different problem.
Thank you!! this has been bugging me for a while now
Was driving me nuts... Thank you.
Thanks for your article :)