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 port443instead of forcing users to remember IP addresses and:8096. - Hides your internal network topology: Keeps your internal LAN IPs, backend containers, and port
8096unreachable 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.
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

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 Proxy | Management Style | Best For | HTTP/3 (QUIC) |
| NGINX Proxy Manager (NPM) | Web GUI | Beginners wanting click-through setup and quick Let's Encrypt certs | No (HTTP/2 only) |
| SWAG (LinuxServer.io) | Config files + prebuilt templates | Power users wanting built-in Fail2Ban, CrowdSec mods, and Authelia | Yes |
| Traefik v3 | Docker Compose labels | Automated, label-driven Docker stacks | Yes |
(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 don't know if you're behind CGNAT, here's a 1 liner to tell you -
curl -sL https://corelab.tech/audit.sh | bashSign up for Core Labs and get my Server Hardening Script 😀
- 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. - DNS Records: An
A RecordorCNAMEpointingjellyfin.yourdomain.comto your home WAN IP. If you need to set this up check this Cloudflare guide out.- Do not enable the 'orange cloud' proxy for cloudflare, on your Jellyfin record!
- 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❗
- You can skip opening port 80 if you're using DNS-01 validation, vs http validation.
- 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.
- Something to run all this on, as a server. Click this link for [Media Server Hardware Builds].
- A reverse proxy! (Instructions below)
- Put your trusted proxy into the Jellyfin settings as per:

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!
⚓ 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:
- Put them on the same docker network (user defined bridge, default) or;
- Put them both on host mode network or;
- 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.
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:
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, notsubdomain.mydomain.tld)
Linuxserver.io Jellyfin (The one I use)
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 / Setting | Official (jellyfin/jellyfin) | LinuxServer.io (lscr.io/linuxserver/jellyfin) |
| User / Group Mapping | Uses Docker's user: "1000:1000" | Uses PUID=1000 and PGID=1000 env vars |
| Hardware Transcoding | Non-root user: requires group_add (render and video GIDs) | Startup scripts auto-detect /dev/dri GIDs and add abc to them |
| Cache Volume Path | Expects a separate /cache mount | Stores cache at /config/cache inside /config by default |
| File Ownership Fix | Assumes host bind-mount permissions already match user: | Recursively adjusts /config ownership at boot to match PUID/PGID |
| Base OS & Init | Debian slim, runs jellyfin directly | Ubuntu 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 sharedproxybridge 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 ports80/443and IP172.30.0.10at 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: trueStart 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
- Open
http://YOUR_SERVER_IP:81in a browser on your local network. - 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 port81accessible only on your local LAN (or over VPN). Never forward port81on your router.
Step 3: Add the Jellyfin Proxy Host
- Go to Proxy Hosts → Add Proxy Host.
- 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(Matchescontainer_name: jellyfinon the sharedproxynetwork.) - 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 Forbiddenerrors.
- Domain Names:
- Switch to the SSL tab:
- SSL Certificate: Request a new SSL Certificate (Leave Use a DNS Challenge off if ports
80and443are forwarded, or enable it with your Cloudflare API token if you prefer to keep port80closed.) - 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.
- SSL Certificate: Request a new SSL Certificate (Leave Use a DNS Challenge off if ports
- (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;- Click Save.
Step 4: Set Known Proxies in Jellyfin & Test
- Open Jellyfin locally and navigate to Dashboard → Networking.
- Confirm Allow remote connections to this server is checked.
- Under Known Proxies, enter
172.30.0.10and save (this ensures Jellyfin logs real visitor IP addresses fromX-Forwarded-Forrather than NPM's container IP). - 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.)
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:

- Navigate to your SWAG config folder:
/opt/appdata/swag/nginx/proxy-confs/. - Find the file
jellyfin.subdomain.conf.sample. - 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 - 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
For those who run a different type of NGINX, here's the optimized sample config:
## 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 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:
- Open
/config/nginx/ssl.conf. - Find the line for
Strict-Transport-Securityand 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.ymlto include the UDP port mapping:
ports:
- "80:80"
- "443:443/tcp"
- "443:443/udp" # <-- Critical for QUIC / HTTP/3 UDP traffic
To complete HSTS and QUIC in SWAG:
- Enable
reuseportonly once in/opt/appdata/swag/nginx/site-confs/default.conf(listen 443 quic reuseport;andlisten [::]:443 quic reuseport;). - Uncomment HSTS and add
Alt-Svcinside/opt/appdata/swag/nginx/ssl.conf(add_header Alt-Svc 'h3=":443"; ma=86400';andadd_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;—omitincludeSubDomainsif you still serve any other subdomain over plain HTTP). - 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 = 2500000Macvlan 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
- In
/config/nginx/ssl.conf, uncomment theAlt-Svcheader:
add_header Alt-Svc 'h3=":443"' always;
- Now, open your
/config/nginx/proxy-confs/jellyfin.subdomain.confand update thelistenlines 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
TCPtoTCP/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:
- 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!
- 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.
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
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.

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!

❓ 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



