How to Install Jellyfin Media Server with Docker

Follow our step-by-step guide to installing Jellyfin Media Server using Docker Compose. Enjoy a free, open-source streaming solution today!

Have you ever dreamed of setting up your personal Netflix minus the monthly subscription fees? Well, youโ€™re in for a treat! Enter Jellyfin, a fantastic free and open-source media server that puts you in total control of your media collection.

But letโ€™s sprinkle a bit of tech magic on top โ€“ we will use Docker Compose to streamline the installation. If youโ€™re scratching your head thinking, โ€œDocker, what?โ€œ donโ€™t worry! Weโ€™ll break everything down into bite-sized, easy-to-follow steps.

By the end of this guide, you’ll have a spiffy Jellyfin Media Server humming along, ready to serve your favorite shows and movies. So, let’s dive in!

Prerequisites

Before we set sail, letโ€™s ensure we have all our digital tools in the box. In this light, installing Docker and Docker Compose is required to deploy a containerized Jellyfin.

So, if you donโ€™t already have Docker installed, any of the following guides will be helpful:

The other essential component is Docker Compose. Remember, it is provided separately from Docker. Therefore, you must Install Docker before adding Docker Compose; otherwise, Compose will not function.

Installing it is pretty simple, even if it is not already on your Linux system. To install Docker Compose, type the following two commands:

sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-composeCode language: JavaScript (javascript)

Install Jellyfin with Docker Compose

It is time to get to the installation, armed with all the necessary tools.

Step 1: Setting up Working Directory

The first step is to create the project directory in which our Docker Compose deployment file will be placed. Then switch to it; from here on, you need to execute all commands further down in this guide from that location.

mkdir jellyfin
cd jellyfin

Step 2: Create a Docker Compose File

Next, we must create a “docker-compose.yaml” file, like a blueprint for our Docker setup. This file will define the services, volumes, ports, etc., telling Docker Compose what to do and how to set up our Jellyfin instance.

So, open your favorite text editor and paste the following content into it:

nano docker-compose.yamlCode language: CSS (css)
version: "3"
services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    volumes:
      - jellyfin-config:/config
      - /home/linuxiac/media:/media
    ports:
      - 8096:8096
    restart: unless-stopped
volumes:
  jellyfin-config:Code language: PHP (php)

Of course, don’t forget to change the directive “/home/linuxiac/media” in the file above’s “volumes” section to the full path to the directory of the computer on which you are running the dockerized Jellyfin instance, which contains the media content it will stream.

In other words, this directory will be mounted in the Jellyfin container’s filesystem in “/media.” This is where your movies, photos, music, etc., are expected to reside.

For the purposes of this guide, we have placed two directories inside it containing movies and photos.

The directory that stores our media content.
The directory that stores our media content.

Don’t forget to change the time zone (“TZ “) to the correct one for you. A full list of all such can be found here.

Step 3: Deploy Jellyfin with Docker Compose

With the “docker-compose.yaml” file defined, we are all set to run our dockerized Jellyfin instance using Docker Compose. So, ensure you are in the directory containing the file, and execute the following command to start and run the container in the background:

docker-compose up -d

The Docker image will start downloading. In the end, you should see a screen similar to the one below, informing you that your Jellyfin server installation has been successfully deployed and is up and running.

Install the Jellyfin media server with Docker Compose.
Install the Jellyfin media server with Docker Compose.

Access & Configure Jellyfin

Once the container is up and running, you can access the Jellyfin web interface by navigating to “http://your-server-ip:8096” in your web browser. If you are accessing it from the same machine the container is running on, you can also use “http://localhost:8096.”

The Jellyfin wizard will greet you. Select your preferred display language and click “Next.”

Select your preferred language.
Select your preferred language.

The Jellyfin server’s admin account will be created on the next screen. Enter a username and password of your choice and continue by clicking “Next.”

Create Jellyfin's admin account.
Create Jellyfin’s admin account.

