2023-12-31, 05:53 PM
(This post was last modified: 2024-02-14, 06:09 PM by Efficient_Good_5784. Edited 6 times in total.)
This will be a short guide for Synology NAS units running DSM 7 on how to run a Jellyfin container using the Container Manager program.
Synology's DSM update to v7 updated the Docker program to what it is now, the Container Manager. Here, you can upload/write YAML files to launch a container.
If you don't have Container Manager on your NAS, install it through the Package Center.
In the Container Manager, you can select from multiple views:
We'll be using the Project view to run Jellyfin with a compose YAML file.
Note: I'll go over how to set-up the compose YAML file at the end.
Now on to the guide:
The following is how the compose YAML file should be written.
Just copy and paste this into a text editor, edit it, then make sure to save it with a .yaml file extension. As in, you can save this to a .txt file, then just rename the text file from .txt to .yaml.
Comments in a YAML file are preceded with "#". Deleting the # symbol will make the line apply when you run the compose file.
Notes:Note: You can also choose to copy this directly when creating a project by selecting the "Create docker-compose.yml" option for source.
Also check out the Official Jellyfin documentation about Docker Compose: https://jellyfin.org/docs/general/instal...er-compose
After all this, you should end up with a project in Container Manager's Project view and a running container.
You can now open the project to view its details.
Here, you can modify the YAML configuration it uses (the project needs to be stopped first to edit it).
You'll be able to add/remove media folders or even select a specific Jellyfin Docker image from here in the future.
Also as a final note, in the Project view:
If somebody finds an error with this, let me know and I'll update this.
‐---------------------
Edit:
I forgot to mention this originally. For those unaware, I want to point out that we created an external location from the container where the config folder is stored and used.
Deleting containers will not delete any external volumes/folders you linked to it, just what's inside the container itself.
This means that if you delete the Jellyfin container, your config folder will be retained. As long as you keep this external config folder, you can reuse it for future Jellyfin updates to carry over your entire server settings, playlists, watched history, metadata, etc. The only thing that won't transfer over with just the config folder alone is metadata stored along with your media files.
‐---------------------
Edit 2: Added a link to the Jellyfin Docs about Docker Compose.
‐---------------------
Edit 3: Clarified the "JELLYFIN_PublishedServerUrl" option in the compose file example.
----------------------
Edit 4: Another thing I want to point. When you edit the compose file with new changes, the changes will not apply to the current container until it's destroyed and rebuilt. When you edit the compose file within Container Manager, it gives you the option of rebuilding the container straight away, or just to save the file. If you save the file only, make sure to rebuild it later for your changes to apply.
Synology's DSM update to v7 updated the Docker program to what it is now, the Container Manager. Here, you can upload/write YAML files to launch a container.
If you don't have Container Manager on your NAS, install it through the Package Center.
In the Container Manager, you can select from multiple views:
- Overview: Self-explanatory
- Project: Place to create projects using compose files
- Container: List of all existing containers and their current status
- Image: List of Docker images currently stored on your NAS
- Registry: Place to find and download Docker images
- Network: List of networks and their current status
- Log: Self-explanatory
We'll be using the Project view to run Jellyfin with a compose YAML file.
Note: I'll go over how to set-up the compose YAML file at the end.
Now on to the guide:
- Open File Station.
- In the "docker" folder, create a folder named "jellyfin" (note: you can chose where to save this, you're not forced to store this in "docker").
- In the "jellyfin" folder, create two folders: "cache" & "config".
- Using a text editor, create a compose file on your computer (instructions at end of guide).
- Open Container Manager's Project view.
- Create a new project.
- Give the project a name.
- For the path, click on "Set Path" and select the "jellyfin" folder you created in step 2 (you'll get a "compose.yaml" file stored in this location when this project is created).
- For source, select the "Upload docker-compose.yaml" option, then click on browse to upload your compose file.
- You'll see a view of your compose file from which you can still edit it. Just click next a couple of times, then click on "done".
- If you unselected the last option in step 10 to not start the project immediately after creation, right-click on the project and then on build.
- A pop-up will appear. The Docker image specified in the compose file will start downloading if it's not present on your NAS.
- The pop-up will end with an exit code (0=no errors).
- You should now have a running Jellyfin instance that you can access by going to a browser and opening "<your-nas-IP>:<port-chosen>"
The following is how the compose YAML file should be written.
Just copy and paste this into a text editor, edit it, then make sure to save it with a .yaml file extension. As in, you can save this to a .txt file, then just rename the text file from .txt to .yaml.
Comments in a YAML file are preceded with "#". Deleting the # symbol will make the line apply when you run the compose file.
Notes:
- PUID = Process User ID
- PGID = Process Group ID
- User ID and Group ID of 0 is root (omitting both PUID and PGID will also make the container run through root)
- Following the previous steps, this compose file already links to the cache and config folders that we created.
- If your Synology NAS has an iGPU, make sure to uncomment the device section to allow for HWA.
- The TZ environment variable will determine if Jellyfin's tasks run correctly at your selected times.
- For your media folders, replace "<path-to-folder>" with the folders leading to your media files.
- I added some comments to the example compose file. You can remove them later if you want to clean this up for your personal use.
- The code block in this forum makes the compose file have double-line spacing. You can delete these too if you want to make it more compact.
Code:
services:
jellyfin:
#for specific image-> image: jellyfin/jellyfin:10.8.13
image: jellyfin/jellyfin:latest
container_name: Jellyfin
environment:
#- PUID=0
#- PGID=0
- TZ=America/Los_Angeles
#- JELLYFIN_PublishedServerUrl=192.168.1.#
#note: change TZ to your timezone identifier: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
volumes:
- /volume1/docker/jellyfin/cache:/cache:rw
- /volume1/docker/jellyfin/config:/config:rw
#- /volume1/<path-to-folder>/shows:/shows:rw
#- /volume1/<path-to-folder>/movies:/movies:ro
#note: (:rw = read/write) & (:ro = read only)
#devices:
#- /dev/dri/renderD128:/dev/dri/renderD128
#- /dev/dri/card0:/dev/dri/card0
#note: uncomment these lines in devices to allow for HWA to work on Synology units with an iGPU
ports:
- 8096:8096/tcp
#- <port-to-use>:8096/tcp
network_mode: bridge
#network_mode: host
restart: unless-stopped
Also check out the Official Jellyfin documentation about Docker Compose: https://jellyfin.org/docs/general/instal...er-compose
After all this, you should end up with a project in Container Manager's Project view and a running container.
You can now open the project to view its details.
Here, you can modify the YAML configuration it uses (the project needs to be stopped first to edit it).
You'll be able to add/remove media folders or even select a specific Jellyfin Docker image from here in the future.
Also as a final note, in the Project view:
- Build: Create the container
- Clean: Delete the present container
If somebody finds an error with this, let me know and I'll update this.
‐---------------------
Edit:
I forgot to mention this originally. For those unaware, I want to point out that we created an external location from the container where the config folder is stored and used.
Deleting containers will not delete any external volumes/folders you linked to it, just what's inside the container itself.
This means that if you delete the Jellyfin container, your config folder will be retained. As long as you keep this external config folder, you can reuse it for future Jellyfin updates to carry over your entire server settings, playlists, watched history, metadata, etc. The only thing that won't transfer over with just the config folder alone is metadata stored along with your media files.
‐---------------------
Edit 2: Added a link to the Jellyfin Docs about Docker Compose.
‐---------------------
Edit 3: Clarified the "JELLYFIN_PublishedServerUrl" option in the compose file example.
----------------------
Edit 4: Another thing I want to point. When you edit the compose file with new changes, the changes will not apply to the current container until it's destroyed and rebuilt. When you edit the compose file within Container Manager, it gives you the option of rebuilding the container straight away, or just to save the file. If you save the file only, make sure to rebuild it later for your changes to apply.