How to Set Up a Self-Hosted Jellyfin Media Server on Linux (2026 Guide)

Are you tired of paying monthly fees for streaming services, only to find your favourite show has quietly disappeared? A self-hosted media server gives you full control over your content on your own hardware, with zero subscriptions and zero restrictions.

Jellyfin is the leading free and open-source media server platform. In this guide you will learn how to install it on Linux, organise your library, enable hardware transcoding, and open it up for remote access.


What Is Jellyfin?

Jellyfin is a free, open-source media server that lets you organise and stream your personal collection of movies, TV shows, music, books, and photos to any device on your network or over the internet. It is a community-driven fork of Emby, with no premium tier, no telemetry, and no locked features.

Key features include:

  • Streaming to browsers, smart TVs, phones, Kodi, Roku, and more
  • Hardware-accelerated transcoding (Intel, AMD, NVIDIA)
  • Multi-user support with individual libraries and parental controls
  • Live TV and DVR support (with a compatible tuner)
  • Automatic metadata fetching for posters, descriptions, and subtitles

Prerequisites

Before you begin, make sure you have:

  • A Linux machine running Ubuntu 22.04 LTS or Debian 12 (recommended)
  • sudo or root access
  • A media library stored locally on an HDD or NAS mount
  • Basic familiarity with the Linux terminal
  • A static local IP address (recommended, configure this in your router’s DHCP settings)

How To: Install Jellyfin on Ubuntu and Debian

Step 1 – Add the Jellyfin Repository

Jellyfin provides an official APT repository. Add it to your system with a single command:

bash

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

This script automatically detects your distro version and adds the correct repository and GPG key.

Note: If you prefer not to pipe directly to bash, visit jellyfin.org/downloads and follow the manual repository steps for your distro.


Step 2 – Install Jellyfin

Once the repository is added, install the package:

bash

sudo apt update
sudo apt install jellyfin -y

Step 3 – Start and Enable the Service

Enable Jellyfin to start automatically on boot and then start it now:

bash

sudo systemctl enable jellyfin
sudo systemctl start jellyfin

Verify it is running:

bash

sudo systemctl status jellyfin

You should see active (running) highlighted in green.


Step 4 – Open the Web Interface

Open a browser and go to:

http://<your-server-ip>:8096

Replace <your-server-ip> with your machine’s local IP address, for example 192.168.1.100. If you are on the server itself, use http://localhost:8096.


Step 5 – Complete the Setup Wizard

The first launch opens a setup wizard that guides you through:

  1. Create an admin account – choose a strong username and password
  2. Add a media library – select a content type (Movies, TV Shows, Music) and point it to your media folder
  3. Set your preferred metadata language – Jellyfin will fetch posters, descriptions, and ratings automatically
  4. Configure remote access – choose whether to allow access from outside your local network

Click Finish and Jellyfin will begin scanning your library.


How To: Organise Your Media Files

Jellyfin relies on a specific folder structure and naming convention to correctly identify your content and fetch metadata.

Movies

/media/movies/
  The Dark Knight (2008)/
    The Dark Knight (2008).mkv
  Inception (2010)/
    Inception (2010).mp4

TV Shows

/media/tvshows/
  Breaking Bad/
    Season 01/
      Breaking Bad S01E01.mkv
      Breaking Bad S01E02.mkv
    Season 02/
      Breaking Bad S02E01.mkv

Tip: Always include the release year in movie folder names. This helps Jellyfin match the correct metadata when multiple films share the same title.


How To: Set Correct File Permissions

Jellyfin runs as its own system user called jellyfin. Your media folders must be readable by this user.

bash

sudo usermod -aG jellyfin $USER
sudo chown -R jellyfin:jellyfin /path/to/your/media
sudo chmod -R 755 /path/to/your/media

Restart Jellyfin after making any permission changes:

bash

sudo systemctl restart jellyfin

How To: Enable Hardware-Accelerated Transcoding

Transcoding converts video files into a format your playback device can handle. Hardware acceleration offloads this from the CPU to your GPU, dramatically reducing system load and enabling smoother 4K playback.

Intel iGPU (VAAPI)

bash

sudo apt install jellyfin-ffmpeg6 -y
sudo usermod -aG render jellyfin
sudo usermod -aG video jellyfin

Then in Jellyfin, go to Dashboard > Playback > Transcoding and:

  • Set Hardware acceleration to Video Acceleration API (VAAPI)
  • Set the VA-API Device to /dev/dri/renderD128
  • Enable the codecs you want accelerated such as H.264, HEVC, and AV1

NVIDIA GPU (NVENC)

Install the NVIDIA drivers for your Linux distro, then in the Jellyfin transcoding settings select NVENC as the hardware acceleration method. If you are using Docker, also install nvidia-container-toolkit.

AMD GPU (VAAPI)

AMD GPUs on Linux also use the VAAPI interface. Follow the same steps as the Intel section above. For newer RDNA cards, make sure the amdgpu kernel driver is loaded.


How To: Access Jellyfin Outside Your Home Network

Option A – Port Forwarding (Quick but Basic)

  1. Log into your router admin panel
  2. Forward port 8096 (HTTP) or 8920 (HTTPS) to your server’s local IP address
  3. Find your public IP at whatismyip.com and access Jellyfin at http://<your-public-ip>:8096

Option B – Reverse Proxy with HTTPS (Recommended)

