Categories
Systems Administration

Notes on setting up Jellyfin in LXC container on Proxmox

Creating the container

A lot of this is sourced from: https://geekistheway.com/2022/12/23/setting-up-intel-gpu-passthrough-on-proxmox-lxc-containers/

Hardware is a refurb ex-enterprise Lenovo M720S SFF PC, with a i3-9100 CPU.

On proxmox host, set up non-free repo, by adding non-free to each line:

apt install vainfo intel-gpu-tools intel-media-va-driver-non-free

Then, to check it’s working correctly, run vainfo:

root@smoltuck:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.17.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_17
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.17 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 23.1.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD

Now, make a Ubuntu 24.04 LXC container in proxmox. Once created, add the device passthrough:

The group ID’s need to match the video and render groups inside the LXC container:

root@jellyfin:~# cat /etc/group | grep ren
render:x:993:jellyfin
root@jellyfin:~# cat /etc/group | grep video
video:x:44:jellyfin

Inside the jellyfin lxc container, also apt install the required tools:

apt install vainfo intel-gpu-tools intel-media-va-driver-non-free

and confirm the groups of the devices:

root@jellyfin:~# ll /dev/dri/
total 0
drwxr-xr-x 2 root root         80 May  9 15:10 ./
drwxr-xr-x 7 root root        500 May  9 15:10 ../
crw-rw---- 1 root video  226,   1 May  9 15:10 card1
crw-rw---- 1 root render 226, 128 May  9 15:10 renderD128

and the video decode tools:

root@jellyfin:~# vainfo
error: can't connect to X server!
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.20 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 24.1.0 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Simple            : VAEntrypointEncSlice
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileVP8Version0_3          : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileHEVCMain10             : VAEntrypointEncSlice
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD

Now you should be able to enable QSV video inside the jellyfin container.

To pass through the storage path:

root@smoltuck #/mediacontent[2024-05-11 10:51]
> pct set 100 -mp0 /mediacontent,mp=/mediacontent

2 replies on “Notes on setting up Jellyfin in LXC container on Proxmox”

I have setup jellyfin LXC using community scripts. Also setup qbitorrent using scripts. Now how do I pass through downloads folder from qbitorrent Lxc to jelly fin LXC?

The way I would try to do that is to create a downloads storage location on the Proxmox host. Then, pass the same path through to both the qbitorrent LXC, and configure it to save to that path. Then pass the path through to jellyfin, and configure it to have a library at that path. This should work.

The command to pass a path through to an LXC container is (for example):
`pct set 100 -mp0 /mediacontent,mp=/mediacontent`

This passes `/mediacontent` on the host through to the same path in the container ID 100.

Regards, Jay

Leave a Reply

Your email address will not be published. Required fields are marked *