Plex and Jellyfin in Docker: Compose files, ports, volumes and GPU passthrough
Short answer
- Jellyfin: image
jellyfin/jellyfin, ports 8096/tcp and 7359/udp, volumes/config,/cache,/media. - Plex: image
plexinc/pms-docker, host networking is simplest, claim token from plex.tv/claim on first run. - Keep config on local disk. Plex warns NFS and SMB often corrupt its database.
- GPU transcoding: pass
/dev/driin. It is free on Jellyfin and needs Plex Pass on Plex.
Docker is the most common way to run a home media server: one folder for settings, one for media, and an update is a single pull. Here are working Compose files for Jellyfin and Plex Media Server, the ports each needs, how to pass in a GPU, and the mistakes that bite people.
Jellyfin vs Plex in Docker
| Jellyfin | Plex Media Server | |
|---|---|---|
| Image | jellyfin/jellyfin | plexinc/pms-docker |
| Ports | 8096/tcp (web), 7359/udp (client discovery) | Host networking needs none. Bridge mode: 32400, 3005, 8324, 32469 (TCP) and 1900, 32410, 32412, 32413, 32414 (UDP) |
| Volumes | /config, /cache, /media | /config, /transcode, /data |
| First-run login | Local admin account made in the browser | Claim token from plex.tv/claim in PLEX_CLAIM |
| Hardware transcoding | Free. Pass the GPU device in | Needs Plex Pass. Pass the GPU device in |
| Supported host | Linux only for containers | Linux. The Plex README calls Docker on Windows "not recommended" |
Jellyfin Docker Compose
This is the layout from the official Jellyfin docs. Change the paths and the user ID to match your host.
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
user: 1000:1000
ports:
- "8096:8096/tcp"
- "7359:7359/udp"
volumes:
- /path/to/config:/config
- /path/to/cache:/cache
- type: bind
source: /path/to/media
target: /media
read_only: true
restart: unless-stopped
- Open the web UI at
http://SERVER_IP:8096and finish setup there. Add/mediaas your library folder. - Pin a version if you want to control upgrades. Tags exist for a major (
12), a minor, or an exact release.latestfollows the newest stable. Jellyfin has no downgrade path, so back up before a major jump (see backup and migration). - DLNA needs host networking. If you switch to
network_mode: host, remove theportsblock. - Podman and SELinux: the docs call for
:Zvolume labels,--userns keep-id, and opening 8096/tcp and 7359/udp in the firewall yourself.
Plex Media Server Docker Compose
Plex documents the container as docker run options. Translated to Compose, with host networking (the simplest option):
services:
plex:
image: plexinc/pms-docker:latest
container_name: plex
network_mode: host
environment:
- TZ=America/New_York
- PLEX_CLAIM=claim-xxxxxxxx
- PLEX_UID=1000
- PLEX_GID=1000
volumes:
- /path/to/plex/config:/config
- /path/to/plex/transcode:/transcode
- /path/to/media:/data
restart: unless-stopped
- Claim token: get it at plex.tv/claim and paste it in before the first start. The variables only apply on first run, and the token is ignored if the server is already signed in.
- PLEX_UID and PLEX_GID should match the host user that owns your media, or Plex cannot read the files.
- Bridge networking works but needs the port list above plus
ADVERTISE_IP=http://HOST_IP:32400/. For remote access, forward 32400 on your router. Setting up LAN Networks in Plex needs Plex Pass. - Headless host: with host networking and no claim token, first-run setup only appears from localhost. Use an SSH tunnel to
localhost:32400/web. - Update:
docker restart plexalso upgrades the server, per Plex.
Passing in a GPU for transcoding
For Intel Quick Sync on Linux, add devices: ["/dev/dri:/dev/dri"] to either file. On Jellyfin, also add your host's render group ID under group_add (find it with getent group render | cut -d: -f3; on some systems it is video). Plex then needs Use hardware acceleration when available turned on under Settings, Server, Transcoder, with Show Advanced on. Jellyfin's Intel guide notes QSV is not available in Docker on Windows or WSL. The full walkthrough, including NVIDIA, is in hardware transcoding in Plex and Jellyfin.
Common mistakes
- Config on a network share. Plex warns the
/configvolume needs a filesystem with file locking, and that NFS and SMB often corrupt the database. Keep config on local disk even if media lives on the NAS. - Wrong ownership. Empty libraries are usually a permissions problem, not a Plex or Jellyfin bug. Match UID and GID to the media owner.
- Transcode folder on a tiny disk. Plex says
/transcodecan take tens of gigabytes. Point it at fast local storage, or a RAM disk if you have memory to spare. - Hardcoded latest in production. Pin a tag, upgrade on purpose.
Then connect your apps
Once the container is up, any client can reach it by its LAN address or through your remote access setup. Plezar is our app: it plays from your own Plex, Jellyfin or Emby server on iPhone, iPad, Mac, Apple TV, Android, Android TV and Fire TV. It talks to the server, not to the folders behind it, so it cannot browse SMB or NFS shares directly. Run the server in Docker, point Plezar at the server.
Sources
- Jellyfin: Container installation (Docker, Compose, Podman)
- Plex: pms-docker image (Docker Hub)
- Plex: pms-docker README (Quick Sync, Windows notes)
- Jellyfin: Intel hardware acceleration
Frequently asked questions
What is the Jellyfin Docker Compose file?
Use the jellyfin/jellyfin image, publish 8096/tcp and 7359/udp, and mount /config, /cache and /media. The post has the full file from the official docs.
Does Plex need host networking in Docker?
Host networking is the simplest option and needs no port mappings. Bridge mode works if you publish Plex's TCP and UDP ports and set ADVERTISE_IP.
Can I keep the Plex config folder on a NAS share?
Plex says the config volume needs a filesystem with file locking, and that NFS and SMB often corrupt the database. Keep config on local disk.
Does hardware transcoding work in Docker?
Yes on Linux. Pass /dev/dri into the container. Jellyfin does it free. Plex requires Plex Pass. Intel QSV is not available in Docker on Windows or WSL.
Plezar is made by Vakil Ventures LLC, which publishes this guide. Prices and features were checked on December 3, 2026; services change, so confirm on their own sites before you buy.