Migrate jellyfin package to docker container on Synology NAS - 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: Migrate jellyfin package to docker container on Synology NAS (/t-migrate-jellyfin-package-to-docker-container-on-synology-nas) Pages:
1
2
|
RE: Migrate jellyfin package to docker container on Synology NAS - Efficient_Good_5784 - 2024-06-30 The following is what Jellyfin will expect by default directory-wise when you launch the container: Code: - cache So from your image, I would put "config", "data", & "log" into a "config" folder. Yes, there's a config folder inside the config folder. You'll have to give one of the two a different name to nest them in because you can't create two folders named the same in the same directory. So for the volume part of your compose file, you will only need: Code: - /volume1/docker/jellyfin/configConfused-faceconfig:rw And as @TheDreadPirate suggests, you need to pass in the GPU. So here's how your compose file should look: Code: services: RE: Migrate jellyfin package to docker container on Synology NAS - Anon - 2024-06-30 (2024-06-30, 02:17 AM)TheDreadPirate Wrote: You need to pass in the GPU for transcoding. Your NAS has an Intel CPU, correct? Thanks. Correct, DS920+ with Intel CPU. RE: Migrate jellyfin package to docker container on Synology NAS - Anon - 2024-06-30 Hey guys, thanks for your continued help, I GREATLY appreciate it. I have some additional follow up questions based on your help above Efficient_Good_5784. Please reference this new screenshot when reading below questions: https://imgur.com/a/1fxkVwR Question #1 So, for each of these folders (inside my primary shared folder), do I need to include the mappings below? /volume1/jellyfin/Animated Shows:/Animated Shows:rw /volume1/jellyfin/Anime:/Anime:rw /volume1/jellyfin/Kids Movies:/Kids Movies:rw /volume1/jellyfin/Kids Shows:/Kids Shows:rw /volume1/jellyfin/Movies:/Movies:rw /volume1/jellyfin/Shows:/Shows:rw OR is just the below good enough since Jellyfin is my only true shared folder (the rest are sub-folders inside /volume1/Jellyfin) in Synology? /volume1/jellyfin:/jellyfin:rw Question #2 These files above did NOT exist in the backup files I copied via rsync + SSH. Instead, when I created a hyperbackup of my Jellyfin shared folder (so I could move files to new RAID array), this @app/@metadata/Jellyfin folder copied over as well, and appears to be 13.5MB in total, with 1128 files and 1127 folders (my media is 10TB in size). I imagine this is just metadata from the actual Synology Community Jellyfin app, and not important files I need to worry about. Is that right? Each show/movie folder has a _Syno_BkpMetadata.db file inside. Question #3 I copied these two folders data and log into the config folder, but I'm not following why I'd add a duplicate config folder. The config folder I have in my original screenshot is this config folder, with the dlna, scheduledtasks, etc. inside. Question #4 Is this line correct based on my above output from my DS920+ Synology? Just want to make sure, I also have card0 listed. devices: - /dev/dri/renderD128:/dev/dri/renderD128 Question #5 Based on above, and under the assumption that /volume1/jellyfin:/jellyfin:rw is good enough, is below correct? I've changed network_mode to host, as that seems to be what I would want I think. services: jellyfin: image: jellyfin/jellyfin:latest container_name: jellyfin environment: - PUID=1028 - GUID=100 - TZ=America/Chicago volumes: - /volume1/docker/jellyfin/cache:/cache:rw - /volume1/docker/jellyfin/config:/config:rw - /volume1/jellyfin:/jellyfin:rw devices: - /dev/dri/renderD128:/dev/dri/renderD128 network_mode: host restart: unless-stopped RE: Migrate jellyfin package to docker container on Synology NAS - bitmap - 2024-06-30 (2024-06-30, 05:40 AM)Anon Wrote: Hey guys, thanks for your continued help, I GREATLY appreciate it. I have some additional follow up questions based on your help above Efficient_Good_5784. 1. If you map the top-level folder, you can add subfolders to your libraries. I do this with my different drives as they fill up. 4. Yes. Both card0 and renderD128 refer to the same device (your iGPU). I add both, as I had issues with Jellyfin years ago and that proved to be a solution for me. I have been told it's not necessary. 5. Your compose file is not entirely correct. I do not use host networking because it's not necessary, even when using a reverse proxy like nginx. There are advantages, but they're slim and it's another security hole you open up by enabling host networking for a container. Additionally, PUID and PGID are not built in to Docker, you must use the user mapping function. See the install instructions for docker-compose: https://jellyfin.org/docs/general/installation/container#using-docker-compose. Code: services: YMMV on any of these settings, double-check as I just copy and pasted your values into the above from the page I linked. I don't want to steer you wrong on your Synology-specific questions as I don't have any expertise there (nor would I qualify myself as an expert with docker-compose, but I've gotten decent over the years). Keep in mind that "version" is deprecated depending on how up-to-date your Docker install is... RE: Migrate jellyfin package to docker container on Synology NAS - Efficient_Good_5784 - 2024-06-30 (2024-06-30, 05:40 AM)Anon Wrote: Question #1This entirely depends up to you. Both is correct. One benefit of listing each out is that if you ever add a new folder to this location on the Synology nas, it will not show up to Jellyfin (which means Jellyfin will not be able to modify its contents). You also have finer control over which folders it has read-only or full write access to. Also as a FYI, you can rename host mounts to be whatever random name you would like. So this is possible too: Code: /volume1/jellyfin:/amazing-media:rw That host mount would take the Jellyfin directory on the nas and show it in the container as "amazing-media". The reason I bring this up is because maybe you'll want to reorganize your nas folders, or even switch to another system. If you end up switching the media from "jellyfin" to another folder named "media", you can still do this: Code: /volume1/media:/jellyfin:rw Jellyfin will require a rescan of all your media if the path changes, but doing the above would prevent that rescan in the first place since the host mount still is seen as the same path as before. (2024-06-30, 05:40 AM)Anon Wrote: Question #2The files named "_Syno_BkpMetadata.db" are Synology Hyper Backup specific files. They're in no way related to Jellyfin, so you can safely delete them. If you miss any of them, I don't think it will cause problems with Jellyfin. The point of these files in Hyper Backup is that they contain metadata related to your Synology nas so that Hyper Backup can restore your backed-up files when the time comes. I'm not to familiar with them, so if you desire more info about these if you're curious, you'll need to ask on the Synology forums: https://community.synology.com/enu (2024-06-30, 05:40 AM)Anon Wrote: Question #3I think there's a miscommunication here. Take a look at the config folder I have for my Synology nas: https://imgur.com/a/1s6NUu5 Look at the sidebar that shows how the config folder is nested inside another config folder. I would suggest moving around your folders to match what I have. I assume that the Jellyfin image will expect what I have since that's what it created for me by default. (2024-06-30, 05:40 AM)Anon Wrote: Question #4That should be correct. You can include card0, but I chose not to include it in the example compose file example since I've seen others previously state that it's not required for Jellyfin to use HWA. (2024-06-30, 05:40 AM)Anon Wrote: Question #5This should be correct as long as you sort the config folder to how it's supposed to be. RE: Migrate jellyfin package to docker container on Synology NAS - Anon - 2024-06-30 Thanks all! Efficient_Good_5784, are you able to post the content of your "data" folder? I think that might be the cause of my issues. Here is mine in reference to comments below: https://imgur.com/a/gDDBGnm I see your top level config folder (docker/JellyfinConfigTarget/config) has the four folders below included: 1: metadata 2: plugins 3: root 4: transcodes These folders originally lived inside my "data" folder (one level deep), and inside of the data folder, was another folder called "data", which contains "attachments", "collections" "keyframes", "playlists" etc. Do I need to move the metadata, plugins, root, transcodes folder up into the config folder? Do I need to make it so I don't have nested data folders? I've tried building my project 3 times now (each time wiping out cache / config and retrying), the docker build works, jellyfin loads, but I'm unable to login with any account sadly (forgot password also fails). The below is my docker compose file. services: jellyfin: image: jellyfin/jellyfin:latest container_name: jellyfin environment: - PUID=1028 - GUID=100 - TZ=America/Chicago volumes: - /volume1/docker/Jellyfin/JellyfinConfigTarget/cachecache:rw - /volume1/docker/Jellyfin/JellyfinConfigTarget/configconfig:rw - /volume1/JellyfinJellyfin:rw devices: - /dev/dri/renderD128dev/dri/renderD128 network_mode: host restart: unless-stopped I'm starting to think it might not be doable because the folders / files are all organized differently than default Jellyfin docker. RE: Migrate jellyfin package to docker container on Synology NAS - Efficient_Good_5784 - 2024-06-30 This is how it looks inside the data folder: https://imgur.com/a/pQ114vp I would suggest to create a blank Jellyfin container. Just create a blank folder on the nas, then host mount it as /config as you're building the container. Jelyfin will auto-populate the folder with the correct setup. Once you have this new config folder, you basically have the correct setup. Make a copy of that correct setup, then start replacing its files with your actual server files. When you're done, just move this edited config folder to wherever you need it, then host mount it to your final container as /config. Just in case, you should know that the "library.db.bak#" files are library database backups. My screenshot doesn't contain them as I deleted them after I didn't need them anymore. You also state that you can't log in. I notice from your screenshot that you don't have the "authentication.db.old" file in the data path. Maybe that's the reason. Also, you don't need to use "JellyfinConfigTarget". That's a folder I created and use due to a small script I made. It's not required by Jellyfin. Edit: I've attached a zip file that contains blank folders that are set up correctly for the config folder if it helps. It probably wont help with where some files are supposed to go though. RE: Migrate jellyfin package to docker container on Synology NAS - Anon - 2024-06-30 Thanks, after finagling with the data folder further (removing nested data folders), I was able to eventually get to be able to sign in. My problem however now is that once actually signed in, I can see all my old libraries / watched items, but Jellyfin can't play or modify any of the data (movies, shows, etc) in my directories, and acts like it can't see it. If I try to delete an item, it does not delete off the drive either. I get errors like below: 1: https://imgur.com/a/lRAKBXG "Play back error: Playback failed because the media is not supported by this client" 2: "filevolume1/Jellyfin/Shows/Battlestar Galactica (2003) Season 1-4 S01-S04 (1080p BluRay x265 HEVC 10bit AAC 5.1)/Season 1/Battlestar Galactica (2003) - S01E01 - 33 (1080p BluRay x265).mkv: No such file or directory" 3: "System.IO.DirectoryNotFoundException: Could not find a part of the path '/volume1/Jellyfin/Anime'." 4: "[2024-06-30 14:28:38.348 -05:00] [INF] [22] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was challenged. [2024-06-30 14:28:43.343 -05:00] [INF] [33] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token." [2024-06-30 14:28:43.344 -05:00] [INF] [33] Jellyfin.Api.Auth.CustomAuthenticationHandler: "CustomAuthentication" was not authenticated. Failure message: "Invalid token."" I tried running the docker compose with a different PUID admin account (same username that I previously used on old RAID array), that did not work. I tried removing the lines referencing hardware acceleration, but that didn't fix. I tried fully commenting out the user lines from docker compose, and just running it as root, that did not work. I tried adding in lines that point directly at my Jellyfin subfolders (Movies, Shows) in the docker compose script, alongside (- /volume1/JellyfinJellyfin:rw), did not work. Also, side question, is Jellyfin hardware transcoding even working for Synology for Jellyfin versions past 10.8.11 (HDR tone mapping specifically, roughly half of my content is HDR)? Has that bug been fixed? RE: Migrate jellyfin package to docker container on Synology NAS - Efficient_Good_5784 - 2024-06-30 I'm not to familiar with it, but I have heard that the Linux kernel that Synology is using is missing some things needed for Jellyfin to support HDR tone mapping. So Jellyfin can't do that on Synology NAS systems. I would try removing the user and group IDs from the compose file. If you don't state which user to run the container as, it will run as root. Root should give access to all the folders that it can find. As for the playback error, if it's not an issue with file permission access, it will most likely be a HWA issue. RE: Migrate jellyfin package to docker container on Synology NAS - Anon - 2024-06-30 Thanks, I did try removing the user / group ID's from the compose file, however the issue persists where it can't see my media folders (even as root). I did just now try building a fresh Jellyfin install (blank cache and config folders), and it can see my libraries and media just fine, and plays the media just fine as well. So it seems like its just some problem with my Synocommunity Jellyfin config data structure, at this point, I think I may just give up and rebuild my libraries and all metadata from scratch. I think ultimately the time investment will probably be less that trying to get Jellyfin to accept my old improperly formatted config data. I think at this point its clear that there is no easy way to migrate from the Synocommunity version of Jellyfin to the docker version, at least not without reformatting the config folder layout. I appreciate everyone's help, but I think I'll just rebuild from scratch. |