Home » Guides » How Do You Install Jellyfin on Linux: Ubuntu, Debian, CentOS, Arch Linux, RHEL, Gentoo, etc.?

How Do You Install Jellyfin on Linux: Ubuntu, Debian, CentOS, Arch Linux, RHEL, Gentoo, etc.?

Jellyfin is a free media server that allows users to host and manage media libraries. The open-source software allows streaming across devices and platforms and offers access to others. Jellyfin serves as a masterful alternative to popular media servers like Emby and Plex and offers extensive customizations and features, including a robust privacy architecture. 

It originally descended from the legacy Emby’s 3.5.2 release and was ported to the .NET framework, allowing cross-platform functionality. However, it is a totally free-to-use software with no hidden charges or licenses required. The following guide will help readers install Jellyfin on Linux distributions like Ubuntu, Debian, RHEL, CentOS, and so on.

Table Of Contents

What is Jellyfin?

The software consists of a server application, that is installed on a machine running either Windows, macOS, Linux, or within a Docker environment, as well as a client application. As a free and open-source software, you can use Jellyfin to organize, manage, and stream your digital media libraries from local storage or the cloud without any worries. 

Jellyfin is a software that offers the following features:

  • Cross-platform support
  • Mobile Apps
  • Customization
  • Plugins
  • Streaming
  • Remote Access
Jellyfin, install jellyfin on linux
Jellyfin

Methods To Install Jellyfin On Linux

It is actually quite easy to install Jellyfin on Linux as long as you follow the steps mentioned below. We have listed a few methods to do so. These are:

Method 1. Install Jellyfin On Linux Using Docker

You can use Docker to install Jellyfin on most Linux distributions. Here’s how:

Step 1. First, start by installing Docker on your system, for that you need to do the following:

Step1.1 – Start by setting up the Docker’s apt repository.

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Step 1.2 – Now, add the repository to APT:

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

Step 1.3 – Update the APT repo:

sudo apt-get update

Step 1.4 – Now, install the necessary Docker packages.

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Step 1.5 – Then, verify that the Docker is running by using the hello-world image.

sudo docker run hello-world

Step 2. Once, Docker is up and running, download the latest container image.

docker pull jellyfin/jellyfin

Step 3. After that, create persistent storage for configuration and cache data.

Step 3.1 – Either use bind mounts to create two directories on the host 

mkdir /path/to/config
mkdir /path/to/cache

Step 3.2 – Or create two persistent volumes:

docker volume create jellyfin-config
docker volume create jellyfin-cache

Step 4. Now, all you have to do is run a container, which can be done in the following ways:

Using the Docker command line interface

docker run -d \
 --name jellyfin \
 --user uid:gid \
 --net=host \
 --volume /path/to/config:/config \ # Alternatively --volume jellyfin-config:/config
 --volume /path/to/cache:/cache \ # Alternatively --volume jellyfin-cache:/cache
 --mount type=bind,source=/path/to/media,target=/media \
 --restart=unless-stopped 
 jellyfin/jellyfin

Using Docker Compose

For this method, you need to create a docker-compose.yml file first and then add the following:

services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    user: uid:gid
    network_mode: 'host'
    volumes:
      - /path/to/config:/config
      - /path/to/cache:/cache
      - type: bind
        source: /path/to/media
        target: /media
      - type: bind
        source: /path/to/media2
        target: /media2
        read_only: true
    restart: 'unless-stopped'
    # Optional - alternative address used for autodiscovery
    environment:
      - JELLYFIN_PublishedServerUrl=http://example.com
    # Optional - may be necessary for docker healthcheck to pass if running in host network mode
    extra_hosts:
      - 'host.docker.internal:host-gateway'

After that, run the following command in the same folder as the docker-compose.yml file:

docker compose up

Method 2. Install Jellyfin On Linux Using Podman

Podman is a tool that allows users to run rootless containers. You can use Podman to install Jellyfin on Linux, here’s how:

Step 1. First, install Podman:

sudo dnf install -y podman

Step 2. Then, create and run a Jellyfin container:

podman run \
 --detach \
 --label "io.containers.autoupdate=registry" \
 --name myjellyfin \
 --publish 8096:8096/tcp \
 --rm \
 --user $(id -u):$(id -g) \
 --userns keep-id \
 --volume jellyfin-cache:/cache:Z \
 --volume jellyfin-config:/config:Z \
 --mount type=bind,source=/path/to/media,destination=/media,ro=true,relabel=private \
 docker.io/jellyfin/jellyfin:latest

