Jellyfin icon entered in the middle, surrounded by icons digitally connected to various reverse proxies.
SWAG, NPM, Traefik, oh my! Which reverse proxy will you pick for Jellyfin?

Secure Jellyfin with HTTPS: Reverse Proxy Guide (SWAG, NPM & Traefik)

Stop exposing port 8096. Set up Jellyfin behind SWAG, NGINX Proxy Manager, or Traefik for full HTTPS encryption and secure remote access.

Your Jellyfin server is up, your metadata is clean, and local playback works smoothly. Now you want to stream from anywhere - without leaving your home network wide open.

Forwarding port 8096 straight to the internet is the fastest shortcut, and also the riskiest:

  • Unencrypted credentials and tokens: Without HTTPS, anyone between your client and your server (such as public airport or hotel Wi-Fi) can intercept login traffic and API keys in plaintext.
  • Direct backend exposure: Automated scanners continuously sweep residential IP ranges for port 8096, probing Jellyfin directly with zero rate-limiting or request filtering in front of it.
The standard fix for shared servers is placing a Reverse Proxy in front of Jellyfin.
  • ❌ No HTTPS encryption (your data travels in plain text)
  • ❌ Your public IP is exposed to bots and scanners
  • ❌ Login credentials can be intercepted

This guide shows how to securely expose Jellyfin using a reverse proxy with HTTPS.



What Is a Reverse Proxy (and What Does It Actually Hide)?🤔

