[PR #15575] [CLOSED] Fix unreachable local API URLs in NAT/Docker by respecting Published Server URIs #14352

Closed
opened 2026-02-07 07:28:27 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/15575
Author: @martenumberto
Created: 11/19/2025
Status: Closed

Base: masterHead: master


📝 Commits (1)

  • 6faf23e Respect Published Server URIs for local access URLs

📊 Changes

2 files changed (+44 additions, -1 deletions)

View changed files

📝 CONTRIBUTORS.md (+1 -0)
📝 Emby.Server.Implementations/ApplicationHost.cs (+43 -1)

📄 Description

Description

This PR fixes an issue where Jellyfin returns unreachable internal IP addresses (e.g., Docker container IPs like 172.17.0.x) to clients when GetApiUrlForLocalAccess is called. This behavior breaks functionality such as Live TV Direct Stream on Android TV clients running in a LAN environment different from the container's internal network.

The Problem:
Previously, GetApiUrlForLocalAccess checked for CLI startup overrides but ignored the "Published Server URIs" configured in the Web Dashboard (NetworkConfiguration). Consequently, even if a user configured a correct LAN URL (e.g., via all= or internal=), the server would still broadcast its internal container IP for local access requests.

The Solution:
The method has been updated to respect the NetworkConfiguration. The logic priority is now:

  1. CLI/Startup Override (--published-server-url)
  2. Dashboard Configuration internal= override (Best for LAN access in NAT)
  3. Dashboard Configuration all= override
  4. Fallback to detected Network Interface IP (Standard behavior)

Fixes #15411

How to test

  1. Run Jellyfin in a Docker container (bridge mode).
  2. Navigate to Dashboard -> Networking.
  3. Set Published Server URIs to your actual LAN IP or Domain (e.g., all=http://192.168.1.50:8096).
  4. Connect a client (e.g., Android TV) and attempt to play a Live TV stream that triggers the GetApiUrlForLocalAccess logic (often Direct Stream).
  5. Before fix: Client receives http://172.x.x.x:8096... and fails/timeouts.
  6. After fix: Client receives http://192.168.1.50:8096... or https://mydomain.com... and plays successfully.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/15575 **Author:** [@martenumberto](https://github.com/martenumberto) **Created:** 11/19/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`6faf23e`](https://github.com/jellyfin/jellyfin/commit/6faf23e18db51d10fadae7cc7e286b222c8b8612) Respect Published Server URIs for local access URLs ### 📊 Changes **2 files changed** (+44 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CONTRIBUTORS.md` (+1 -0) 📝 `Emby.Server.Implementations/ApplicationHost.cs` (+43 -1) </details> ### 📄 Description ### Description This PR fixes an issue where Jellyfin returns unreachable internal IP addresses (e.g., Docker container IPs like `172.17.0.x`) to clients when `GetApiUrlForLocalAccess` is called. This behavior breaks functionality such as Live TV Direct Stream on Android TV clients running in a LAN environment different from the container's internal network. **The Problem:** Previously, `GetApiUrlForLocalAccess` checked for CLI startup overrides but ignored the "Published Server URIs" configured in the Web Dashboard (`NetworkConfiguration`). Consequently, even if a user configured a correct LAN URL (e.g., via `all=` or `internal=`), the server would still broadcast its internal container IP for local access requests. **The Solution:** The method has been updated to respect the `NetworkConfiguration`. The logic priority is now: 1. CLI/Startup Override (`--published-server-url`) 2. Dashboard Configuration `internal=` override (Best for LAN access in NAT) 3. Dashboard Configuration `all=` override 4. Fallback to detected Network Interface IP (Standard behavior) ### Related Issues Fixes #15411 ### How to test 1. Run Jellyfin in a Docker container (bridge mode). 2. Navigate to **Dashboard -> Networking**. 3. Set **Published Server URIs** to your actual LAN IP or Domain (e.g., `all=http://192.168.1.50:8096`). 4. Connect a client (e.g., Android TV) and attempt to play a Live TV stream that triggers the `GetApiUrlForLocalAccess` logic (often Direct Stream). 5. **Before fix:** Client receives `http://172.x.x.x:8096...` and fails/timeouts. 6. **After fix:** Client receives `http://192.168.1.50:8096...` or `https://mydomain.com...` and plays successfully. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:28:27 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#14352