• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support Troubleshooting Networking & Access SOLVED: Traefik Reverse proxy works with https but shows "Select Server" with http

     
    • 0 Vote(s) - 0 Average

    SOLVED: Traefik Reverse proxy works with https but shows "Select Server" with http

    davedv
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    #1
    2025-03-22, 07:29 AM (This post was last modified: 2025-03-22, 08:48 AM by davedv. Edited 1 time in total.)
    I have set up Jellyfin behind a Traefik reverse proxy, and I am trying to set up both https (from an external domain, jellyfin.mydomain.com) and http (with a jellyfin.local DNS) endpoints, both relaying to Jellyfin's http port.

    Things work fine with the external https endpoint, but when trying to use the http endpoint through my local URL, I get a Jellyfin screen asking me to "Select a server", and clicking on the server, leads to an error message "We're unable to connect to the selected server right now"We

    Switching the jellyfin.local config to an https endpoint and TLS works fine (but since I cannot have a properly-signed certificate, it's not ideal).

    I have tried turning on/off the different middleware options, and modifying values in the network.xml file, but nothing seems to work.

    Any idea what might be causing this?

    Relevant parts of Jellyfin's docker compose:

    Code:
    [...]
            labels:
                - "traefik.enable=true"
                # Remote
                - "traefik.http.routers.jellyfin_secure.rule=Host(`jellyfin.mydomain.com`)"
                - "traefik.http.routers.jellyfin_secure.entrypoints=https"
                - "traefik.http.routers.jellyfin_secure.tls=true"
                - "traefik.http.routers.jellyfin_secure.tls.certresolver=myresolver"
                - "traefik.http.routers.jellyfin_secure.service=jellyfin"
                - 'traefik.http.routers.jellyfin_secure.middlewares=jellyfin-mw'
                # Local:
                - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.local`)"
                - "traefik.http.routers.jellyfin.entrypoints=http"
                - "traefik.http.routers.jellyfin.service=jellyfin"
                - 'traefik.http.routers.jellyfin.middlewares=jellyfin-mw'
                # service
                - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"
                - 'traefik.http.services.jellyfin.loadBalancer.passHostHeader=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.customResponseHeaders.X-Robots-Tag=noindex,nofollow,nosnippet,noarchive,notranslate,noimageindex'
                - 'traefik.http.middlewares.jellyfin-mw.headers.STSSeconds=315360000'
                - 'traefik.http.middlewares.jellyfin-mw.headers.STSIncludeSubdomains=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.STSPreload=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.forceSTSHeader=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.frameDeny=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.contentTypeNosniff=true'
                - 'traefik.http.middlewares.jellyfin-mw.headers.customresponseheaders.X-XSS-PROTECTION=1'
            networks:
                - traefik_net

    networks:
        traefik_net:
            external: true  # Reuse the network from Traefik

    Network.xml is the default one.
    davedv
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    #2
    2025-03-22, 08:27 AM
    Additional info:

    disabling STS-specific headers in the middleware doesn't help:
    <code>
    # - 'traefik.http.middlewares.jellyfin-mw.headers.STSSeconds=315360000'
    # - 'traefik.http.middlewares.jellyfin-mw.headers.STSIncludeSubdomains=true'
    # - 'traefik.http.middlewares.jellyfin-mw.headers.STSPreload=true'
    # - 'traefik.http.middlewares.jellyfin-mw.headers.forceSTSHeader=true'
    </code>

    Relevant parts from Jellyfin's log:
    <code>
    [...]
    jellyfin | [custom-init] No custom files found, skipping...
    jellyfin | [09:24:27] [INF] [1] Main: Jellyfin version: 10.10.6
    jellyfin | [09:24:27] [INF] [1] Main: Environment Variables: ["[JELLYFIN_LOG_DIR, /config/log]", "[JELLYFIN_CONFIG_DIR, /config]", "[JELLYFIN_CACHE_DIR, /config/cache]", "[JELLYFIN_DATA_DIR, /config/data]", "[JELLYFIN_WEB_DIR, /usr/share/jellyfin/web]"]
    jellyfin | [09:24:27] [INF] [1] Main: Arguments: ["/usr/lib/jellyfin/bin/jellyfin.dll", "--ffmpeg=/usr/lib/jellyfin-ffmpeg/ffmpeg"]
    jellyfin | [09:24:27] [INF] [1] Main: Operating system: Ubuntu 24.04.2 LTS
    jellyfin | [09:24:27] [INF] [1] Main: Architecture: Arm64
    jellyfin | [09:24:27] [INF] [1] Main: 64-Bit Process: True
    jellyfin | [09:24:27] [INF] [1] Main: User Interactive: True
    jellyfin | [09:24:27] [INF] [1] Main: Processor count: 4
    jellyfin | [09:24:27] [INF] [1] Main: Program data path: /config/data
    jellyfin | [09:24:27] [INF] [1] Main: Log directory path: /config/log
    jellyfin | [09:24:27] [INF] [1] Main: Config directory path: /config
    jellyfin | [09:24:27] [INF] [1] Main: Cache path: /config/cache
    jellyfin | [09:24:27] [INF] [1] Main: Temp directory path: /tmp/jellyfin
    jellyfin | [09:24:27] [INF] [1] Main: Web resources path: /usr/share/jellyfin/web
    jellyfin | [09:24:27] [INF] [1] Main: Application directory: /usr/lib/jellyfin/bin/
    jellyfin | [09:24:27] [INF] [1] Emby.Server.Implementations.AppBase.BaseConfigurationManager: Setting cache path: /config/cache
    jellyfin | [09:24:28] [INF] [1] Emby.Server.Implementations.ApplicationHost: Loading assemblies
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Defined LAN exclusions: []
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Used LAN subnets: ["127.0.0.1/8", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered interface addresses: ["127.0.0.1", "172.18.0.3"]
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Bind Addresses ["0.0.0.0"]
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Remote IP filter is Allowlist
    jellyfin | [09:24:28] [INF] [1] Jellyfin.Networking.Manager.NetworkManager: Filtered subnets: []
    </code>
    davedv
    Offline

    Junior Member

    Posts: 3
    Threads: 1
    Joined: 2025 Mar
    Reputation: 0
    #3
    2025-03-22, 08:52 AM
    Seem to have found my solution: posting here for anyone who might land on this post:

    It turns out the main issue was with localstorage: deleting it after restarting the server, allowed me to log back in.
    I was emptying the cache, but did not realise that would still preserve localstorage (duh).

    Console logs showed the hint: "http request succeeded, but found a different server Id than what was expected"
    Worth noting that restarting the server (after changing misc middleware settings) seems to require emptying localstorage again (guess that resets the server ID?)

    In the end, that seemed to be the only issue (works with whatever middleware settings). IMHO this behaviour is slightly buggy and should display something more informative when server IDs mysteriously change…
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode