From 45d19dd61400c7728b77ddd9f10f9b7e91610fa8 Mon Sep 17 00:00:00 2001 From: Nick Yeoman Date: Mon, 9 Nov 2026 01:56:36 +0000 Subject: [PATCH] added gpu to jellyfin --- jellyfin/README.md | 26 ++++++++++++++++++++++++-- jellyfin/compose-gpu.yaml | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 jellyfin/compose-gpu.yaml diff --git a/jellyfin/README.md b/jellyfin/README.md index 297ce7a..7498928 100644 --- a/jellyfin/README.md +++ b/jellyfin/README.md @@ -40,6 +40,28 @@ Open http://localhost:8096 in your browser and complete the setup wizard: For Jellyseerr, create an API key under **Dashboard → API Keys**. +### GPU transcoding (optional) + +Deploy `compose-gpu.yaml` instead of `compose.yaml`. It uses the same env vars. The file defaults to NVIDIA. + +1. **Install the NVIDIA Container Toolkit on the host** (once per host; skip it if another GPU stack such as Ollama already works): + + ```bash + sudo pacman -S nvidia-container-toolkit # Arch + sudo nvidia-ctk runtime configure --runtime=docker + sudo systemctl restart docker + ``` + +2. **Check the container can see the GPU:** `docker exec jellyfin nvidia-smi` +3. **Enable it in Jellyfin:** go to **Dashboard → Playback → Transcoding**: + - **Hardware acceleration:** NVENC + - **Hardware decoding:** tick every codec your card supports. An RTX 30-series card decodes H.264, HEVC (incl. 10bit), VP9 (incl. 10bit) and AV1. + - **AV1 encoding:** RTX 40-series and newer only. Leave it off on older cards. + - **Tone mapping:** turn it on for HDR content. It runs on the GPU. +4. **Confirm it's working:** play something that needs transcoding. `nvidia-smi` on the host should list a `jellyfin-ffmpeg` process. + +**Intel/AMD:** in `compose-gpu.yaml`, remove the `deploy` block and uncomment the `/dev/dri:/dev/dri` device. Then choose VAAPI (AMD) or QSV (Intel) as the hardware acceleration. + ## Environment Variable Notes | Variable | Description | @@ -96,13 +118,13 @@ docker run -d \ - **Only port 8096 is published.** HTTPS (8920) is handled by Nginx Proxy Manager. Local network auto-discovery (UDP 1900/7359) won't work through the bridge network, so add the server to clients by URL. - **Photos** are left out on purpose — use the Immich stack for photo libraries. -- **Hardware transcoding** needs the GPU passed into the container (e.g. `devices: [/dev/dri:/dev/dri]` for Intel/AMD). It's not included by default. +- **Hardware transcoding** is not in `compose.yaml`. See *GPU transcoding* under Getting Started. ## Dockhand Stack, Deploy from Git - **Cookbooks Repository** - **stackname:** jellyfin -- **Compose file path:** jellyfin/compose.yaml +- **Compose file path:** jellyfin/compose.yaml (or jellyfin/compose-gpu.yaml for hardware transcoding) - **Additional env file (optional):** jellyfin/sample.env Load `jellyfin/sample.env` into the Environment variables in Dockhand, then create the Stack. diff --git a/jellyfin/compose-gpu.yaml b/jellyfin/compose-gpu.yaml new file mode 100644 index 0000000..b5f113c --- /dev/null +++ b/jellyfin/compose-gpu.yaml @@ -0,0 +1,28 @@ +# Jellyfin GPU (NVIDIA) — standalone alternative to compose.yaml +services: + jellyfin: + image: ${JELLYFIN_IMAGE:-jellyfin/jellyfin:latest} + restart: ${JELLYFIN_RESTART:-unless-stopped} + volumes: + - ${VOL_PATH:-/data}/jellyfin/cache:/cache + - ${VOL_PATH:-/data}/jellyfin/config:/config + - ${JELLYFIN_MEDIA:-/data}/media:/media + environment: + - JELLYFIN_PublishedServerUrl=${JELLYFIN_URL:-http://localhost:8096} + - NVIDIA_DRIVER_CAPABILITIES=all + - NVIDIA_VISIBLE_DEVICES=all + ports: + - "${JELLYFIN_PORT:-8096}:8096" + networks: + - proxy + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: all + capabilities: [gpu] + +networks: + proxy: + external: true