Jellyfin Forum
Settings when running two servers using the same media folder - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: General Questions (https://forum.jellyfin.org/f-general-questions)
+--- Thread: Settings when running two servers using the same media folder (/t-settings-when-running-two-servers-using-the-same-media-folder)

Pages: 1 2


Settings when running two servers using the same media folder - Maxi2b - 2024-01-23

Hello

I have two servers at different locations with a synched media folder. I would like to run Jellyfin on each of those servers accessing that (synched) media folder. (Just the media folder is synched and not the docker folder)
Is there something special I should do or avoid with this kind of setup? Especially, can I activate
-the Nfo option
-save pictures in media folder
or would that cause problems? Or in other words would it be ok to activate those options or should I avoid every option that writes to the media folder?

(In case this makes a difference: My plan in case I can let the servers use any option that would write to the media folder would be: -turn off Jellyfin B -move new media to in the synched media folder -let Jellyfin A catalog the new files -let it all synch -turn Jellyfin B back on)

Thank you for any answers in advance.


RE: Settings when running two servers using the same media folder - Mel_Gibson_Real - 2024-01-23

You can run jellyfin off a media folder that is read only. To prevent having to manage metadata on both servers use radarr and sonarr to add proper nfo, naming, and images.

So I would have the sync folder be read only for the jellyfin servers, and then have an arr stack that can write for adding metadata and images. Not sure what your current setup is but shouldnt be to hard to implement.


RE: Settings when running two servers using the same media folder - tmsrxzar - 2024-01-23

make it a master/slave pair of servers, master does all the nfo/artwork, slave just follows along
on the slave, make the mounts in docker read only and disable anything that involves saving


RE: Settings when running two servers using the same media folder - Maxi2b - 2024-01-23

(2024-01-23, 02:12 PM)tmsrxzar Wrote: make it a master/slave pair of servers, master does all the nfo/artwork, slave just follows along
on the slave, make the mounts in docker read only and disable anything that involves saving

So if I understood you correct I should set up the master server completely normal and the slave server without any options that would allow it to write on the media folder?


I played a little bit around with the two servers and had everything enabled on one and at least tried to turn all the options that would write to the media folder off on the other one. It seemed like most things would work, but for example the episode pictures of a show would just not be recognized by the second server, even though they are in the media server where Jellyfin put them. 
Was there something obvious I missed or did I misunderstand you?


RE: Settings when running two servers using the same media folder - tmsrxzar - 2024-01-23

no seems like you understood fully

"the episode pictures of a show would just not be recognized by the second server"
i don't understand this though, i have a server which writes nothing to the media drive, everything in it's own docker folders as per normal

if you use nfo saving on the first server, then all the information will be saved with the media and subsequently loaded into the 2nd from nfo files
but only if you set it up that way; 1st server Metadata Savers -> Nfo On, 2nd server just disable all metadata downloaders

or just let each one scrape the files, seems wasteful though

other than that i think the only issue might be timing where the 2nd server scans before the 1st has finished


RE: Settings when running two servers using the same media folder - Maxi2b - 2024-01-23

(2024-01-23, 02:04 PM)Mel_Gibson_Real Wrote: You can run jellyfin off a media folder that is read only. To prevent having to manage metadata on both servers use radarr and sonarr to add proper nfo, naming, and images.

So I would have the sync folder be read only for the jellyfin servers, and then have an arr stack that can write for adding metadata and images. Not sure what your current setup is but shouldnt be to hard to implement.


I'm not really familiar with those programs.
I currently have two NASes and use the build in synching software and Jellyfin in docker. I organized my media folder according to the Jellyfin documentation and have personally no issue in doing that (manually).
I'm not sure what the advantage of those programs is compared to Jellyfin searching for the data. Or am I just failing to see the obvious?


RE: Settings when running two servers using the same media folder - Maxi2b - 2024-01-23

(2024-01-23, 07:23 PM)tmsrxzar Wrote: no seems like you understood fully

"the episode pictures of a show would just not be recognized by the second server"
i don't understand this though, i have a server which writes nothing to the media drive, everything in it's own docker folders as per normal

if you use nfo saving on the first server, then all the information will be saved with the media and subsequently loaded into the 2nd from nfo files
but only if you set it up that way; 1st server Metadata Savers -> Nfo On, 2nd server just disable all metadata downloaders

or just let each one scrape the files, seems wasteful though

other than that i think the only issue might be timing where the 2nd server scans before the 1st has finished


Sorry, I probably used some awkward wording.
So I actually tried this (first server scans and writes in media folder, second server doesn't scan online databases (I just forgot to git it read only access)) with one show and two movies. I also created the second server after the first one was long done scanning, so in that test shouldn't be any problem with synch timing.
On first glance it worked well. But the second server didn't show the pictures for the individual episodes, it just showed a generic picture of the series for every episode. There episode-pictures were in the folder of the series with the nfo-files referring to them though it just wouldn't show them in the second server.
And for some reason the pictures of the actors wouldn't load on their own.

If you don't have an idea why that might be, I guess I have to try the "wasteful" option.


RE: Settings when running two servers using the same media folder - tmsrxzar - 2024-01-23

no i don't actually know why that would be, seems very irregular that jellyfin would write files that it won't actually use again
you can check what it's written vs the naming; https://jellyfin.org/docs/general/server/media/shows/#poster

but if it's not going to "just work" then you'll end up doing a massive amount of manual work just fixing things for server #2 when you could just let it scan online itself instead


RE: Settings when running two servers using the same media folder - Mel_Gibson_Real - 2024-01-23

You should poat your settings for both servers libraries. Your probably disabling so much its not even bothering to look in the folders for the images and nfo. The best way to set it up would be setting the media directory you set in docker as read only


RE: Settings when running two servers using the same media folder - Efficient_Good_5784 - 2024-01-23

Is there a specific purpose for running the secondary server? Do you intend to keep it as a backup, or do you intend to use it along with your main server?
Also, are both servers running the exact same hardware?

You could do what I'm doing. I have a two servers. On both, Jellyfin runs in a container with the media and Jellyfin config folders outside of the containers.
Daily, my main server copies the media and config folders onto the secondary server (using an rsync task). Since the Jellyfin config folder is relatively small, this can be transferred to the 2nd server within a minute.
Before the transfer, I have a script run to turn off the Jellyfin container on the 2nd server, then a second script run to turn it back on around 10 minutes later. I figured leaving around 10 minutes of time is more than enough time to allow for the config folder to be copied to the destination in its entirety on a 1Gbps network link.

So when my 2nd server starts Jellyfin up, that Jellyfin instance will have an exact copy of my main server. If I make changes on it, it will only hold for a day. The rsync task I use is set to delete anything that's not on the main server (basically an exact copy after each transfer). Each day, it will get updated with whatever is on my main Jellyfin server.

Also, since both my servers have different hardware, I edited one of the xml files for playback to modify which settings to use for transcoding, then made a script replace that exact xml file on the 2nd server so that after each daily rsync task, the 2nd server will still have its necessary playback settings. I also did something similar with some of the scheduled task files so that the 2nd server doesn't run any background tasks (since the main server does all that work).