As I wanted to be able to access Jellyfin on the go, I needed to put it behind my reverse proxy.
Jellyfin Changes
Tell Jellyfin that it is behind a proxy so it will ignore the proxy ip and log the correct ip
- https://jellyfin.home.arpa:8920
- hamburger menu -> Networking
- Add the IP of your reverse proxy to "Known Proxies"
- Restart Jellyfin
Reverse Proxy
- Add the below to your NGINX config:
location = /jellyfin {return 301 $scheme://$http_host/jellyfin/ ;}location /jellyfin/ {auth_basic off;proxy_pass https://jellyfin.home.arpa:8920/;proxy_buffering off;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-Proto $scheme;proxy_set_header X-Forwarded-Host $http_host;proxy_set_header X-Forwarded-Port $server_port;}location /jellyfin/socket {# Proxy Jellyfin Websockets trafficauth_basic off;proxy_pass https://jellyfin.home.arpa:8920/socket;proxy_http_version 1.1;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection "upgrade";# 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-Protocol $scheme;proxy_set_header X-Forwarded-Host $http_host;proxy_set_header X-Forwarded-Port $server_port;}
- Restart NGINX
Appendix
Sources
- https://jellyfin.org/docs/general/post-install/networking/advanced/nginx/
- https://jellyfin.org/docs/general/post-install/networking/#known-proxies