Jellyfin 10.10.x on Ubuntu 24 LTS

This is the raw process used to install Jellyfin on Ubuntu. Ubuntu supports the latest packages unlike the RHEL Linux flavors. This is unfortunate since the clients used for the Fire TV sticks and the like require the latest version of Jellyfin.

#!/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."

As a bonus, I was able to copy over the metadata and everything seems to be working just fine after a few tweaks.

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

8 directories