build-tech2026-01-0860-90 min read

Setting Up a Media Server: Plex vs Jellyfin on Raspberry Pi

Transform your Raspberry Pi into a powerful media streaming server that brings your entire movie, TV show, and music collection to any device in your home. This guide covers both Plex and Jellyfin, helping you choose the right option and get it running smoothly.

Prerequisites

Before starting, make sure you have:

  • Raspberry Pi 4 (4GB or 8GB RAM recommended for smooth streaming)
  • Docker installed and configured
  • File server set up with media organized (from our previous guide)
  • Your media files organized in folders (Movies, TV Shows, Music, etc.)
  • Sufficient storage for your media library

Plex vs Jellyfin: Which Should You Choose?

Both are excellent media servers, but they have different philosophies:

Plex

Pros:

  • Polished, professional interface
  • Excellent mobile apps
  • Best-in-class metadata matching
  • Easy remote access setup
  • Hardware transcoding (with Plex Pass)
  • Live TV and DVR support
  • Discover and share features

Cons:

  • Requires account creation (internet needed)
  • Some features require Plex Pass subscription ($5/month or $120 lifetime)
  • Closed source
  • Occasional forced updates
  • Analytics sent to Plex servers

Best for: Users who want a polished experience, plan to access remotely, and don't mind a subscription for premium features.

Jellyfin

Pros:

  • Completely free and open source
  • No account required
  • No tracking or analytics
  • Hardware transcoding included
  • Active development community
  • Full control over your server
  • Plugin system for extensions

Cons:

  • Interface less polished than Plex
  • Mobile apps are good but not as refined
  • Metadata matching can require more manual intervention
  • Remote access requires more setup
  • Smaller user base means fewer third-party integrations

Best for: Privacy-conscious users, those who want complete control, anyone opposed to subscriptions, and tinkerers who enjoy customization.

My Recommendation

Start with Jellyfin if you value privacy, want everything free, and don't mind occasionally fixing metadata manually.

Choose Plex if you want the most polished experience, plan to share with less technical family members, or want the easiest remote access.

Good news: You can run both simultaneously to test them out, as they use different ports.

Organizing Your Media

Before installing either server, organize your media properly:

Recommended structure:

/mnt/storage/media/
├── movies/
│   ├── The Matrix (1999)/
│   │   └── The Matrix (1999).mkv
│   ├── Inception (2010)/
│   │   └── Inception (2010).mkv
├── tv/
│   ├── Breaking Bad/
│   │   ├── Season 01/
│   │   │   ├── Breaking Bad - S01E01 - Pilot.mkv
│   │   │   └── Breaking Bad - S01E02 - Cat's in the Bag.mkv
│   │   └── Season 02/
│   └── The Office/
└── music/
    ├── Artist Name/
    │   └── Album Name/
    │       ├── 01 - Track Name.mp3
    │       └── 02 - Track Name.mp3

Key principles:

  • Each movie in its own folder with year in parentheses
  • TV shows organized by season folders
  • Use consistent naming (Series Name - S01E01 format works great)
  • Include year in movie folder names for better matching

Part 1: Installing Plex

Step 1: Create Plex Directory

mkdir -p ~/docker/plex
cd ~/docker/plex

Step 2: Create Docker Compose File

nano docker-compose.yml

Add this configuration:

version: '3.8'

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    network_mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - VERSION=docker
      - PLEX_CLAIM= # Optional - see below
    volumes:
      - ./config:/config
      - /mnt/storage/media/movies:/movies
      - /mnt/storage/media/tv:/tv
      - /mnt/storage/media/music:/music
    restart: unless-stopped

Understanding the configuration:

  • network_mode: host: Plex uses this for automatic discovery
  • PUID and PGID: Your user ID (find with id command)
  • TZ: Your timezone
  • PLEX_CLAIM: Optional token for linking to your account (explained below)

Step 3: Get Plex Claim Token (Optional)

