Thefrank / jellyfin-server-freebsd

jellyfin-server component for freebsd
185 stars 16 forks source link

Update Installation_TrueNAS_GUI.md #68

Open OsulivanAB opened 4 months ago

OsulivanAB commented 4 months ago

Added example for new users who may not know how to add a new user. The only reason I knew to do this was because I've been fighting with it all day haha.

rucko24 commented 4 months ago

In XigmaNAS this command can be executed in jail and in the host console.

But where can you run it in TrueNAS if they want to do everything from the API ?

FYI:

image

well, from the jail console it usually works quite well.

I typed the whole command in the console without copy and paste, to avoid encoding problems.


But it is also important to note that the host jellyfin user must be the same that contains the jellyfin jail, so that the jail's jellyfin can write to the dataset with the same permissions.

It is useless to create a user in the jail that has a different id than the host because it will still not have permissions to write.

Adding also that we can create a kind of watcher that is attentive to the changes that occur to the jellyfin movie dataset and set the user jellyfin and correct octal mode 775 or 770.

https://rubn0x52.com/2022/04/03/containerizing-jellyfin-in-a-jail/

OsulivanAB commented 4 months ago

That's fair, and I appreciate you explaining the ins and outs of all of this, as it is very new to me. I do have a host userID that I am matching, which explains why it ends up working well on my end, but without that context it may not be fruitful to add the line I am requesting without considerably more context :(

rucko24 commented 4 months ago

I see your contribution as ideal partner.

The same thing that happened to me too and for a long time lmao.

But with this tactic I assure you that jellyfin will be able to write well in your dataset and show the covers of the movies correctly.

The watcher if you find it complicated you can create a cron task, that changes the permissions of the dataset of your movies from time to time, I still prefer the watcher to change them for me when a change is included in that dataset.

Thefrank commented 4 months ago

Thank you for the pull request!

The pkg/ports version of jellyfin should automagically use the now-builtin UID/GID. If you are following a guide from elsewhere then it likely includes how to add users and change ownership.

As for adding a new UID/GID: In TrueNAS you need to add your custom UID/GID via the GUI and match it on the jail either via the GUI's shell or via console and executing the command into the jail On base FreeBSD and other FreeBSD-based systems are as described by @rucko24: they need to be added to the host and in the jail exactly the same.

My general thinking with a media player is that it only needs read access to your media. It should not need to move/rename the media. All of the metadata is stored in the media player's databases. Transcodes should be temporary to fill in a gap in playback support.

Until iXsystems removes its plugin system, the easiest way for TrueNAS CORE users to install/use jellyfin is via the plugin system. More complex setups or all-in-one guides are covered, in much better detail, outside of this repo.

If a new user to TrueNAS/FreeBSD/non-windows needs to make a special user for jellyfin to work on its own then I need to know what that case is so I can fix it. Blindly copy/paste lines of code can lead to confusion and complications later especially so for a new user. [I should move the hwaccel stuff out of the install guide while I am thinking about this.]