A reverse proxy acts as the single front door for your self-hosted services. Instead of exposing Jellyfin's raw HTTP port (8096) to the internet, your router forwards only standard web ports (80/443) to the proxy, which terminates TLS encryption and forwards clean requests to Jellyfin over an isolated internal network:

  • Encrypts all external traffic: Automatically issues and renews free Let's Encrypt TLS certificates so every login, API call, and video stream travels over HTTPS.
  • Gives you clean URLs: Routes [https://jellyfin.yourdomain.com](https://jellyfin.yourdomain.com) on standard port 443 instead of forcing users to remember IP addresses and :8096.
  • Hides your internal network topology: Keeps your internal LAN IPs, backend containers, and port 8096 unreachable directly from the internet, while giving you a central choke point for brute-force blocking (Fail2Ban or CrowdSec) and firewall inspection.
Important Security Clarification: A reverse proxy hosted at home does not hide your home's public WAN IP from public DNS lookups or port scanners - your domain's A record still resolves directly to your router. What it hides is your internal server IP and raw application ports behind an encrypted, inspectable gateway. If you need to mask your home WAN IP altogether, route traffic through a lightweight VPS WireGuard tunnel or Cloudflare-free relay instead.
Reverse proxies have been protecting web servers for decades.

A reverse proxy sits between the internet and your Jellyfin server, acting as a secure gateway:

  • 🔒 Encrypts traffic with HTTPS (SSL/TLS)
  • 🌐 Routes your domain (e.g., jellyfin.yourdomain.com)
  • 🛡️ Hides your internal network and server IP
Infographic of 3 popular reverse proxies: NGINX proxy manager, SWAG, Traefik.
3 types of excellent reverse proxies.

Reverse proxies have been around since the mid 1990's and have been powering the entire internet since then, and well into today. If you're accessing any website (including this one!) you're literally going through a reverse proxy.

There's also a firewall not shown in the graphic above, but that would sit in front of the reverse proxy as well. The firewall & reverse proxy also have additional security features like brute force protection, IDS/IPS, web application filtering etc, to make an entire security stack, eyeballing all ingress traffic!

Before You Start: Do You Need a Public Reverse Proxy?

If you are the only user (or only sharing with one or two trusted devices like laptops and phones), consider Tailscale or WireGuard first. A mesh VPN gives you encrypted remote access to Jellyfin with zero open ports on your router and zero public attack surface.

Stick with a reverse proxy when you stream from Smart TVs, Roku, Apple TVs, or shared family devices where installing a VPN client isn't practical.

Choose Your Reverse Proxy

This guide walks through the three most widely used Docker reverse proxies for Jellyfin:

Reverse ProxyManagement StyleBest ForHTTP/3 (QUIC)
NGINX Proxy Manager (NPM)Web GUIBeginners wanting click-through setup and quick Let's Encrypt certsNo (HTTP/2 only)
SWAG (LinuxServer.io)Config files + prebuilt templatesPower users wanting built-in Fail2Ban, CrowdSec mods, and AutheliaYes
Traefik v3Docker Compose labelsAutomated, label-driven Docker stacksYes

(Prefer minimal text config over NGINX or Traefik? Caddy is another lightweight alternative—a three-line Caddyfile handles automatic HTTPS and reverse proxying to jellyfin:8096 with zero boilerplate.)


📋 Prerequisites

Before you start, ensure you have the following ready. If you are missing these, check my guides.

📡
If you're behind CG-NAT / Double NAT - you'll have to follow a different guide - Running Jellyfin/Plex behind CGNAT.

If you don't know if you're behind CGNAT, here's a 1 liner to tell you - curl -sL https://corelab.tech/audit.sh | bash

Sign up for Core Labs and get my Server Hardening Script 😀
  1. A Domain Name: You need a real domain (e.g., myflix.com), not just an IP address. Buy one from wherever you can find a domain name cheap! Sometimes you can get them for $5 a year. I use Hover a lot, and Cloudflare sometimes.
  2. DNS Records: An A Record or CNAME pointing jellyfin.yourdomain.com to your home WAN IP. If you need to set this up check this Cloudflare guide out.
    1. Do not enable the 'orange cloud' proxy for cloudflare, on your Jellyfin record!
  3. Port Forwarding: Ports 80 (HTTP) and 443 (HTTPS) must be forwarded from your router/firewall to your server's local IP. Do NOT forward 8096❗
    1. You can skip opening port 80 if you're using DNS-01 validation, vs http validation.
  4. Docker Network: Create a dedicated bridge network so your proxy can "talk" to Jellyfin as they will both be dockers. Read up on docker networks on my docker compose guide if needed.
  5. Something to run all this on, as a server. Click this link for [Media Server Hardware Builds].
  6. A reverse proxy! (Instructions below)
  7. Put your trusted proxy into the Jellyfin settings as per:
CTA Image

Have you ever wished you could start a library scan, reset a user's password or see when your download will be completed right from the comfort of your own couch? Here's the mobile Jellyfin management app for you!

Read My JellyWatch Review & Setup Guide

⚓ Prepare Your Jellyfin Network (Universal Step)

No matter which proxy you choose, your Jellyfin container needs to be on the right network. If it's on host networking, that's fine but if your reverse proxy is not, you'll need to make some modifications to allow them to talk to each other.

Three Options, starting with simple to most complex:

  1. Put them on the same docker network (user defined bridge, default) or;
  2. Put them both on host mode network or;
  3. If one is on host networking and another in a docker network, you'll have to make a 'shim' network between the docker network and your host for them to talk.

If you're just starting out, option 1 or 2 is what I suggest! Setting up MACVLAN or IPVLAN docker networking is over here.

⚡
Cybersecurity Considerations: Options 1 through 3 all rely on the reverse proxy (SWAG/NGINX) protecting your traffic. If there was a zero day or your reverse proxy is hacked, the attacker gains access to your Jellyfin, and/or whatever else is connected to and talking on that docker network.

Reverse proxies like NGINX are widely trusted and battle-tested, but proper network segmentation adds an extra layer of protection.

Ultimate Security Guide - Advanced!

If you want the most security you can, hosting services at home, you need to put your reverse proxy in it's own VLAN (Think DMZ).

This way, if your proxy is hacked/bypassed etc, the attacker is 'stuck' in only that VLAN with no other services exposed. They would have to then hack through your firewall to break out of that VLAN. This is known as "attack surface reduction" and is very widely used across Corporate, Industry and Government networks.

How do I do this you ask?

The "True DMZ" (Macvlan + Firewall Routing)Setup:SWAG is on a macvlan network on VLAN 50 (DMZ). It has NO other interfaces. Jellyfin is on the Host network or a separate VLAN 10 (Trusted). Connection: SWAG sends traffic to its "Default Gateway" (OPNsense). OPNsense has a Firewall Rule allowing DMZ -> Server_VLAN (Port 8096).

Obviously this means you must have a firewall/router capable of doing the job.Security Level: Maximum (Enterprise Grade). The Big Win:IPS/IDS: Your OPNsense (Suricata) can inspect the traffic between Nginx and Jellyfin. It sees the internal request.Segmentation: If SWAG is hacked, the attacker is trapped in VLAN 50. They cannot see Jellyfin or your NAS unless they can defeat your OPNsense firewall rules.This is the best way to protect your internal services from the outside world while still serving things publicly!

Edit your existing Jellyfin docker-compose.yml to set it up with the network scheme you've planned thus far and fire it backup!

Official Jellyfin image & Compose:

LINUX / DOCKER docker-compose.yml (Universal Jellyfin)
Bridge Network + QSV Transcode
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    user: 1000:1000
    networks:
      - proxy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - JELLYFIN_PublishedServerUrl=https://jellyfin.yourdomain.com
    volumes:
      # High-IOPS NVMe AppData (database, metadata, trickplay cache)
      - /docker/containers/media/jellyfin/config:/config
      - /docker/containers/media/jellyfin/cache:/cache
      # RAM disk scratch path (protects NVMe write endurance during transcoding)
      - /dev/shm:/transcode
      # Bulk media read-only storage mounts
      - /brain/media/movies:/data/movies:ro
      - /brain/media/tv:/data/tv:ro
    devices:
      # Hardware transcode passthrough (Intel QuickSync / AMD VA-API)
      - /dev/dri:/dev/dri

networks:
  proxy:
    external: true

Recreate the container: docker compose up -d.

In Jellyfin (Dashboard → Networking), set:

  • Allow remote connections to this server: Checked
  • Known Proxies: 172.30.0.10 (the pinned proxy IP, not subdomain.mydomain.tld)

Linuxserver.io Jellyfin (The one I use)

LINUX / DOCKER docker-compose.yml (Universal Jellyfin)
Bridge Network + QSV Transcode
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    user: 1000:1000
    networks:
      - proxy
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - JELLYFIN_PublishedServerUrl=https://jellyfin.yourdomain.com
    volumes:
      # High-IOPS NVMe AppData (database, metadata, trickplay cache)
      - /docker/containers/media/jellyfin/config:/config
      - /docker/containers/media/jellyfin/cache:/cache
      # RAM disk scratch path (protects NVMe write endurance during transcoding)
      - /dev/shm:/transcode
      # Bulk media read-only storage mounts
      - /brain/media/movies:/data/movies:ro
      - /brain/media/tv:/data/tv:ro
    devices:
      # Hardware transcode passthrough (Intel QuickSync / AMD VA-API)
      - /dev/dri:/dev/dri

networks:
  proxy:
    external: true

Key Differences from the Official Image

Behavior / SettingOfficial (jellyfin/jellyfin)LinuxServer.io (lscr.io/linuxserver/jellyfin)
User / Group MappingUses Docker's user: "1000:1000"Uses PUID=1000 and PGID=1000 env vars
Hardware TranscodingNon-root user: requires group_add (render and video GIDs)Startup scripts auto-detect /dev/dri GIDs and add abc to them
Cache Volume PathExpects a separate /cache mountStores cache at /config/cache inside /config by default
File Ownership FixAssumes host bind-mount permissions already match user:Recursively adjusts /config ownership at boot to match PUID/PGID
Base OS & InitDebian slim, runs jellyfin directlyUbuntu base with s6-overlay process supervision and LSIO Docker Mods

Choose Your Reverse Proxy Solution 🗺️

🟢 Nginx Proxy Manager (Easy GUI Option)

Best for: Beginners who want a clean web dashboard instead of editing NGINX config files by hand.

Network Note: Before deploying NPM, make sure you created the shared proxy bridge network from the Universal Jellyfin setup (docker network create --subnet=172.30.0.0/24 --gateway=172.30.0.1 proxy). Only run one reverse proxy on ports 80/443 and IP 172.30.0.10 at a time.

Step 1: Deploy NGINX Proxy Manager

Create a directory for NPM (for example /docker/containers/npm) and save the following docker-compose.yml:

services:
  npm:
    image: jc21/nginx-proxy-manager:latest
    container_name: nginx-proxy-manager
    restart: unless-stopped
    ports:
      - "80:80/tcp"   # Required for HTTP-01 Let's Encrypt validation & HTTP->HTTPS redirects
      - "443:443/tcp" # Public HTTPS traffic
      - "81:81/tcp"   # Admin Web UI (LAN ONLY — NEVER forward port 81 on your router!)
    volumes:
      - /docker/containers/npm/data:/data
      - /docker/containers/npm/letsencrypt:/etc/letsencrypt
    networks:
      proxy:
        # Pin a static internal IP so Jellyfin's "Known Proxies" trusts only NPM
        ipv4_address: 172.30.0.10

networks:
  proxy:
    external: true

Start the stack and confirm the container is running:

docker compose up -d
docker ps --filter "name=nginx-proxy-manager"

Step 2: Log In to the Admin Dashboard

  1. Open http://YOUR_SERVER_IP:81 in a browser on your local network.
  2. Follow the initial setup screen to create your administrator account (if running an older image version that prompts directly for login, the initial default is [email protected] / changeme—update both immediately).
Critical: Keep port 81 accessible only on your local LAN (or over VPN). Never forward port 81 on your router.

Step 3: Add the Jellyfin Proxy Host

  1. Go to Proxy Hosts → Add Proxy Host.
  2. Configure the Details tab:
    • Domain Names: jellyfin.yourdomain.com
    • Scheme: http (TLS terminates at NPM; internal traffic to Jellyfin stays HTTP over the isolated Docker bridge.)
    • Forward Hostname / IP: jellyfin (Matches container_name: jellyfin on the shared proxy network.)
    • Forward Port: 8096
    • Cache Assets: OFF (Jellyfin manages its own image and stream caching; caching here can break artwork updates and playback.)
    • Websockets Support: ON (Required for live playback status, remote control, and SyncPlay.)
    • Block Common Exploits: Optional. Start with it ON, but toggle it OFF if Jellyfin search queries or third-party clients hit unexplained 403 Forbidden errors.
  3. Switch to the SSL tab:
    • SSL Certificate: Request a new SSL Certificate (Leave Use a DNS Challenge off if ports 80 and 443 are forwarded, or enable it with your Cloudflare API token if you prefer to keep port 80 closed.)
    • Force SSL: ON
    • HTTP/2 Support: ON
    • HSTS Enabled: Leave OFF until you verify HTTPS works reliably. Avoid HSTS Subdomains unless every service on your domain uses HTTPS.
  4. (Optional) Switch to the Advanced tab and paste these two lines into Custom Nginx Configuration to prevent stream buffering and large upload rejections:
proxy_buffering off;
client_max_body_size 0;
  1. Click Save.

Step 4: Set Known Proxies in Jellyfin & Test

  1. Open Jellyfin locally and navigate to Dashboard → Networking.
  2. Confirm Allow remote connections to this server is checked.
  3. Under Known Proxies, enter 172.30.0.10 and save (this ensures Jellyfin logs real visitor IP addresses from X-Forwarded-For rather than NPM's container IP).
  4. Visit [https://jellyfin.yourdomain.com](https://jellyfin.yourdomain.com) from a phone on cellular data (off home Wi-Fi) to confirm the TLS padlock appears and playback starts cleanly.

(Note: Standard NGINX Proxy Manager supports HTTP/2 rather than QUIC/HTTP/3. If you want HTTP/3 transport for mobile streaming, use the SWAG or Traefik v3 setups below.)

⚡
If you have issues, take a look at the example below from SWAG NGINX, it should help or give you some clues.

Go to https://jellyfin.yourdomain.com. You should see the login screen with a secure padlock.


🛡️ SWAG (Power User Nginx Setup)

Best for: Users who want built-in security (Fail2Ban & CrowdSec) and don't require a GUI. Automated certificate enrollment & renewals as well, and Authelia integration for MFA!

SWAG is currently serving this site, my Jellyfin instance, and is my favourite reverse proxy by far.

SWAG (Secure Web Application Gateway) by LinuxServer.io is Nginx on steroids. It comes with pre-written configuration files for almost every app in existence.

SWAG includes a template for Jellyfin. You just need to turn it on. For detailed setup guide on SWAG hop on this link:

Self-Hosting SWAG: The Ultimate NGINX Reverse Proxy Guide (2026 Edition)
Forget Nginx Proxy Manager. Learn how to set up LinuxServer.io SWAG with CrowdSec, Authelia, and the new Dashboard Mod for a secure, automated reverse proxy stack.
  1. Navigate to your SWAG config folder: /opt/appdata/swag/nginx/proxy-confs/.
  2. Find the file jellyfin.subdomain.conf.sample.
  3. Rename it to jellyfin.subdomain.conf (remove the .sample). This is done by doing a 'move' command: mv /opt/appdata/swag/nginx/proxy-confs/jellyfin.subdomain.conf.sample /opt/appdata/swag/nginx/proxy-confs/jellyfin.subdomain.conf
  4. Restart SWAG: docker restart swag.

That's it. SWAG detects the file, reads the pre-optimized Nginx rules, and starts serving jellyfin.yourdomain.com.

SWAG Service Snippet (for HTTP/3 & Static Known Proxy IP)

Ensure your SWAG Compose definition maps 443/udp for QUIC/HTTP/3 and pins its IP on the proxy bridge:

📄 View Full YAML Configuration (Click to Expand)

services:
  swag:
    image: lscr.io/linuxserver/swag:latest
    container_name: swag
    restart: unless-stopped
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/Toronto
      - URL=yourdomain.com
      - SUBDOMAINS=wildcard
      - VALIDATION=dns
      - DNSPLUGIN=cloudflare
    volumes:
      - /opt/appdata/swag:/config
    ports:
      - "443:443/tcp"
      - "443:443/udp" # Required for QUIC / HTTP/3
      # Port 80 is only needed for HTTP-01 validation or HTTP->HTTPS redirects;
      # leave closed if using DNS-01 validation above.
      # - "80:80/tcp"
    networks:
      proxy:
        ipv4_address: 172.30.0.10

networks:
  proxy:
    external: true
        
🪼
You may have to change the $upstream_app in the config from jellyfin to the IP of it, or whatever you named that docker. Maybe you named it jf? Jelly?

For those who run a different type of NGINX, here's the optimized sample config:

NGINX / SWAG jellyfin.subdomain.conf
Zero-Trust & WebOS Ready
## Core Lab Production SWAG Reverse Proxy Configuration
# Upstream container: jellyfin (port 8096)
# Subdomain routing: jellyfin.yourdomain.com

server {
    listen 443 ssl;
#    listen 443 quic;
    listen [::]:443 ssl;
#    listen [::]:443 quic;

    server_name jellyfin.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app jellyfin;
        set $upstream_port 8096;
        set $upstream_proto http;
        if ($http_user_agent ~ Web0S) {
            add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
        }
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_set_header Range $http_range;
        proxy_set_header If-Range $http_if_range;
    }

    location ~ (/jellyfin)?/socket {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app jellyfin;
        set $upstream_port 8096;
        set $upstream_proto http;
        if ($http_user_agent ~ Web0S) {
            add_header Access-Control-Allow-Origin "luna://com.webos.service.config" always;
        }
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }

    # Restrict access to /metrics (LAN monitoring only)
    location /metrics {
        allow 192.168.0.0/16;
        allow 10.0.0.0/8;
        allow 172.16.0.0/12;
        allow 127.0.0.0/8;
        deny all;

        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
        set $upstream_app jellyfin;
        set $upstream_port 8096;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

Raw link to that, for the latest example from SWAG: https://github.com/linuxserver/reverse-proxy-confs/blob/master/jellyfin.subdomain.conf.sample

😀
SWAG is how you're reading Core Lab Blog right now❗

🚀 SWAG Performance & Security Optimizations

Now that your green lock is active, it’s time to squeeze every bit of performance and security out of SWAG. We’re going to focus on two major upgrades: HSTS (to lock down the connection) and QUIC/HTTP3 (to make Jellyfin feel instantaneous on mobile or high-latency networks).

1. Hardening with HSTS (Security)

By default, SWAG keeps HSTS (HTTP Strict Transport Security) disabled to prevent you from accidentally locking yourself out if you decide to kill your SSL certificate. But for a permanent setup, it’s a must.

The Fix:

  1. Open /config/nginx/ssl.conf.
  2. Find the line for Strict-Transport-Security and uncomment it:
add_header Strict-Transport-Security "max-age=15768000; includeSubDomains" always;

WARNING: If you move away from / disable HTTPS, or lose your domain, browsers will refuse to connect for the length of this setting!

This tells browsers: "For the next 6 months, don't even try to talk to this domain over insecure HTTP."

2. Enabling QUIC & HTTP/3 (Performance)

Standard HTTPS runs over TCP. HTTP/3 runs over UDP, which is significantly faster for streaming because it handles "packet loss" much more gracefully - perfect for that 4K Jellyfin stream on a shaky 5G connection. It's 'lossy' which means if a packet drops, it ignores it and keeps blasting out the video stream!

This is a guide config to get you going, but if you'd like step by step later, jump to my complete Jellyfin QUIC guide.

Step A: Open the UDP Gates (Docker)

For HTTP/3 to work, your container must be able to receive UDP traffic on port 443.

  • Standard Docker/Bridge Users: You must update your reverse proxy/SWAG docker-compose.yml to include the UDP port mapping:
LINUX / DOCKER docker-compose.yml (SWAG UDP Port Mapping)
HTTP/3 UDP Ready
ports:
  - "80:80"
  - "443:443/tcp"
  - "443:443/udp" # <-- Critical for QUIC / HTTP/3 UDP traffic

To complete HSTS and QUIC in SWAG:

  1. Enable reuseport only once in /opt/appdata/swag/nginx/site-confs/default.conf (listen 443 quic reuseport; and listen [::]:443 quic reuseport;).
  2. Uncomment HSTS and add Alt-Svc inside /opt/appdata/swag/nginx/ssl.conf (add_header Alt-Svc 'h3=":443"; ma=86400'; and add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;—omit includeSubDomains if you still serve any other subdomain over plain HTTP).
  3. On the Linux host, raise UDP socket buffers for stable QUIC throughput via /etc/sysctl.d/99-quic.conf:
net.core.rmem_max = 2500000
net.core.wmem_max = 2500000

Macvlan Users: If you are running SWAG on a macvlan network (giving the container its own IP on your LAN), you can ignore the port mappings in your compose file. The container already has full access to its own interface.

Step B: The Header & The Listen Directive

  1. In /config/nginx/ssl.conf, uncomment the Alt-Svc header:
add_header Alt-Svc 'h3=":443"' always;
  1. Now, open your /config/nginx/proxy-confs/jellyfin.subdomain.conf and update the listen lines to support the QUIC protocol:
server {
    listen 443 ssl;              # Standard TCP
    listen 443 quic reuseport;   # HTTP/3 UDP

    # ... rest of your config
}

Step C: The OPNsense Firewall (The "Gotcha")

If you are an OPNsense user, your existing WAN rule probably only allows TCP 443 to your reverse proxy.

  • Navigate to Firewall > Rules (new) > WAN.
  • Find your HTTPS rule and change the protocol from TCP to TCP/UDP. Without this, the UDP packets will be dropped at the perimeter, and your server will fallback to the slower HTTP/2.

🛠️ Verification: Did it work?

Don't just take my word for it. Let’s verify the "Blue Team" way:

  1. The Header Check: Head over to https://securityheaders.com/ and then https://ssllabs.com/ssltest/ scan your domain. If you enabled HSTS correctly, your grade should jump significantly!
  2. The Protocol Check:
    • Open Jellyfin in Chrome or Edge.
    • Press F12 and go to the Network tab.
    • Right-click the table header and check the Protocol column.
    • If you see h3, you are officially living in the future. If it says h2, re-check your UDP port mappings and firewall rules.
Performance Deep Dive Dedicated Tuning Guide ➔

Turbocharge Jellyfin Streaming: Enabling QUIC (HTTP/3) via SWAG

Want to eliminate remote video buffering on cellular networks and hotel Wi-Fi? Read my dedicated companion guide covering OPNsense UDP port 443 Destination NAT forwarding, anti-reflection security headers (quic_retry on), and browser DevTools protocol validation.


🚦 Traefik (Docker Label-Based Routing)

Best for: Docker users who want automation and scalability.

Unlike Nginx-based setups, Traefik doesn’t rely on config files.
Instead, it watches your Docker containers and automatically routes traffic using labels.

This means:

  • No manual proxy configs
  • No per-app Nginx files
  • Just spin up a container → it’s live with HTTPS

🧠 How Traefik Works (Quick Mental Model)

With Traefik, your routing is defined like this:

  • Router → “Which domain?”
  • Service → “Which container + port?”
  • Middleware → “Any rules (redirects, headers, auth)?”

All of that is defined via Docker labels.

🧱 Minimal Working Docker Compose (Traefik + Jellyfin)

This is a clean, modern, working baseline using:

  • Docker provider
  • Let’s Encrypt (HTTP challenge)
  • Single shared network

📁 docker-compose.yml

LINUX / DOCKER docker-compose.yml (Traefik + Jellyfin)
Traefik v2.11 + Let's Encrypt
version: "3.8"

networks:
  proxy:
    name: proxy
    driver: bridge

services:
  traefik:
    image: traefik:v2.11
    container_name: traefik
    restart: unless-stopped
    command:
      - "--api.dashboard=true"
      - "--api.insecure=false"
      # Docker provider
      - "--providers.docker=true"
      - "--providers.docker.exposedbydefault=false"
      - "--providers.docker.network=proxy"
      # Entry points
      - "--entrypoints.web.address=:80"
      - "--entrypoints.websecure.address=:443"
      # Redirect HTTP → HTTPS
      - "--entrypoints.web.http.redirections.entrypoint.to=websecure"
      - "--entrypoints.web.http.redirections.entrypoint.scheme=https"
      # Let's Encrypt automated SSL
      - "[email protected]"
      - "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
      - "--certificatesresolvers.le.acme.httpchallenge.entrypoint=web"
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "./letsencrypt:/letsencrypt"
    networks:
      - proxy

  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    networks:
      - proxy
    volumes:
      - ./config:/config
      - ./cache:/cache
      - ./media:/media
    labels:
      - "traefik.enable=true"
      # Router
      - "traefik.http.routers.jellyfin.rule=Host(`jellyfin.yourdomain.com`)"
      - "traefik.http.routers.jellyfin.entrypoints=websecure"
      - "traefik.http.routers.jellyfin.tls.certresolver=le"
      # Service (IMPORTANT)
      - "traefik.http.services.jellyfin.loadbalancer.server.port=8096"

⚠️ Critical Things People Mess Up (Read This)

This is where most Traefik setups fail:

1. ❌ Forgetting the service port

You must define:

traefik.http.services.jellyfin.loadbalancer.server.port=8096

Jellyfin does NOT run HTTPS internally—only HTTP on 8096.

2. ❌ Not using a shared Docker network

Traefik and Jellyfin must be on the same network:

networks:
- proxy

Traefik routes container-to-container, not via host IP.

3. ❌ Exposing port 8096 publicly

Don’t do this:

ports:
- "8096:8096"

That bypasses your proxy and defeats the entire point.

4. ❌ No real domain

Let’s Encrypt requires a public domain pointing to your server.

🧪 Test It

After running:

docker compose up -d

Visit:

https://jellyfin.yourdomain.com

You should get:

  • ✅ Valid HTTPS certificate
  • ✅ Jellyfin login page
  • ✅ No exposed internal ports

⚠️ Common Jellyfin Reverse Proxy Issues (Fixes)

Setting up the proxy is only half the battle. If your TV or Phone app can't connect, check these settings inside the Jellyfin Dashboard.

1. Allow Remote Connections

Go to Dashboard -> Networking.

Ensure "Allow remote connections to this server" is checked. If this is off, Jellyfin will reject any traffic that doesn't originate from 192.168.x.x (which includes your proxy!).

2. Known Proxies (The "X-Forwarded-For" Fix)

Sometimes, Jellyfin thinks all traffic is coming from the Proxy's IP (e.g., 172.18.0.2) rather than the real user's IP. This breaks bandwidth limiting and logging.

  • In Dashboard -> Networking -> Known Proxies:
  • Add the IP range of your Docker network (e.g., 172.18.0.0/16) or the specific Gateway IP of your proxy container.

3. HTTPS Settings (Important!)

First - in the Jellyfin Advanced/Networking tab, you will see fields for "Certificate Path" and "HTTPS Port".

Second - Advanced/Networking add subdomain.mydomain.tld as a known proxy.

Your Reverse Proxy is handling the HTTPS (TLS Termination). The traffic between the Proxy and Jellyfin should remain HTTP (Port 8096) to keep things fast and simple inside your LAN.

  • Hamburger menu (top left)->Dashboard->Networking

Here's what those settings look like:

You should also add your RFC1918 /24 LAN subnet in the LAN networks setting too.


📱 Connect Jellyfin Apps Remotely

When you open the Jellyfin app on your Android TV, Roku, or iOS device, it will ask for a server address.

  • Do NOT enter: 192.168.1.50:8096 (This only works at home).
  • Do enter: https://jellyfin.yourdomain.com.

Pro Tip: You do not need to add :443 to the end. HTTPS implies port 443 automatically.


Conclusion

You now have a globally accessible, fully encrypted media powerhouse.

  • Used NPM? Enjoy the easy dashboard management.
  • Used SWAG? Rest easy knowing Fail2Ban is watching your back.
  • Used Traefik? Enjoy the automation as you spin up more services.

Now that your stream is secure, you're able to share it to fam & friends! Maybe it's time to upgrade your library storage or prepare for inevitable transcoding woes.

Core Lab Hardware Shop
Battle-tested homelab servers, mini-PCs, enterprise recertified storage, transcoding GPUs, and multi-gigabit networking gear. Built, bench-tested, and verified in the lab.

Another option, is mobile management of your new server! Say you're sitting on the couch and don't have a laptop handy, and don't want to pinch & squeeze and squint on your phone to trigger a library update? Check out JellyWatch!

JellyWatch Review: The Best Jellyfin Admin & Monitoring App for Android
Always wanted a mobile native app to manage Jellyfin? Discover JellyWatch - an Android app with “Arr” integration, real-time stats, and a killer “Watch Pass” feature.

❓ Frequently Asked Questions (FAQ)

Do I need to open port 8096 to access Jellyfin remotely?

No — and you shouldn't. Forwarding port 8096 directly exposes Jellyfin's unencrypted traffic and your public IP to every bot scanner on the internet. Instead, forward only ports 80 and 443 to a reverse proxy (NPM, SWAG, or Traefik), which handles HTTPS and forwards traffic internally to Jellyfin over your Docker network.

Which reverse proxy should I use for Jellyfin: NPM, SWAG, or Traefik?

Nginx Proxy Manager is the easiest choice if you want a visual dashboard and are just starting out. SWAG is the best fit if you want built-in security (Fail2Ban, CrowdSec) and automated certificate renewal without a GUI — it's what's serving this very blog. Traefik is best for Docker-heavy setups where you want new services to get HTTPS automatically via labels, with no manual config files per app.

Why is my Jellyfin app rejecting connections through the proxy?

Check Dashboard > Networking and make sure "Allow remote connections to this server" is enabled — without it, Jellyfin rejects any traffic that isn't from your local subnet, including your own reverse proxy. You should also add your proxy's Docker network range (or its container's gateway IP) under "Known Proxies" so Jellyfin sees real client IPs instead of the proxy's internal IP.

Should the connection between my reverse proxy and Jellyfin use HTTPS?

No — keep it plain HTTP. Your reverse proxy handles TLS termination for the public-facing connection; the internal hop between the proxy and Jellyfin (port 8096) stays HTTP because it's already inside your trusted Docker network or LAN, which keeps things simpler and faster.

What address do I enter in the Jellyfin app on my TV or phone?

Use your public HTTPS domain — e.g. https://jellyfin.yourdomain.com — not your local IP like 192.168.1.50:8096, which only works on your home network. You don't need to add :443 manually; HTTPS implies that port automatically.

Can I get better performance out of my Jellyfin reverse proxy?

Yes — two upgrades help the most. Enabling HSTS locks browsers into HTTPS-only for your domain (make sure your cert is stable before doing this). Enabling QUIC/HTTP3 lets streaming traffic run over UDP instead of TCP, which tolerates packet loss far better — ideal for 4K playback on shaky Wi-Fi or mobile connections. Both require updating your reverse proxy config and, if you run OPNsense, changing your WAN firewall rule from TCP-only to TCP/UDP.

Written by

Core Lab Joe
Core Lab Joe
Dad, IT guy, Self-Hosting Evangelist! https://www.reddit.com/r/corelabtech/
corelab.tech
Facebook
Mastodon

On this page

What's Next?