To automatically link your server to your Plex account:

  1. Visit https://www.plex.tv/claim/ while logged into your Plex account
  2. Copy the claim token (starts with claim-)
  3. Add it to your docker-compose.yml: - PLEX_CLAIM=claim-xxxxxxxxxxxx

Note: This token expires in 4 minutes, so add it and start the container immediately.

Step 4: Deploy Plex

docker-compose up -d

Check if it's running:

docker-compose logs -f

Step 5: Access Plex Web Interface

Open your browser and go to:

http://your-pi-ip:32400/web

For example: http://192.168.1.100:32400/web

Step 6: Initial Plex Setup

Sign in or create a Plex account when prompted.

Set up your server:

  1. Name your server (e.g., "Home Media Server")
  2. Allow remote access (optional, but useful)

Add libraries:

  1. Click "Add Library"
  2. Select type (Movies, TV Shows, or Music)
  3. Click "Browse for media folder"
  4. Navigate to /movies, /tv, or /music
  5. Click "Add Library"

Repeat for each media type you have.

Wait for scanning: Plex will now scan and match your media. This can take a while depending on library size.

Step 7: Configure Plex Settings

Go to Settings (wrench icon) → Server:

Library:

  • Enable "Scan my library automatically"
  • Enable "Run a partial scan when changes are detected"

Network:

  • Note your server's local IP for remote access
  • Configure remote access if desired

Transcoder:

  • Quality: Automatic (recommended)
  • Temporary directory: Default is fine
  • For Plex Pass users: Enable hardware acceleration

Languages:

  • Set preferred audio and subtitle languages

Step 8: Enable Hardware Transcoding (Plex Pass Only)

If you have Plex Pass, enable hardware acceleration:

Update your docker-compose.yml to include device access:

    devices:
      - /dev/dri:/dev/dri
      - /dev/vchiq:/dev/vchiq
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
      - VERSION=docker

Then in Plex settings:

  1. Go to Settings → Transcoder
  2. Enable "Use hardware acceleration when available"
  3. Select "Raspberry Pi"

Restart the container:

docker-compose restart

Part 2: Installing Jellyfin

Step 1: Create Jellyfin Directory

mkdir -p ~/docker/jellyfin
cd ~/docker/jellyfin

Step 2: Create Docker Compose File

nano docker-compose.yml

Add this configuration:

version: '3.8'

services:
  jellyfin:
    image: lscr.io/linuxserver/jellyfin:latest
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    volumes:
      - ./config:/config
      - /mnt/storage/media/movies:/data/movies
      - /mnt/storage/media/tv:/data/tvshows
      - /mnt/storage/media/music:/data/music
    ports:
      - 8096:8096
      - 8920:8920 # Optional HTTPS port
    devices:
      - /dev/dri:/dev/dri
      - /dev/vchiq:/dev/vchiq
    restart: unless-stopped

Note: Hardware transcoding is included free with Jellyfin.

Step 3: Deploy Jellyfin

docker-compose up -d

Check if it's running:

docker-compose logs -f

Step 4: Access Jellyfin Web Interface

Open your browser and go to:

http://your-pi-ip:8096

For example: http://192.168.1.100:8096

Step 5: Initial Jellyfin Setup

Welcome screen: Click "Next"

Create admin account:

  • Username: Your desired username
  • Password: Strong password

Add media libraries:

  1. Click "Add Media Library"
  2. Select content type (Movies, Shows, or Music)
  3. Click the "+" next to "Folders"
  4. Navigate to /data/movies, /data/tvshows, or /data/music
  5. Configure library settings (language, metadata downloaders)
  6. Click "OK"

Repeat for each media type.

Preferred metadata language: Select your language and country.

Remote access: Configure if you plan to access outside your home (covered later).

Finish setup: Click "Finish" and log in with your new account.

Step 6: Configure Jellyfin Settings

Go to Dashboard (≡ menu) → Settings:

Library:

  • Enable "Monitor folders in my media directories"
  • Set scan interval (default is good)

Playback:

  • Enable "Allow video playback that requires conversion without re-encoding"
  • Enable "Allow audio playback that requires conversion"