It is time to tell Jellyfin where our media content is. Click on the “Add Media Library” button.

Setting up a media directory.
Setting up a media directory.

Select the content type, such as “Movies,” “Music,” “Photos,” etc., then click on the plus (“+ “) button to specify where the directory is physically located in the container’s file system. In our case, we will add a directory containing movies.

Setting up a media directory.
Setting up a media directory.

To navigate, simply click on the directory names that you see until the complete path – for example, “/media/movies” – is presented in the “Folder” field.

Important clarification! This is the path to the filesystem inside the container, referenced in the “volumes” part of our “docker-compose.yaml” file. Not to be confused with that of the server on which the container itself is running.

In other words, on our host, the directory is, for example, “/home/linuxiac/media,” but inside the container, it is mounted as “/media.”

Setting up a media directory.
Setting up a media directory.

The directory will be previewed in the “Folders” section so we can move on by clicking the “OK” button, keeping the other settings at default.

Setting up a media directory.
Setting up a media directory.

On the next screen, you will view the currently added directories. If you want, add others following the steps described above.

Don’t worry about having to add all at once now. At a later stage, you can modify the settings of each one, remove, or add a new one, as we will show you at the end of this guide. So, just click on the “Next” button to continue. We’re almost done!

View the added directories.
View the added directories.

Choose the language you prefer to retrieve metadata for library media content and click “Next.”

Choose the preferred metadata language.
Choose the preferred metadata language.

We strongly recommend leaving “Allow remote connections to this server” checked on the next screen. Otherwise, you won’t be able to connect other devices, such as your phone, tablet, smart TV, etc., to the Jellyfin server.

Set up remote access.
Set up remote access.

And that’s it – we’re ready! Click the “Finish” button to complete and save the settings you made to the Jellyfin server.

Completing the Jellyfin server setup.
Completing the Jellyfin server setup.

You will be redirected to a screen to login to your Jellyfin server. Enter the admin username and password you created earlier and hit “Sign In.”

Log in to the server.
Log in to the server.

The dashboard of your brand new Jellyfin server will welcome you, and as we can see, our “Movies” library is there. You can click on it to explore its content.

Jellyfin media server successfully instaled using Docker Compose.
Jellyfin media server successfully installed using Docker Compose.

Add, Edit, Remove Media Libraries

Click the hamburger menu in the upper left corner of the screen and choose “Dashboard” from the list of options to add, edit, and remove a library from the Jellyfin server.

Then, choose “Libraries” from the left and hit the “+” button to add a new one. To edit the settings of an existing one or remove it, use the icon with the three vertical dots on it.

Add, edit, and remove media libraries.
Add, edit, and remove media libraries.

Jellyfin Client Applications

To install and connect to your Jellyfin media server, click this link to get the client apps for various devices, including smartphones, tablets, and smart TVs.

Conclusion

And there you have it – a powerful, flexible, and open-source media server at your fingertips, ready to stream content to all your devices. Remember, the beauty of this setup is that it is entirely yours to customize, explore, and expand as your media collection grows and evolves.

As you can see, deploying the Jellyfin media server with Docker Compose simplifies the installation and management of the media server, making it accessible and easy to set up.

We highly recommend you check out our “How to Install and Use Docker Compose” guide to familiarize yourself with the basic Docker Compose commands and easily manage your new Jellyfin deployment.

Furthermore, if you’re wondering, “OK, but how can I update the Jellyfin container when a new version comes out?” there’s no room for worry. Weโ€™ve got you covered! With the help of Watchtower and our detailed and easy-to-follow guide, โ€œWatchtower: Automatically Update Docker Container Images,โ€ youโ€™ll always have the most up-to-date Jellyfin version.

Finally, we also recommend checking out the official documentation.

Thank you for choosing to sail through this digital endeavor with us. Until our next tech adventure, happy streaming, dear friends!

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%