Jellyfin Forum
Jellyfin logs not showing real IP of users - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: Jellyfin logs not showing real IP of users (/t-jellyfin-logs-not-showing-real-ip-of-users)



Jellyfin logs not showing real IP of users - tanton - 2025-05-17

Hello 

I have setup jellyfin behind caddy reverse proxy for external access and it works great. However, all users are shown the docker network ip (172.17.0.1) and not the actual ip. I have put the same IP in the known proxies setting but it's still not showing actual ip. Here is the Caddyfile section of jellyfin

}

jellyfin.domain.com {
    reverse_proxy 192.168.1.x:8096
}

Here is the logs from caddy

{"level":"error","ts":1747510332.4433181,"logger":"http.log.error","msg":"dial tcp 192.168.1.x:8096: connect: connection refused","request":{"remote_ip":"172.17.0.1","remote_port":"51466","client_ip":"172.17.0.1","proto":"HTTP/2.0","method":"GET","host":"jellyfin.domain.com","uri":"/ScheduledTasks?IsEnabled=true","headers":{"Authorization":["REDACTED"],"User-Agent":["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36"],"Accept":["application/json"],"Sec-Ch-Ua":["\"Chromium\";v=\"136\", \"Google Chrome\";v=\"136\", \"Not.A/Brand\";v=\"99\""],"Sec-Fetch-Site":["same-origin"],"Dnt":["1"],"Sec-Fetch-Mode":["cors"],"Accept-Language":["en-US,en;q=0.9"],"Accept-Encoding":["gzip, deflate, br, zstd"],"Priority":["u=1, i"],"Sec-Ch-Ua-Platform":["\"Windows\""],"Sec-Ch-Ua-Mobile":["?0"],"Sec-Fetch-Dest":["empty"]},"tls":{"resumed":false,"version":772,"cipher_suite":4865,"proto":"h2","server_name":" jellyfin.domain.com"}},"duration":0.000554603,"status":502,"err_id":"866vwhqnp","err_trace":"reverseproxy.statusError (reverseproxy.go:1390)"}


RE: Jellyfin logs not showing real IP of users - bitmap - 2025-05-17

Caddy is throwing out the x-forwarded-for headers because they're coming from untrusted IPs. I wish I knew enough about Caddy to figure out what needs to be done to get the real IPs. I gathered you can add each IP you trust as a trusted proxy, but that seems absolutely bonkers -- maybe it's your public IP or domain admin servers? In essence, you need to stop Caddy from tossing this value.


RE: Jellyfin logs not showing real IP of users - theguymadmax - 2025-05-17

(2025-05-17, 07:43 PM)tanton Wrote: Hello 

I have setup jellyfin behind caddy reverse proxy for external access and it works great. However, all users are shown the docker network ip (172.17.0.1) and not the actual ip. I have put the same IP in the known proxies setting but it's still not showing actual ip. Here is the Caddyfile section of jellyfin

}

jellyfin.domain.com {
    reverse_proxy 192.168.1.x:8096
}

You need to enter the host ip in known proxies, which would be 192.168.1.x  
After you make the change, restart the server, to apply changes.


RE: Jellyfin logs not showing real IP of users - Generator - 2025-05-17

Add caddy to the same docker network as jellyfin, and add the container hostname (ex: caddy) to known proxies
https://jellyfin.org/docs/general/post-install/networking/#known-proxies

You can add by IP, but recommend to set the container a static IP


RE: Jellyfin logs not showing real IP of users - tanton - 2025-05-17

(2025-05-17, 08:22 PM)theguymadmax Wrote: You need to enter the host ip in known proxies, which would be 192.168.1.x  
After you make the change, restart the server, to apply changes.

I have tried. Still didn't work.

(2025-05-17, 09:37 PM)Generator Wrote: Add caddy to the same docker network as jellyfin, and add the container hostname (ex: caddy) to known proxies
https://jellyfin.org/docs/general/post-install/networking/#known-proxies

You can add by IP, but recommend to set the container a static IP

I just tried to add jellyfin to the same caddy network, I put caddy as known proxy and also tried the caddy network ip range but still didn't work.


RE: Jellyfin logs not showing real IP of users - pxr5 - 2025-05-18

^ You must restart the server for after adding the caddy ip to known proxies. Also do a hard reset on your browser. My caddy file is the same as yours and I had to do the add proxy/restart server/hard reset before it worked. I added this for my proxy: 192.168.1.xxx/24