Jellyfin 10.10.x on Ubuntu 24 LTS


Installing Jellyfin on Ubuntu

If you’ve been running Jellyfin on a RHEL-based Linux distribution like Rocky Linux, you’ve probably run into a frustrating limitation: the available packages are often outdated. This becomes a real problem when clients like the Fire TV Stick require a recent version of Jellyfin to function properly. Ubuntu, on the other hand, supports the latest packages, making it a much better fit for a modern Jellyfin setup.

Below is the full installation script I used to get Jellyfin up and running on Ubuntu, including AutoFS for NFS mounts, network configuration via Netplan, and media directory setup to mirror my original Rocky Linux layout.

#!/bin/bash

# Exit immediately if a command exits with a non-zero status.
set -e

# ============================================
# Update system and install dependencies
# ============================================
echo "Updating system and installing dependencies..."
sudo apt update && sudo apt upgrade -y
sudo apt install -y curl gnupg software-properties-common

# Enable the universe repository
echo "Enabling the universe repository..."
sudo add-apt-repository universe -y

# Install Jellyfin and required packages
echo "Installing Jellyfin and required packages..."
curl https://repo.jellyfin.org/install-debuntu.sh | sudo bash
sudo apt install -y jellyfin jellyfin-server jellyfin-web ffmpeg cifs-utils autofs

# ============================================
# Configure SSH for root login
# ============================================
echo "Configuring SSH to allow root login..."
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo systemctl restart ssh

# Set password for root
echo "Setting password for root..."
sudo passwd root

# ============================================
# Configure AutoFS for NFS mount
# ============================================
echo "Configuring AutoFS for NFS mount..."
# Set up AutoFS NFS configuration
echo 'root    -rw,soft,rsize=8192,wsize=8192,tcp 10.10.10.10:/volume1/root' | sudo tee /etc/auto.syn9 > /dev/null

# Configure AutoFS master map
echo '/mnt/netgear /etc/auto.syn9 --timeout=6000 --ghost' | sudo tee /etc/auto.master.d/syn9.autofs > /dev/null

# Restart AutoFS service
sudo systemctl restart autofs

# Mount shares using AutoFS
echo "Mounting shares using AutoFS..."
sudo mount

# ============================================
# Restart Jellyfin to pick up new media directories
# ============================================
echo "Restarting Jellyfin service..."
sudo systemctl stop jellyfin.service
sudo systemctl start jellyfin.service

# ============================================
# Set up media directories for Jellyfin
# ============================================

#This was necessary to mimic the original setup that was on Rocky Linux 8.
echo "Setting up media directories for Jellyfin..."
sudo mkdir -p /nas/Media/TV /nas/Media/DVD
sudo ln -s /mnt/netgear/root/Media/TV/ /nas/Media/
sudo ln -s /mnt/netgear/root/Media/DVD/ /nas/Media/

# ============================================
# Networking Configuration with Netplan
# ============================================
echo "Configuring network settings using netplan..."

# Display current network status
echo "Displaying current network status..."
netplan status
ip link show
netplan info

# Back up and edit netplan configuration
echo "Backing up and editing netplan configuration..."
cd /etc/netplan/
sudo cp 50-cloud-init.yaml 50-cloud-init.yaml.old
sudo vim 50-cloud-init.yaml

# Apply new network configuration
echo "Applying new network configuration..."
sudo netplan apply

# ============================================
# Script complete
# ============================================
echo "Setup complete. Jellyfin and AutoFS should now be configured."

What the Script Does

The script handles several things in sequence. It starts by updating the system and pulling in dependencies, then adds the universe repository and installs Jellyfin directly from the official Jellyfin repository using their provided installer script. FFmpeg is included for media transcoding, and AutoFS and CIFS utilities are added for network share support.

SSH is configured to allow root login, which was necessary to match the access setup from the original server. AutoFS is then configured to mount an NFS share from a Synology NAS, with a generous timeout to keep the mount alive during periods of inactivity.

The media directories are created as symbolic links pointing to the NFS share, specifically to replicate the directory structure that existed on the previous Rocky Linux 8 installation. This keeps Jellyfin’s library paths consistent so libraries don’t need to be rebuilt from scratch. Finally, Netplan is used to configure the network interface with a static setup appropriate for a home server.

Migrating Metadata from the Old Server

One pleasant surprise was that copying over the Jellyfin data directory from the old Rocky Linux server worked without issue. After a few minor tweaks, all the metadata came through intact. The directory structure that Jellyfin uses looks like this:

/var/lib/jellyfin
.
├── cache
├── data
├── metadata
├── plugins
├── root
├── Subtitle Edit
└── transcodes
8 directories

As long as ownership and permissions are set correctly for the jellyfin user, dropping these directories in place on the new Ubuntu server is a clean way to preserve your library without a full re-scan.