Step 3. After that, open the necessary ports in your machine’s firewall to permit access to the Jellyfin server from outside the host. 

Note: It is not done automatically when using rootless Podman. Use the following commands to save and load a new firewall rule opening the HTTP port 8096 for TCP connections.

sudo firewall-cmd --add-port=8096/tcp --permanent
sudo firewall-cmd --reload

With Systemd

You can also install Jellyfin with Systemd, although it is recommended to run the container rootless. And for that, you have to manage the container with the systemd –user flag.

Step 1. Create a new user under which the rootless container will run.

useradd jellyfin
loginctl enable-linger jellyfin

Step 2. Now, open an interactive shell session.

machinectl shell jellyfin@

Step 3. Finally, install .config/containers/systemd/jellyfin.container with the following content:

[Container]
Image=docker.io/jellyfin/jellyfin:latest
AutoUpdate=registry
PublishPort=8096:8096/tcp
UserNS=keep-id
Volume=jellyfin-config:/config:Z
Volume=jellyfin-cache:/cache:Z
Volume=jellyfin-media:/media:Z
[Service]
# Inform systemd of additional exit status
SuccessExitStatus=0 143
[Install]
# Start by default on boot
WantedBy=default.target

Step 4. Now, reload daemon and start the service.

systemctl --user daemon-reload
systemctl --user start jellyfin

Step 5. Lastly, enable Podman auto-updates.

systemctl --user enable --now podman-auto-update.timer

Method 3. Build Jellyfin With Container Image

You can always build Jellyfin from source using container image as an alternative. 

Step 1. First, clone the repository:

git clone https://github.com/jellyfin/jellyfin-packaging.git
cd jellyfin-packaging

Step 2. Then, initialize the submodules.

git submodule update --init

Step 3. After that, build the container image using Docker or Podman.

docker build -t $USERNAME/jellyfin --file docker/Dockerfile .

Or,

podman build -t $USERNAME/jellyfin --file docker/Dockerfile .

Step 4. You can also use the provided Python build script:

./build.py auto docker

Step 5. Lastly, run Jellyfin in a new container using Docker or Podman from the built container image.

docker run -d -p 8096:8096 $USERNAME/jellyfin

Or, 

podman run -d -p 8096:8096 $USERNAME/jellyfin

Method 4. Install Jellyfin On Linux From Source

Step 1. Again, clone the repository.

git clone https://github.com/jellyfin/jellyfin-packaging.git
cd jellyfin-packaging

Step 2. Then, initialize the submodules.

git submodule update --init

Step 2.1 – You have to use the included build script to perform builds.

./build --help
./build --list-platforms
./build <platform> all

The rest of the steps are the same as the previous method.

Method 5. Using Official Repositories To Install Jellyfin on Linux

There are official repositories that support Jellyfin on Linux, and you can use them to install it on respective distros.

Alpine Linux

Step 1. First, enable the Repository (if not already enabled):

Step 1.1 – For this, you have to edit the /etc/apk/repositories file.

Step 1.2 – Open the file in a text editor:

sudo nano /etc/apk/repositories

