[Docker] Jellyfin on Synology NAS

[Docker] Jellyfin on Synology NAS
Jellyfin is a free, open-source media server that’s easy to run on Synology. This post covers installation only using Docker Compose in Synology’s Container Manager. We won’t cover usage or library organization here.
TL;DR: Set PUID/PGID, prefer host networking for painless discovery/DLNA, and map /dev/dri if your NAS supports hardware acceleration.

Prerequisites

  • Synology DSM with Container Manager enabled. Jellyfin is typically deployed on Synology via Docker. Jellyfin
  • A folder layout like:
    • /volume1/docker/jellyfin/config (app config & metadata)
    • /volume1/docker/jellyfin/cache (transcode/cache)
    • /volume1/docker/jellyfin/media (later: point to your real library paths)
  • Your Synology user’s PUID and PGID
    • Tip: the first DSM user is often PUID 1026 / PGID 100, but confirm via SSH: id <your_synology_username>
    • Using PUID/PGID lets the container write files as your NAS user (avoids root-owned files). LinuxServer

Docker Compose (Host Network)

Save as docker-compose.yml:

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    network_mode: host
    environment:
      - PUID=1026        # change to your UID
      - PGID=100         # change to your GID
      - TZ=Asia/Seoul    # change to your timezone
    volumes:
      - /volume1/docker/jellyfin/config:/config
      - /volume1/docker/jellyfin/cache:/cache
      - /volume1/docker/jellyfin/media:/media   # replace with your actual library roots
    devices:
      - /dev/dri:/dev/dri       # optional; only if your NAS supports HW accel
    restart: unless-stopped

Why host networking? Jellyfin uses TCP 8096 (HTTP) / 8920 (HTTPS) and UDP 7359 for local client discovery plus 1900 for DLNA (SSDP). Host mode makes these broadcast-style features work without extra port wrangling. JellyfinDocker Hub


If You Need Bridge Mode Instead

If host mode isn’t possible, switch to bridge and publish the ports Jellyfin uses:

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    ports:
      - "8096:8096"        # web UI (HTTP)
      - "8920:8920"        # (optional) HTTPS, if enabled in Jellyfin
      - "7359:7359/udp"    # client discovery
      - "1900:1900/udp"    # DLNA/SSDP
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Asia/Seoul
    volumes:
      - /volume1/docker/jellyfin/config:/config
      - /volume1/docker/jellyfin/cache:/cache
      - /volume1/docker/jellyfin/media:/media
    restart: unless-stopped
Note: DLNA and discovery rely on UDP broadcast; they’re simplest in host mode. Bridge works fine for the web app if you publish the ports shown above. Jellyfin

Deploy

From the folder containing docker-compose.yml:

docker compose up -d

When it’s running:

  • Open the web UI at http://<your-nas-ip>:8096
  • Complete the initial setup wizard (admin user, libraries, etc.)

Reverse Proxy Later (Optional)

You can place Jellyfin behind Synology’s built-in reverse proxy and use a friendly URL like:

https://jellyfin.yourdomain.com

Point the reverse proxy to 8096 on the NAS (host mode) or the container’s published port (bridge). If you use a sub-path (e.g., /jellyfin), configure Jellyfin’s Base URL accordingly. JellyfinReddit


Folder Permissions (Important)

When you point Jellyfin to your real movie/TV folders, ensure the NAS user that matches your PUID/PGID has at least read permissions (and write, if you want Jellyfin to manage artwork/transcodes) on those shared folders. Otherwise, Jellyfin won’t see or write media and metadata correctly. LinuxServer


Optional: Enable Hardware Acceleration (Synology)

If your NAS exposes a supported iGPU (e.g., Intel Quick Sync), Jellyfin can offload decode/encode for lower CPU usage and smoother playback.

Requirements

  • A NAS/CPU with VAAPI/QSV-capable graphics (common on Intel-based Synology models).
  • Start the container with the device mapping: devices: - /dev/dri:/dev/dri

Steps

  1. Verify the GPU device on the host
    SSH into the NAS: ls -l /dev/dri You should see entries like card0 and renderD128.
  2. (If needed) Allow container access to render group
    If logs show permission errors for /dev/dri/renderD*, find the device’s group ID: ls -n /dev/dri/renderD* Add that GID to the container: services: jellyfin: # ... group_add: - "109" # example; replace with your render group GID Redeploy with docker compose up -d.
  3. Enable in Jellyfin
    Jellyfin Dashboard → PlaybackHardware acceleration: choose VAAPI (or Intel QSV if available), then save. You do not need any paid license for hardware acceleration in Jellyfin. Jellyfin+1
  4. Test
    Transcode a file (e.g., HEVC → H.264) and check the playback info/logs for VAAPI/QSV activity.

Troubleshooting

  • No /dev/dri: Your model/DSM may not expose the iGPU; reboot after major DSM updates to reload drivers.
  • Permission denied: Use the group_add approach above; avoid privileged: true except for quick testing.
  • Codec limits: Some chips decode more formats than they can encode; Jellyfin may use mixed HW/SW paths depending on media. Jellyfin

Common Gotchas

  • Wrong PUID/PGID → configs/cache not writable; verify with id <user>. LinuxServer
  • Bridge mode but no discovery/DLNA → publish 7359/udp and 1900/udp, or switch to host. Jellyfin
  • Reverse proxy quirks with sub-paths → set Base URL (e.g., /jellyfin) if you’re proxying under a path. JellyfinReddit

That’s it—Jellyfin on Synology via Docker in a simple, production-friendly way. Installation done; how you use it is up to you!