2025-06-29, 09:59 AM
(2025-06-29, 06:17 AM)niels Wrote: Because you're using a base URL the config needs to be slightly different. Can you share the complete content of your Nginx config (obviously hide your domain from it)
Thanks so much for taking a look at this, I really appreciate it.
That's what I suspected as well – that the
/jellyfin
subpath is the source of this subtle problem. I've tried many configurations, and I'm very interested to see what you think.Here is the complete content of my
/etc/nginx/apps/jellyfin.conf
file. This is the final, stable configuration that allows the main UI to work perfectly, but where SyncPlay (WebSocket) still fails.
nginx
# Main Jellyfin UI traffic - subpath /jellyfin
location /jellyfin {
# This proxy pass to the HTTP port is correct based on our tests.
proxy_pass http://127.0.0.1:8096;
proxy_set_header Host $host;
proxy_http_version 1.1;
# These headers are for WebSocket support.
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# These headers tell Jellyfin it is behind a proxy.
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-Ssl on;
proxy_redirect off;
proxy_buffering off;
}
For completeness, and to save you time, here is some additional context:
The Jellyfin backend is correctly configured for this proxy. The file
/etc/jellyfin/network.xml
has <BaseUrl>/jellyfin</BaseUrl>
set, and internal HTTPS is disabled (<EnableHttps>false</EnableHttps>
).I also attempted using the advanced
map
directive in /etc/nginx/nginx.conf
to set the Connection
header, and I tried temporarily disabling http2
on the main listener. Neither of these attempts fixed the WebSocket issue.The core mystery is that a direct
curl
test to http://127.0.0.1:8096/jellyfin/socket
from the server's command line works perfectly, but the same connection fails when proxied through Nginx.Thank you again for your help. Please let me know if you see anything out of place or if you need the contents of any other files.