Docker Day #2: Jellyfin, your personal media server

In today's Docker Day, we learn how to set up our own media server using Jellyfin !

Docker Day #2: Jellyfin, your personal media server
Photo by ByteLanguage.net

Are you tired of using the same old media server software on your Synology NAS? Look no further, because Jellyfin is here to save the day!

Jellyfin is a free, open-source media server that allows you to organize and stream your media collection to all of your devices. It's a great alternative to proprietary media server software, and it's easy to install on a Synology NAS.

On today's Docker Day, I'll walk you through the steps to install Jellyfin on your Synology NAS. I promise it will be a breeze!

But what exactly is Jellyfin?

Jellyfin is a free, open-source software application that allows users to manage and stream their own media collections, such as videos, music, and photos. It is similar to other media server applications, such as Plex and Emby, but with a focus on privacy and decentralization. Jellyfin can be self-hosted on a personal server or device, or used through a public Jellyfin instance. It is available on a variety of platforms, including Windows, Linux, macOS, Android, and iOS.

Jellyfin has a range of capabilities, including the ability to organize and stream media from a central server to multiple devices, support for a variety of media formats and codecs, integration with popular metadata databases for automatic tagging and metadata retrieval, and support for subtitles and audio tracks in multiple languages. It also offers a web-based interface for managing the server and accessing media, as well as various client applications for different platforms. Additionally, Jellyfin offers a wide range of customization options and plugins to extend its functionality.

How to install Jellyfin

^   back to top   ^

There's two ways of how you can install Jellyfin. The easy way, by using Portainer (see Docker Day #1 for how you install Portainer), or the advanced way using the terminal. As usual, I do not recommend using the terminal for beginners.

Using Portainer and docker compose

^   back to top   ^

  • Create a folder for Jellyfin named "jellyfin" within our Docker folder environment. Within this folder, create the subfolders "config" and "cache".
  • Now, navigate to your Portainer app and in your environment (e.g. "local"), click on "Stacks" and then "Add stack".
  • In the Stack window, give the Stack a name and copy paste the following Docker folder into the web editor window:
version: '3.4'
services:
    jellyfin:
        container_name: jellyfin
        image: jellyfin/jellyfin:latest
        restart: unless-stopped
        network_mode: bridge
        ports:
            - '8096:8096'
        environment:
            - PUID=YOUR-PUID
            - PGID=YOUR-PGID
            - TZ=Europe/Berlin
        volumes:
            - '/YOUR_PATH_TO_DOCKER_FOLDER/jellyfin/config:/config'
            - '/YOUR_PATH_TO_DOCKER_FOLDER/jellyfin/cache:/cache'
Docker compose YAML file
  • Make sure to change the paths in the volumes section to the folders that you've created in the first step. Moreover, substitute the PUID and PGID with your own (see my other post on how you can find out your PUID and PGID). You can also change the ports in case they are already in use or if you prefer others. Finally, click on "Deploy stack".
  • Open a web browser and navigate to http://your-nas-ip:8096.
  • Follow the prompts to set up your media library and create a user account.

Using the terminal

^   back to top   ^

Step 1: Install Docker on your Synology NAS

Before you can install Jellyfin, you'll need to have Docker installed on your Synology NAS. If you don't already have Docker installed, you can follow these steps:

  1. Open the Package Center on your Synology NAS.
  2. In the search field, enter "Docker" and press Enter.
  3. Click on the "Docker" package in the search results and then click the "Install" button.
  4. Follow the prompts to complete the installation.
Step 2: Pull the Jellyfin Docker image

Now that Docker is installed, you can pull the Jellyfin Docker image from the Docker Hub registry. To do this, follow these steps:

  1. Open the terminal on your Synology NAS. You can do this by going to Main Menu > Terminal.
  2. Type the following command and press Enter: docker pull jellyfin/jellyfin
  3. Wait for the image to be downloaded. This may take a few minutes.
Step 3: Create a folder for the Jellyfin data

Next, you'll need to create a folder on your Synology NAS to store the Jellyfin data. This includes your media library, settings, and other files.

  1. Open the File Station on your Synology NAS.
  2. Create a new folder in the location of your choice, and name it "jellyfin".
Step 4: Run the Jellyfin Docker container

Now that you have the Jellyfin Docker image and a folder for the data, you're ready to run the Jellyfin Docker container. To do this, follow these steps:

  1. Open the terminal on your Synology NAS.
  2. Type the following command and press Enter:
docker run -d \
  --name jellyfin \
  -p 8096:8096 \
  -p 8920:8920 \
  -v /path/to/jellyfin:/config \
  -v /path/to/media:/media \
  jellyfin/jellyfin
The Docker command to run in the terminal

Replace "/path/to/jellyfin" and "/path/to/media" with the paths to the "jellyfin" folder and your media folders, respectively.

This command will start the Jellyfin Docker container in detached mode, which means it will run in the background. It will also map ports 8096 and 8920 on the host to the same ports on the container, and mount the "jellyfin" and media folders to the container.

Step 5: Access the Jellyfin web interface

Now that the Jellyfin Docker container is running, you can access the Jellyfin web interface to set up your media library and start streaming your media.

  1. Open a web browser and navigate to http://your-nas-ip:8096.
  2. Follow the prompts to set up your media library and create a user account.

That's it, you are done!

^   back to top   ^

Congratz, you now have your own Jellyfin media server running on your device!

I hope this helped! Let me know if you have any other questions.