Tice Tips

Jellyfin Docker set up guide

Completely new to docker? Read this guide!

I’ve noticed that a lot of people who are just starting setting up their own media server are having trouble starting with Jellyfin on Docker. Especially when first starting with Linux, Docker can seem a bit overwhelming.

That’s why I’m writing this guide to help people who have never worked with docker to give them a head start to containerization. The guide is meant for people with 0 knowledge of docker, so if you know the basics this guide is probably not for you.

The guide is based on a Ubuntu 18.04 Server installation, but I’ve also tested it on Docker for Windows and Docker for Mac. So you can use this guide for almost any Docker installation

Step 1: Prerequisites

  • Make sure you are running Windows 10, Ubuntu 18.04, or macOS (10.15 or newer)
  • 10GB of storage is available
  • Make sure that you have 4GB of RAM free to run the server.
  • (Preferably) A wired internet connection. Wifi can get unstable and can cause issues with people connecting to your server. 
  • A Static IP address on your computer (Not sure how to do this? check out this guide!).

Step 2: Installing Docker

Step 3: Preparing the folder

Before running the Jellyfin Container. We need to make 3 folders:

  • Config

  • Cache

  • Media

For Ubuntu/Mac use:

mkdir -p Path/To/Config

mkdir -p Path/To/Cache

mkdir -p Path/To/Media

For Windows, you can use File Explorer to create the folders.

These folders will be used by Jellyfin to store data. By default, everything inside a Docker container gets removed once you delete the container. By making these folders you are able to delete the Jellyfin container while keeping your data. Amazing!

Step 4: Creating the docker-compose file

Now you’ve got Docker up and running, it is time to prepare the docker-compose.yml to make sure that your configuration persists if you shut down your server. This step is really quite simple.

  • Open the docker-compose.yml file with the editor of your choice. (Notepad++, Visual Studio Code, etc.)
  • Copy and Paste the following in that file:
version: "3.5"
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    user: 1000:1000
    network_mode: "host"
    volumes:
      - /path/to/config:/config
      - /path/to/cache:/cache
      - /path/to/media:/media
    restart: "unless-stopped"

After altering these options to suit your needs you will be ready to run the command to start the Jellyfin Docker container!

Below is a table that will explain what the different options mean

Step 4.1: Jellyfin Parameters

Option Explanation
image:jellyfin/jellyfin This specifies what “image” to use to start the container with. We will be using the official Jellyfin Image.
container_name: jellyfin The name of the container, this name needs to be unique, you cannot use the same name twice.
user 1000:1000 Is option for Ubuntu to specify that you want to run the Container as the current user. This command is not necessary if you are using Docker for Desktop
network_mode: “host” This option will tell the container to use the same network as the computer that it is running on. This means that if you have this running on your windows machine, you will be able to access jellyfin by using http://localhost:8096 instead of a different IP
/path/to/config:/config This option connects the “/path/to/config” folder on your Host to the “/config” inside the container. You do not need to have any config present in /path/to/config as during the run command of the container Jellyfin will generate all of the necessary files. Everything in front of the colon is the of the config folder you’ve created in the previous step.
/path/to/cache:/cache This option connects the “/path/to/cache” folder on your Host to the “/cache” inside the container.
/path/to/media:/media This option connects the “/path/to/media” folder on your Host to the “/media” inside the container. This option has to be added in order for Jellyfin to find your media files. It is also possible that you have your media files spread across different places.
restart: “unless-stopped” This option will make sure that whenever your computer starts, Jellyfin will also start. And that Jellyfin only stops when you give the docker stop command. If you do not want this, you can use different restart options: no, on-failure, always

Step 5: Starting Jellyfin on Docker

In the same folder as the docker-compose.yml file you’ve created run the following command:

docker-compose up -d

When you have executed the command to run Jellyfin give it a minute or 2 for it to start up and then you will be able to access it from http://localhost:8096

Step 6: Done!

You now successfully have a Jellyfin Media server running inside Docker! Now you can play around with it to see if you like it.

Hopefully, this guide will help people explore Docker and the capabilities it has.

You may also like:

Palworld Xbox Dedicated Server Docker set up guide Palworld has been released in early access! But how do you start an Xbox

Palworld Dedicated Server Docker set up guide Palworld has been released in early access! But how do you start a server to

By Thijs van Loef
Posted on: 14/11/2021

No Comments on Jellyfin Docker set up guide

Leave A Comment