RetroFed Forum
Your home away from modern life.
[Ubuntu] [Docker] Need help with Nvidia hardware acceleration in Jellyfin
Post Reply
AuthorMessage
LazerDickMcCheese sh.itjust.works LazerDickMcCheese@sh.itjust.works
Joined: 2023-08-06
Quote

Does anyone have a compose.yaml for an Nvidia GPU that works that they would like to share? Here's my current file, it gives a white screen with "server error" on it: https://pastebin.com/AaV17cTz

I went through Jellyfin's instructions on setting a GPU up, but the instructions weren't clear (in my opinion) so who knows if it's correct. I installed some Nvidia tools as a prerequisite and 'nvidia-smi' shows the card. I attached my Jellyfin settings from before it self-destructed according to Nvidia's transcoding matrix (which also wasn't descriptive enough in my opinion), do they look right for a 2080?

Update: after making this post, and changing nothing, it suddenly works

32   Original
the_shwa programming.dev the_shwa@programming.dev
Joined: 2025-11-12
#2 · (edited) Quote Reply

This works for me, rtx 4060

   jellyfin:
     image: jellyfin/jellyfin:latest
     container_name: jellyfin
     user: 108:114
     network_mode: 'host'
     environment:
       - JELLYFIN_CACHE_DIR=/var/cache/jellyfin
       - JELLYFIN_CONFIG_DIR=/etc/jellyfin
       - JELLYFIN_DATA_DIR=/var/lib/jellyfin
       - JELLYFIN_LOG_DIR=/var/log/jellyfin
       - JELLYFIN_PublishedServerUrl=URL_REDACTED
       - NVIDIA_DRIVER_CAPABILITIES=all
       - NVIDIA_VISIBLE_DEVICES=all
     volumes:
       - /etc/jellyfin:/etc/jellyfin
       - /mnt/driveF/jellyfin/cache:/var/cache/jellyfin
       - /mnt/driveF/jellyfin/data:/var/lib/jellyfin
       - /mnt/driveF/jellyfin/log:/var/log/jellyfin
       - /mnt/Movies:/movies
       - /mnt/TV:/tv
       - /mnt/Music:/music
     runtime: nvidia
     deploy:
       resources:
         reservations:
           devices:
             - driver: nvidia
               count: all
               capabilities: [gpu]
     restart: 'unless-stopped'
     extra_hosts:
       - "host.docker.internal:host-gateway"
2
antsu discuss.tchncs.de antsu@discuss.tchncs.de
Joined: 2025-09-05
#3 · Quote Reply

I had the same problem: Debian host + official Jellyfin Docker image, all set up according to the official guide, but it would fail to transcode anything.

There was no relevant information about what was wrong in the logs so what I did was:

  • Copy the ffmpeg command from the logs.
  • docker exec -it into the Jellyfin container.
  • run the same ffmpeg command manually so I could see the error directly.

Long story short, because the Nvidia toolkit uses the driver/libraries from the host, the error was that I was missing the library libnvidia-encode1 on the host. After installing that, everything works as it should.

16
Post Reply
Back to top