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/dri in. 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

JellyfinPlex Media Server
Imagejellyfin/jellyfinplexinc/pms-docker
Ports8096/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 loginLocal admin account made in the browserClaim token from plex.tv/claim in PLEX_CLAIM
Hardware transcodingFree. Pass the GPU device inNeeds Plex Pass. Pass the GPU device in
Supported hostLinux only for containersLinux. 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

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

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

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

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.