Tutorials Projects Hardware Topics About Newsletter

Jellyfin Media Server on Raspberry Pi 4: Setup Guide and Performance Tips

Jellyfin is the leading open-source media server. It streams your personal collection of movies, TV, music, and photos to any device in or outside your home. There are no subscriptions, no required accounts, no telemetry, and no limits on simultaneous streams.

Sara Lin
Software Engineer - homelab and self-hosting specialist
Published: Jan 9, 2025

Jellyfin vs Plex: the key differences

Jellyfin and Plex cover similar ground. The practical differences:

  • Jellyfin is fully free and open-source. Plex has a free tier but some features require a paid Plex Pass subscription.
  • Jellyfin requires no account. Plex requires creating an account and routing metadata through Plex servers even for local-only playback.
  • Plex has a more polished mobile experience, especially for non-technical family members. Jellyfin client apps have improved significantly but Plex still has an edge on polish.

If privacy and no recurring costs are priorities, Jellyfin is the better choice. If you need the simplest possible experience for others in your household, Plex may be worth the trade-off.

Requirements

A Raspberry Pi 4 (4GB or 8GB recommended) or Pi 5. The 2GB Pi 4 handles direct-play streaming but struggles with transcoding. You also need:

  • Docker installed - see our Docker setup guide
  • External USB SSD or HDD with your media files
  • Gigabit wired LAN for reliable 1080p streaming to multiple devices

Step 1: Organize your media files

Jellyfin matches files to metadata from online databases using file and folder naming. The expected structure:

/media/movies/
  Movie Title (2023)/
    Movie Title (2023).mkv
/media/tv/
  Show Name/
    Season 01/
      Show Name S01E01.mkv
/media/music/
  Artist Name/
    Album Name (Year)/
      01 Track Title.flac

Consistent naming dramatically improves metadata matching accuracy.

Step 2: Install Jellyfin with Docker Compose

mkdir ~/jellyfin && cd ~/jellyfin
nano docker-compose.yml
services:
  jellyfin:
    image: jellyfin/jellyfin:latest
    container_name: jellyfin
    restart: unless-stopped
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - ./config:/config
      - ./cache:/cache
      - /media:/media:ro

Replace /media with your actual media drive mount path and set the correct timezone. The :ro flag mounts media as read-only.

docker compose up -d

Step 3: First-run configuration and library scan

Open http://your-pi-ip:8096 in a browser. The setup wizard creates your admin account and walks you through adding media libraries. Point each library to the correct folder inside /media.

Jellyfin scans your libraries and downloads artwork, summaries, and episode data automatically. The initial scan can take several minutes for large collections but you can start browsing before it completes.

Step 4: Enable hardware transcoding

Transcoding converts video on the fly to a format the client device can play. Software transcoding is CPU-intensive and slow on a Pi. Hardware transcoding uses the Pi's built-in video decoder.

In the Jellyfin admin dashboard, go to Playback and enable Video4Linux2 (V4L2) hardware acceleration. This is the correct option for Raspberry Pi hardware.

[i]
Direct play always beats transcoding

When the client device can natively play the file format, Jellyfin serves the file directly with zero CPU processing. Modern smart TVs, Chromecast devices, and Fire TV sticks direct-play most H.264 and H.265 content. Aim to match your file formats to your client devices' native capabilities.

Step 5: Set up remote access

Two main options for accessing Jellyfin from outside your home:

  • WireGuard VPN: Connect to your home network via VPN, then access Jellyfin at its local IP. Keeps Jellyfin completely off the public internet and is the most secure option.
  • Reverse proxy with HTTPS: Use Nginx with a Let's Encrypt certificate to expose Jellyfin on a domain name. More convenient for family members who do not want to use a VPN.

See our Nginx reverse proxy guide and Let's Encrypt SSL guide for setup details.

Available Jellyfin client apps

Official Jellyfin apps are available for Android, Android TV, iOS, Apple TV, Kodi, Roku, and Fire TV. The web interface works well for desktop playback without any additional app. All client apps are free.

Performance notes for Raspberry Pi hardware

A Raspberry Pi 4 handles 1080p direct play without any issue. Hardware-accelerated transcoding of H.264 1080p content works adequately. 4K transcoding is not supported reliably on Pi 4 or Pi 5 due to hardware decoder limitations.

For a household where most client devices can direct-play the media files natively, a Pi 4 or Pi 5 handles Jellyfin comfortably as a 24/7 media server.

Sara Lin
Co-Founder - Storage and DevOps

Sara runs Jellyfin on a Raspberry Pi 5 with a 4TB attached drive and switched from Plex in 2022. All media guides are tested on real hardware before publishing.

Tags