Transcoding:

  • Hardware acceleration: Select "Video Acceleration API (VAAPI)"
  • VAAPI Device: /dev/dri/renderD128
  • Enable hardware decoding for: H264, HEVC, MPEG2, VC1, VP8, VP9
  • Enable hardware encoding for: H264, HEVC

Users:

  • Create additional user accounts for family members
  • Set permissions and parental controls as needed

Step 7: Install Plugins

Jellyfin has a robust plugin system:

Go to Dashboard → Plugins → Catalog:

Useful plugins:

  • Fanart: Additional artwork sources
  • TMDb Box Sets: Better movie collection support
  • Trakt: Scrobble your watching history
  • Playback Reporting: Track what's being watched
  • Intro Skipper: Automatically skip TV show intros

Install desired plugins and restart Jellyfin.

Running Both Servers Simultaneously

You can run both Plex and Jellyfin to compare:

They use different ports:

  • Plex: 32400
  • Jellyfin: 8096

Simply deploy both containers and access them at their respective addresses. They can share the same media folders without conflict.

Optimizing for Raspberry Pi

For Both Servers:

Direct Play when possible: Configure your clients to direct play compatible formats instead of transcoding.

Optimize your media: Consider pre-transcoding 4K content to 1080p for smoother playback on the Pi.

Use Ethernet: WiFi adds latency and reduces throughput.

Keep it cool: Ensure your Pi has adequate cooling, especially during transcoding.

Don't over-commit: A Raspberry Pi 4 can handle 1-2 simultaneous streams reliably, maybe 3 with direct play.

Plex-Specific:

Disable video preview thumbnails: These are resource-intensive to generate.

Settings → Library → Disable "Generate video preview thumbnails"

Limit transcoding quality: If users are transcoding, limit quality to reduce CPU load.

Jellyfin-Specific:

Set transcoding threads: In Dashboard → Playback → Transcoding thread count, set to 2 or 3 (not all cores).

Enable throttle transcoding: Prevents the Pi from trying to transcode faster than playback speed.

Remote Access Setup

Plex Remote Access

Plex makes this easy:

  1. Go to Settings → Remote Access
  2. Click "Enable Remote Access"
  3. Plex automatically configures port forwarding if your router supports UPnP
  4. If not, manually forward port 32400 to your Pi's IP

Security note: Plex uses SSL and account authentication, so this is relatively safe.

Jellyfin Remote Access

Jellyfin requires more manual setup:

Option 1: Reverse Proxy (Recommended)

Use Nginx or Caddy as a reverse proxy with SSL. This is more secure but requires additional setup.

Option 2: Port Forwarding (Simpler)

  1. Forward port 8096 on your router to your Pi's IP
  2. Access via: http://your-public-ip:8096
  3. Enable HTTPS in Jellyfin settings for better security

Option 3: VPN (Most Secure)

Set up a VPN server (WireGuard) and access your home network remotely.

Recommendation: Use a VPN for Jellyfin remote access if possible. It's more secure than exposing the port directly.

Mobile Apps

Plex

iOS: Plex (free, but requires Plex Pass for mobile sync) Android: Plex (same as iOS)

The apps are excellent and support offline sync with Plex Pass.

Jellyfin

iOS: Swiftfin (free, open source) Android: Jellyfin (free, open source)

The apps are functional but less polished than Plex. Active development is improving them constantly.

Alternative Apps

Both servers support third-party apps like:

  • Infuse (iOS/tvOS): Beautiful, supports both Plex and Jellyfin
  • Kodi: Can connect to both servers via plugins

Metadata Management

Plex

Plex excels at automatic metadata matching. If something doesn't match:

  1. Click the "..." on the item
  2. Select "Match"
  3. Search for the correct title
  4. Select the correct match

Jellyfin

Jellyfin's matching is good but sometimes needs help:

  1. Right-click the item → Edit Metadata
  2. Click "Identify"
  3. Search for correct title
  4. Or manually edit metadata fields