Step 1.3 – Uncomment (remove the # at the beginning) the line that looks like this:

#http://dl-cdn.alpinelinux.org/alpine/v3.18/community

Step 2. Save the file and then update the package index:

sudo apk update

Step 3. Finally, install Jellyfin:

sudo apk add jellyfin

Arch Linux

Step 1. Update the system repository:

sudo pacman -Syu

Step 2. Now, install Jellyfin from the repository.

sudo pacman -S jellyfin

Step 3. After installation, start the Jellyfin service and enable it to start on boot.

sudo systemctl start jellyfin
sudo systemctl enable jellyfin

Fedora

Step 1. Start by updating the repo:

sudo dnf update

Step 2. Then access the Jellyfin repository for Fedora and add it to your system.

sudo dnf config-manager --add-repo https://repo.jellyfin.org/rpm/fedora/jellyfin.repo

Step 3. Now, you can install Jellyfin.

sudo dnf install jellyfin
Using RPM Fusion

Step 1. First, enable rpmfusion:

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Step 2. Now, install the Jellyfin package:

sudo dnf install jellyfin

Step 3. Finally, enable and start the Jellyfin service:

sudo systemctl enable --now jellyfin
Manual Installation

Step 1. Start by enabling rpmfusion:

sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

Step 2. Then install the Jellyfin server

sudo dnf install <link to server `.rpm` file URL>

Step 3. After that, install the Jellyfin web interface

sudo dnf install <link to web `.rpm` file URL>

Step 4. Finally, enable and start the Jellyfin service:

sudo systemctl enable --now jellyfin

Note: You might need to allow Jellyfin through the firewall:

sudo firewall-cmd --permanent --add-service=jellyfin
sudo firewall-cmd --reload

Go to localhost:8096 or ip-address-of-jellyfin-server:8096 to finish setup in the web UI

CentOS

Step 1. Update the repo:

sudo yum update -y

Step 2. Then, create a new repository file for Jellyfin:

sudo nano /etc/yum.repos.d/jellyfin.repo

Step 2.1 – Add the following content to the file:

[jellyfin]
name=Jellyfin Repository
baseurl=https://repo.jellyfin.org/releases/server/centos/7/stable/
enabled=1
gpgcheck=1
gpgkey=https://repo.jellyfin.org/releases/server/centos/jellyfin_signing_key.asc

Step 3. Save the file and exit the editor (Ctrl + O to save and Ctrl + X to exit).

Step 4. Use YUM to install Jellyfin.

sudo yum install jellyfin -y

Debian/Ubuntu

Step 1. Update the package repo:

sudo apt upgrade

Step 2. Then, add the Jellyfin Repository:

sudo apt install apt-transport-https gnupg
wget -O - https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/jellyfin_team-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/jellyfin_team-archive-keyring.gpg] https://repo.jellyfin.org/debian $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list

Step 3. Install Jellyfin:

sudo apt update
sudo apt install jellyfin
Automatic Installation

Jellyfin offers a straightforward BASH script to handle all the necessary installation via a single command:

curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash

Just verify the script download integrity with (requires sha256sum) after it:

diff <( curl -s https://repo.jellyfin.org/install-debuntu.sh -o install-debuntu.sh; sha256sum install-debuntu.sh ) <( curl -s https://repo.jellyfin.org/install-debuntu.sh.sha256sum )

Finally, inspect the script

less install-debuntu.sh
sudo bash install-debuntu.sh
Using Extrepo (Only Debian)

The extrepo command is only supported on Debian. It allows users to bypass the curl/sudo combo that relies on the webserver security. 

Step 1. Install Extrepo:

sudo apt install extrepo

Step 2. Then use Extrepo to install Jellyfin:

sudo extrepo enable jellyfin

Step 3. Quickly update your APT repositories:

sudo apt update

Step 4. Lastly, install the Jellyfin metapackage, which will automatically fetch the various sub-packages:

sudo apt install jellyfin
Manual Installation

Yes, you can always install everything manually, here’s how:

Step 1. First, install curl and gnupg:

sudo apt install curl gnupg

Step 2. Then, install the software-properties-common package:

sudo apt-get install software-properties-common

Step 3. After that, enable the Universe repository to obtain all the FFmpeg dependencies:

sudo add-apt-repository universe

Step 4. Now, download the GPG signing key (signed by the Jellyfin Team) and install it:

sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/jellyfin.gpg

Step 5. After that, add a repository configuration at /etc/apt/sources.list.d/jellyfin.sources:

export VERSION_OS="$( awk -F'=' '/^ID=/{ print $NF }' /etc/os-release )"
export VERSION_CODENAME="$( awk -F'=' '/^VERSION_CODENAME=/{ print $NF }' /etc/os-release )"
export DPKG_ARCHITECTURE="$( dpkg --print-architecture )"
cat <<EOF | sudo tee /etc/apt/sources.list.d/jellyfin.sources
Types: deb
URIs: https://repo.jellyfin.org/${VERSION_OS}
Suites: ${VERSION_CODENAME}
Components: main
Architectures: ${DPKG_ARCHITECTURE}
Signed-By: /etc/apt/keyrings/jellyfin.gpg
EOF

Here onwards, the rest of the steps are the same as the previous method

Using DEB Packages

Step 1. Enable the Universe repository to obtain all the FFmpeg dependencies:

sudo add-apt-repository universe

Step 2. Install the desired jellyfin-server, jellyfin-web, and jellyfin-ffmpeg .deb packages from the repository

sudo dpkg -i jellyfin_*.deb jellyfin-ffmpeg_*.deb

Step 3. Then, use apt to install any missing dependencies:

sudo apt -f install

Gentoo

Just run the following command to install Jellyfin on Gentoo:

emerge www-apps/jellyfin

NixOS

Enable the module for Jellyfin

{
  services.jellyfin.enable = true;
}
Gilbert John Avatar