Jellyfin, reverse proxies and web sockets: Why SyncPlay sometimes doesn’t work. #10310
Replies: 2 comments
-
Hi! I've tried following the instructions here, but it still does not work for me... I think there's an issue with the fact that locally jellyfin is HTTP only while, from the outside, the proxy is HTTPS, so it uses Below is the relevant section of my config: server {
listen 443 ssl;
# ... -snip-
location /media/ {
proxy_pass http://$nas:8096;
proxy_pass_request_headers on;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $http_host;
# Websocket support
#proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection "upgrade";
proxy_set_header Connection $http_connection;
# Disable buffering when the nginx proxy gets very resource heavy upon streaming
proxy_buffering off;
}
} |
Beta Was this translation helpful? Give feedback.
-
Thank you so much for this! The important part you need:
Source: Official Nginx Blog My config (tested):
|
Beta Was this translation helpful? Give feedback.
-
People often wonder why (and if) Jellyfin needs web sockets support. YES, it does. Apart from others, this is needed for SyncPlay to function correctly, as I found out the hard way.
I wondered why SyncPlay worked correctly in my local LAN (using http://media:8096/ as its address) but not when using "from outside" via my reverse proxy setup (using Nginx Proxy Manager, and an address like https://media.example.com/).
It was a simple solution—enable Websockets Support like so (if using NPM):
Now groups and SyncPlay work fine, even over the Internet and the family can enjoy synchronous playout even when living hundreds of miles apart!
This should probably go into the documentation somewhere, and I leave it here for others who are googling around because they encounter the same problem.
Beta Was this translation helpful? Give feedback.
All reactions