Correcting Incorrect IP Addresses for Jellyfin Users behind a Proxy
nginX Proxy Manager
- You are using nginX Proxy Manager as your proxying service
- You are using a Jellyfin media streaming server
Cause
This occurs because your nginX proxy is not properly forwarding the incoming IP address and client information to the devices behind the proxy. By default Jellyfin also does not assume that it is behind a proxy, so it does not look for this incoming information - even if you DO have your nginX proxy configuration set up properly.
Correction Steps
You can fix this issue by following the steps below.
Update your nginX Proxy Manager configuration
- Go into your nginx proxy manager, and find the 'host' for the external domain name that you have connected to your Jellyfin (Example:
jellyfin.example.com
) - Go to the advanced tab and paste in the following information:
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;
- Click Save
Update your Jellyfin Network Configuration
- Go to your NAS and find the jellyfin
/config
folder in your docker storage (not in Portainer, in your file manager in your NAS) - Find the
network.xml
file and add the line:<IsBehindProxy>true</IsBehindProxy>
- Save the file, and restart the docker container
Note: This file WILL persist after container deletion, since it's mapped to your disk
Add IP of Proxy to Known Proxies in Jellyfin
- Go to your Jellyfin Admin Dashboard
- Go to 'Networking'
- Go to 'Server Address Settings > Known proxies', and enter in the IP of your nginX proxy server
- Save