Pro tip: Use proper file naming and folder structure to minimize manual fixes.

Backup Your Configuration

Both servers store configuration in Docker volumes. Back them up:

Plex:

cd ~/docker/plex
tar -czf plex-config-backup-$(date +%Y%m%d).tar.gz config/

Jellyfin:

cd ~/docker/jellyfin
tar -czf jellyfin-config-backup-$(date +%Y%m%d).tar.gz config/

Schedule these backups monthly or before major updates.

Troubleshooting Common Issues

Transcoding is slow or choppy:

  • Verify hardware acceleration is enabled
  • Check CPU usage with htop
  • Consider direct play instead of transcoding
  • Limit simultaneous streams

Media not appearing:

  • Verify file permissions: ls -l /mnt/storage/media
  • Check folder paths in library settings
  • Manually trigger a library scan
  • Check file naming conventions

Cannot access remotely:

  • Verify port forwarding is configured
  • Check firewall rules on Pi and router
  • Confirm your ISP doesn't block the ports
  • Try using your public IP instead of domain name

Container won't start:

  • Check logs: docker-compose logs
  • Verify device access for hardware transcoding
  • Ensure ports aren't already in use
  • Check disk space: df -h

Subtitles not working:

  • Ensure subtitle files are in the same folder as video
  • Name them identically: Movie.mkv and Movie.srt
  • Enable subtitle extraction in server settings
  • Install subtitle plugins (Jellyfin) or Plex's built-in subtitle search

Performance Monitoring

Keep an eye on your server's health:

Check container stats:

docker stats plex
# or
docker stats jellyfin

Monitor system resources:

htop

Check disk space:

df -h

Temperature monitoring:

vcgencmd measure_temp

Keep temps below 80°C during transcoding.

Advanced Features

Plex Watch Together

Watch content simultaneously with friends remotely (Plex Pass feature).

Jellyfin SyncPlay

Similar to Plex Watch Together, but free and built-in.

Collections

Both servers support grouping movies into collections (e.g., "Marvel Cinematic Universe").

Plex: Automatically creates collections Jellyfin: Enable "TMDb Box Sets" plugin

Live TV & DVR

Both support TV tuners and DVR functionality:

Plex: Requires Plex Pass Jellyfin: Free with proper tuner hardware

Updating Your Media Server

Plex:

cd ~/docker/plex
docker-compose pull
docker-compose up -d

Jellyfin:

cd ~/docker/jellyfin
docker-compose pull
docker-compose up -d

Update monthly or when new features you want are released.

Next Steps

Your media server is now ready to stream your entire collection! Consider these enhancements:

  1. Set up automatic media management - Use Sonarr/Radarr for automated downloads
  2. Add request system - Install Overseerr or Jellyseerr for users to request content
  3. Implement monitoring - Use Tautulli (Plex) or Jellyfin plugins for viewing statistics
  4. Create a reverse proxy - Set up Nginx Proxy Manager for better remote access
  5. Add more storage - Expand with additional drives as your library grows

Quick Reference

Access Plex:

http://your-pi-ip:32400/web

Access Jellyfin:

http://your-pi-ip:8096

Restart services:

cd ~/docker/plex && docker-compose restart
cd ~/docker/jellyfin && docker-compose restart

View logs:

docker-compose logs -f plex
docker-compose logs -f jellyfin

Scan library manually:

  • Plex: Settings → Library → Scan Library Files
  • Jellyfin: Dashboard → Scheduled Tasks → Scan Media Library

Estimated time to complete: 60-90 minutes (including library scanning)

Difficulty level: Intermediate

Prerequisites: Completed Raspberry Pi setup, Docker installation, and file server setup

Your home media server is now live! You've got professional-grade streaming capabilities on your home network. Ready to expand your home lab further? Check out our guide on setting up Pi-hole for network-wide ad blocking, or explore automated media management with Sonarr and Radarr!

Enjoyed this?

Get more beginner-friendly tech guides sent to your inbox.