Setup a Media Server with Jellyfin on Ubuntu 24

By Raman Kumar

Updated on Jun 23, 2025

Setting Up a Personal Media Server with Jellyfin on Ubuntu 24.04 Server

In today's digital era, we all generate or consume a vast amount of media—movies, TV shows, music, family videos, and more. Hosting our personal media server gives us full control, accessibility, and privacy. That's where Jellyfin, an open-source and free media server, comes into play.

We’ll walk through setting up a personal media server using Jellyfin on Ubuntu 24.04 Server. We’ll cover everything from system preparation to accessing our media from any device.

What is Jellyfin?

Jellyfin is a free and open-source media server solution that allows us to organize, stream, and access our media content across devices. It’s a modern alternative to Plex or Emby, but with no restrictions or premium tiers. Since Jellyfin is fully self-hosted, we retain complete ownership and control over our data.

Prerequisites

Before we begin, let’s ensure our environment meets the following requirements:

  • A Ubuntu 24.04 installed dedicated server or KVM VPS.
  • A non-root user with sudo privileges.
  • Basic knowledge of using the terminal.

How to Set Up a Personal Media Server with Jellyfin on Ubuntu 24.04 (Step-by-Step Guide)

Step 1: Update the Server

Keeping our system updated ensures we have the latest security patches and libraries.

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Dependencies

Jellyfin requires some essential libraries and utilities. Let’s install them first.

sudo apt install apt-transport-https ca-certificates gnupg curl -y

Step 3: Install Jellyfin

To simplify deployment and help automate this for as many users as possible, we provide a BASH script to handle repo installation as well as installing Jellyfin on Debian / Ubuntu and derivatives.

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

To check the status:

sudo systemctl status jellyfin

Step 4: Install Nginx

sudo apt install nginx -y

Once installed, check the status:

sudo systemctl status nginx

Ensure it's active and running. If needed:

sudo systemctl enable nginx
sudo systemctl start nginx

Step 5: Allow HTTP and HTTPS Through UFW

If using UFW firewall, allow required ports:

sudo ufw allow 'Nginx Full'
sudo ufw reload

Step 6: Configure Nginx for Jellyfin

We’ll create a dedicated server block (virtual host) for our domain.

Create a config file:

sudo nano /etc/nginx/sites-available/jellyfin

Add the following content (replace media.example.com with our actual domain):

server {
    listen 80;
    server_name media.example.com;

    location / {
        proxy_pass http://localhost:8096;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_request_buffering off;
        proxy_buffering off;
    }
}

Save and exit (Ctrl+O, then Ctrl+X).

Enable the Config and Test

sudo ln -s /etc/nginx/sites-available/jellyfin /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Now http://media.example.com should proxy to Jellyfin.

Step 7: Install Certbot and SSL Certificate

Install Certbot and Nginx plugin:

sudo apt install certbot python3-certbot-nginx -y

Obtain SSL Certificate

Run this command to automatically update the Nginx config and install the SSL certificate:

sudo certbot --nginx -d media.example.com

Follow the prompts:

  • Enter a valid email
  • Agree to terms
  • Choose whether to redirect all HTTP to HTTPS (we recommend Yes)

Certbot will automatically add the SSL block.

Access the Jellyfin

https://media.example.com

We’ll now go through Jellyfin’s initial setup:

  • Set admin username and password
  • Select language
  • Add media libraries (movies, TV shows, etc.)
  • Configure remote access if desired

Step 8: Organize Our Media Libraries

Jellyfin supports organizing content into libraries such as:

  • Movies
  • TV Shows
  • Music
  • Home Videos
  • Books and Audiobooks

Let’s create folders like /srv/media/movies, /srv/media/shows, etc., and move our files there.

sudo mkdir -p /srv/media/movies
sudo mkdir -p /srv/media/shows
sudo mkdir -p /srv/media/music

Then ensure Jellyfin has permission:

sudo chown -R jellyfin:jellyfin /srv/media

In the web interface, go to Dashboard → Libraries → Add Media Library, and map the above folders.

Step 9: (Optional) Enable Hardware Acceleration

For better streaming performance, especially with 4K or large video files, we can enable hardware acceleration.

Check if our hardware supports VAAPI (Intel/AMD) or NVENC (NVIDIA). Then in the Jellyfin dashboard:

  • Go to Playback
  • Enable Hardware Acceleration
  • Choose the right encoder (e.g., VAAPI or NVENC)

Make sure drivers are properly installed. For Intel:

sudo apt install i965-va-driver-shaders intel-media-va-driver-non-free

Final Thoughts

Setting up a personal media server with Jellyfin on Ubuntu 24.04 gives us full control, privacy, and freedom over our content. With Jellyfin, there's no need to rely on paid services or limited storage. We host, organize, and stream our content our way—securely, privately, and beautifully.

We now have a fully functioning personal media hub that works across devices and platforms, giving us the Netflix-like experience powered entirely by open source.

Stay tuned for future guides where we’ll explore remote access setup, automatic subtitle downloads, secure backups, and more!