Use Nginx as a reverse proxy with a domain name and a free SSL certificate from Let’s Encrypt. This is the secure, production-grade approach.

Basic Nginx config example:

nginx

server {
    listen 443 ssl;
    server_name jellyfin.yourdomain.com;

    ssl_certificate /etc/letsencrypt/live/jellyfin.yourdomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/jellyfin.yourdomain.com/privkey.pem;

    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_buffering off;
    }
}

Get your SSL certificate automatically with Certbot:

bash

sudo apt install certbot python3-certbot-nginx -y
sudo certbot --nginx -d jellyfin.yourdomain.com

How To: Add and Manage Users

Jellyfin supports multiple users, each with their own watch history, library access, and parental controls.

  1. Go to Dashboard > Users > Add User
  2. Enter a username and password
  3. Under Library Access, choose which libraries this user can see
  4. Enable Parental Controls and set a rating limit if needed
  5. Click Save

Users can log in from any Jellyfin client using the server address and their own credentials.


How To: Install Jellyfin with Docker

If you prefer containers, Docker is a clean way to run Jellyfin with easy updates and full isolation from the host system.

Docker run command:

bash

docker run -d \
  --name jellyfin \
  --restart unless-stopped \
  -p 8096:8096 \
  -v /path/to/config:/config \
  -v /path/to/cache:/cache \
  -v /path/to/media:/media:ro \
  jellyfin/jellyfin

Docker Compose (docker-compose.yml):

yaml

version: "3"
services:
  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    restart: unless-stopped
    ports:
      - "8096:8096"
    volumes:
      - ./config:/config
      - ./cache:/cache
      - /mnt/media:/media:ro

Start it with:

bash

docker compose up -d

How To: Keep Jellyfin Updated

APT install:

bash

sudo apt update && sudo apt upgrade jellyfin -y

Docker:

bash

docker pull jellyfin/jellyfin
docker compose down && docker compose up -d

Jellyfin releases regular updates with bug fixes and new features. Checking for updates once a month is a good habit.


How To: Back Up Your Jellyfin Configuration

Your entire configuration is stored in /var/lib/jellyfin/ for APT-based installs. Back it up with:

bash

sudo tar -czvf jellyfin-backup.tar.gz /var/lib/jellyfin/

Your media files do not need to be backed up through Jellyfin. Keep your media drives backed up separately using your preferred backup strategy.

Is Jellyfin completely free?

Yes. Jellyfin is 100% free and open-source, licensed under the GPL. There are no paid tiers, no locked features, and no subscription fees. The project is funded entirely by community donations.

Can I run Jellyfin on a NAS?

Yes. Many users run Jellyfin directly on NAS devices such as Synology or TrueNAS, or they mount NAS shares as local paths using NFS or SMB. As long as the jellyfin user has read access to the mount point, the setup works the same way.

Is it safe to expose Jellyfin to the internet?

Always use HTTPS with a valid SSL certificate, not plain HTTP
Use a reverse proxy such as Nginx or Caddy rather than exposing Jellyfin directly
Keep Jellyfin updated regularly
Use strong, unique passwords for all accounts
Install and configure fail2ban to block brute-force login attempts
For maximum security, place Jellyfin behind a VPN such as WireGuard so only VPN-connected devices can reach it

How do I fix buffering or stuttering during playback?

Buffering is usually caused by the server struggling to transcode in real time. Try these steps:

1. Enable hardware transcoding as described in this guide
2. Force direct play in your client app by setting the maximum bitrate to Auto
3. Use a wired Ethernet connection on the server rather than Wi-Fi
4. Temporarily lower the streaming quality to find out if the issue is transcoding or network bandwidth

Which devices and apps can I use with Jellyfin?

Jellyfin has official and community clients for nearly every platform:

Android – Jellyfin for Android (Play Store and F-Droid)
iOS and iPadOS – Swiftfin (App Store)
Android TV and Fire TV – Jellyfin for Android TV
Roku – Jellyfin for Roku
Kodi – JellyCon plugin
Web browser – built-in, no install required
Apple TV – Swiftfin (App Store)

Why is Jellyfin not finding my media?

Check the following:

1. Folder structure – follow the naming conventions described in this guide
2. Permissions – the jellyfin user must have read access to your media folders
3. Library path – verify the correct path is configured in Dashboard > Libraries
4. Manual scan – go to Dashboard > Libraries, click the three-dot menu, and select Scan All Libraries

What hardware do I need to run Jellyfin?

For direct play (no transcoding), almost any modern hardware works including a Raspberry Pi 4 or an old desktop PC. For transcoding, especially 4K HDR, a more capable CPU or a GPU with hardware acceleration is recommended.

1 to 2 users, mostly direct play: Raspberry Pi 4 or an Intel N100 mini PC
2 to 5 users with some transcoding: Intel Core i5 or equivalent with an integrated GPU
5 or more users with heavy 4K transcoding: A dedicated server with a discrete NVIDIA GPU

Conclusion

Jellyfin is one of the most capable self-hosted tools you can run on a home server. It is free, privacy-respecting, and actively maintained by a dedicated open-source community. Once it is up and running, you get a full streaming experience for your entire personal media library, accessible on any device, from anywhere.

If you run into issues, the official Jellyfin documentation and the r/jellyfin subreddit are both great places to find help.


Have a question or a tip to share? Leave a comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *