mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-01-23 23:20:51 +01:00
[Issue]: Docker Container Missing Jellyfin User #5506
Labels
No labels
area:database
awaiting-feedback
backend
blocked
breaking change: web api
bug
build
ci
confirmed
discussion needed
dotnet future
downstream
duplicate
EFjellyfin.db
enhancement
feature
future
github-actions
good first issue
hdr
help wanted
invalid
investigation
librarydb
live-tv
lyrics
media playback
music
needs testing
nuget
performance
platform
pull-request
question
regression
release critical
requires-web
roadmap
security
security
stale
support
syncplay
ui & ux
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: starred/jellyfin#5506
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @polskikrol on GitHub (Mar 6, 2024).
Please describe your bug
Trying to secure the Jellyfin docker container. I am not setting privileged mode, and setting PUID and GUID environment variables. When I run the container as root, everything works as needed and I am able to access the render device:
/usr/lib/jellyfin-ffmpeg/vainfo --display drm --device /dev/dri/renderD128However, when I set the 'user: x:x' option in the docker-compose.yml file and rebuild the container, there are issues. The jellyfin user and group does not exist.
Now.... does Jellyfin docker support running as non-root? Is there a set of documented environment variables and perhaps I am not passing the correct one? Is there an initial startup script that has issues or doesnt currently create the required user / group?
Reproduction Steps
Please see description.
Jellyfin Version
10.8.13
if other:
No response
Environment
Jellyfin logs
FFmpeg logs
No response
Please attach any browser or client logs here
No response
Please attach any screenshots here
No response
Code of Conduct
@TimGels commented on GitHub (Mar 6, 2024):
Please fill in the whole template next time. Currently, I am guessing you are using the third party unofficial linux server io jellyfin container image by you using the words GUID and PUID.
I use the official container, but I don't think permission wise there is a difference (I am only familiar with the official one however). I do not run my docker instance as root. Make sure the uid:gid are set up correctly permission wise on the host.
@polskikrol commented on GitHub (Mar 6, 2024):
I believe to be using the correct image:
I may have added those ENVs during troubleshooting. The user/group do exist on the host:
Of course the user is part of the render group, and so forth. So, with the above dockerfile... things work, but as ROOT:
But when I uncomment [user: '126:132'] in the dockerfile... things break...
So, maybe I am missing some documentation on how to properly pass the username/group to the docker container so that it auto-creates the user/group? IDK.
@JPVenson commented on GitHub (Mar 6, 2024):
Enviorment variables are not supported by the official image as far as i know. Only by the LISO image.
@TimGels commented on GitHub (Mar 6, 2024):
I never used hwa myself but this still looks like the hwa device jellyfin is trying to access has other permissions.
@TimGels commented on GitHub (Mar 6, 2024):
Is renderD128 part of render / video or another group / user perhaps?
@JPVenson commented on GitHub (Mar 6, 2024):
Well our docs are quite extensive on what is expected for HWA with intel devices on docker:
https://jellyfin.org/docs/general/administration/hardware-acceleration/intel#configure-with-linux-virtualization
However this works as intended and is not a bug therefor i am closing this issue.
If you need further help, you are always welcome to join one of our chats
https://jellyfin.org/contact/
@polskikrol commented on GitHub (Mar 6, 2024):
So does it have to run as root?
On Wed, Mar 6, 2024 at 10:25 JPVenson @.***> wrote:
@TimGels commented on GitHub (Mar 6, 2024):
Not to my knowledge. It is 99% certain this is a permission issue.
@polskikrol commented on GitHub (Mar 6, 2024):
So, I may have been mixing up elements from the official docker image and the secondary one. Cleaned up my docker-compose.yml and it looks good now. Also, added a new bridge network to this host so that I can manually manage the IP addresses assigned.
Hope this helps others as well. The official docker image uses native like docker declarations while the secondary image uses environmental variables. Jellyfin user doesnt have to exist on the docker container, and it only needs to have proper render permissions.
Cheers! This can be closed.
@polskikrol commented on GitHub (Mar 6, 2024):
@JPVenson Spot on! That direct html bookmark link steered me in the right direction. Not sure how I have missed this tidbit over the past year. Thank you very much and apologies for being a pain. Hope this issue/thread helps others in the future.