Plex Media Server Raspberry Pi: Complete Installation and Setup Guide

Setting up a Plex Media Server on a Raspberry Pi

Plex Media Server Raspberry Pi gives you a self-hosted media server that organises your movie and TV library, fetches metadata and cover art automatically, and streams to Plex client apps on phones, smart TVs, Roku, Fire Stick, and browsers. Plex runs well on Pi 4 and Pi 5 hardware for direct play streams. This guide covers installation using the official Plex APT repository so updates apply automatically, initial configuration through the web interface, media library setup with external storage, and remote access. It also covers the practical differences between Plex and Jellyfin so you can choose the right tool for your setup.

Last tested: Raspberry Pi OS Bookworm Lite 64-bit | May 3, 2026 | Raspberry Pi 5 (8GB) | Plex Media Server 1.41 | Plexamp 4.x

Key Takeaways

  • Install Plex from the official APT repository rather than downloading a versioned .deb file manually. The repository method means sudo apt upgrade keeps Plex current automatically without manual re-downloads.
  • Hardware transcoding on Raspberry Pi requires Plex Pass ($39.99/year or $119.99 lifetime) and is limited on Pi hardware regardless. For most Pi setups, direct play is the practical goal. Configure clients to direct play and organise your library in formats those clients support natively.
  • Plex requires a Plex account for initial server setup and for remote access. If account dependency is a concern, Jellyfin is a fully free, open-source alternative with no account requirement. See Jellyfin Raspberry Pi 5 for that setup.

Plex Media Server Raspberry Pi: Plex vs Jellyfin

Both Plex and Jellyfin are self-hosted media servers that scan a library, fetch metadata, and stream to client apps. The meaningful differences are cost, account requirements, and client ecosystem.

FeaturePlexJellyfin
CostFree (basic), Plex Pass $39.99/yr for hardware transcoding, offline sync, live TV DVRFully free, no subscription
Account requiredYes, Plex account for setup and remote accessNo, self-contained
Client appsNative apps for Roku, Fire Stick, Apple TV, iOS, Android, smart TVsApps for most platforms, quality varies by client
Hardware transcoding on PiPlex Pass required, limited on Pi hardwareV4L2 M2M, no subscription required
Remote accessBuilt-in via Plex relay serversManual (Tailscale, Caddy reverse proxy)

Choose Plex if you use Roku, Fire Stick, or Apple TV and want native app support without setting up a reverse proxy. Choose Jellyfin if you want no subscription, no external account dependency, and are comfortable configuring your own remote access. For the Jellyfin setup, see Jellyfin Raspberry Pi 5.

Hardware Requirements

Pi 4 with 4GB RAM handles Plex for one to two simultaneous direct play streams. Pi 5 with 8GB RAM is better for larger libraries and multiple concurrent streams. Pi 3 works for light single-stream use but becomes a bottleneck with 1080p content.

An external SSD is required for the media library. Plex writes thumbnail images, artwork, and a SQLite database continuously. MicroSD cards wear quickly under this pattern and produce slow library scan and metadata load times. A USB 3.0 SSD provides adequate throughput and endurance. See Booting Raspberry Pi from USB SSD for storage setup and Raspberry Pi 5 Cooling Guide for keeping temperatures under control during sustained playback.

Installing Plex from the APT Repository

Flash Raspberry Pi OS Bookworm Lite 64-bit using Raspberry Pi Imager. In the advanced settings, set hostname, enable SSH, and configure credentials. After first boot:

sudo apt update && sudo apt full-upgrade -y

Add the official Plex APT repository using the current keyring method:

curl -fsSL https://downloads.plex.tv/plex-keys/PlexSign.key   | sudo gpg --dearmor -o /etc/apt/keyrings/plexmediaserver.gpg

echo "deb [signed-by=/etc/apt/keyrings/plexmediaserver.gpg] https://downloads.plex.tv/repo/deb public main"   | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

sudo apt update && sudo apt install plexmediaserver -y
sudo systemctl enable --now plexmediaserver
sudo systemctl status plexmediaserver

Expected result: systemctl status plexmediaserver shows the service active. Plex listens on port 32400.

Grant Plex read access to the media directory. Plex runs as the plex user:

# Check the plex user UID
id plex

# Set ownership of your media directory to match
sudo chown -R plex:plex /mnt/media
Plex Media Server Raspberry Pi architecture diagram showing media storage Plex server client apps and remote access path

Initial Configuration

Open a browser on another device on the same network and navigate to:

http://<pi-ip>:32400/web

Log in with your Plex account (create one free at plex.tv if you do not have one). The setup wizard prompts for a server name and guides you through adding your first library.

Expected result: The Plex web interface loads and the setup wizard begins. If the browser cannot reach port 32400, confirm the Pi’s IP address with ip a and that the Plex service is running.

Adding a media library

In the setup wizard, add a library by selecting the content type (Movies, TV Shows, Music) and pointing it at the directory where your media is stored. Plex scans the directory, matches file names against TMDB and TheTVDB, and downloads artwork and metadata. The naming convention Plex expects:

  • Movies: Movie Title (Year)/Movie Title (Year).mkv
  • TV shows: Show Name/Season 01/Show Name - S01E01.mkv

Files named differently will not match metadata or will match the wrong title. Plex provides a manual “Fix Match” option per item in the interface for files that do not match automatically.

Mounting external storage

Connect the external drive and mount it using UUID for a stable mount across reboots:

blkid /dev/sda1
# Note the UUID

# Add to /etc/fstab:
# UUID=your-uuid  /mnt/media  ext4  defaults,nofail,noatime  0  2
sudo mkdir -p /mnt/media
sudo mount -a
sudo chown -R plex:plex /mnt/media

Remote Access and Maintenance

Built-in remote access

Plex includes built-in remote access through its relay servers. In Settings > Remote Access, enable remote access and Plex will attempt to open port 32400 on your router via UPnP, or prompt you to configure port forwarding manually. Once configured, your server is accessible from Plex apps anywhere without any additional setup.

The Plex relay is convenient but routes traffic through Plex’s servers when direct connection fails. For a direct connection, forward port 32400 UDP and TCP from your router to the Pi’s static IP.

Keeping Plex updated

Because Plex was installed from the APT repository, updates apply with the normal system update commands:

sudo apt update && sudo apt upgrade -y

This is the primary advantage of the repository install over downloading versioned .deb files manually. Plex updates frequently. The repository method means you are always current without manual intervention.

Backing up the Plex database

Plex stores its metadata database, artwork cache, and server settings in /var/lib/plexmediaserver/. Back this up before any major update or OS change:

sudo systemctl stop plexmediaserver
sudo tar -czf ~/plex-backup-$(date +%Y%m%d).tar.gz /var/lib/plexmediaserver/
sudo systemctl start plexmediaserver

The database contains all your watched history, ratings, playlists, and metadata edits. The media files themselves are not affected by a database loss, but you lose all watch history and customisations.

Troubleshooting

Cannot reach port 32400 in browser

# Confirm Plex is running and listening
sudo systemctl status plexmediaserver
sudo ss -tlnp | grep 32400

# Check Plex logs for errors
sudo journalctl -u plexmediaserver -n 30

If Plex is running but port 32400 is not reachable from another device, confirm both the Pi and the browser device are on the same LAN subnet. Plex binds to all interfaces by default. There is no localhost restriction to remove unlike some other services.

Library scan finds no media

# Confirm Plex can read the media directory
sudo -u plex ls /mnt/media

# If permission denied:
sudo chown -R plex:plex /mnt/media

If the directory listing succeeds but Plex still does not find media, confirm the file naming matches the expected format. Plex will not match a file named The.Dark.Knight.2008.mkv to the same reliability as The Dark Knight (2008)/The Dark Knight (2008).mkv. Use the Plex Media Scanner in a terminal to see what it finds:

sudo -u plex "/usr/lib/plexmediaserver/Plex Media Scanner" --list

Buffering during playback

Check whether the stream is direct playing or transcoding by clicking the playback quality indicator in the Plex client. Transcoding on Pi is CPU-intensive and causes buffering for anything above 720p. If the client is requesting a transcode, adjust the quality settings in the Plex client to match the original file format, or convert problem files to a format the client supports natively.

# Check CPU usage during playback
htop

# Check Pi temperature
vcgencmd measure_temp

FAQ

What is the minimum Raspberry Pi for Plex?

Pi 4 with 2GB RAM for single-stream direct play. Pi 4 with 4GB for a comfortable experience with a large library and one to two streams. Pi 5 with 8GB for multiple concurrent streams or running Plex alongside other services. Pi 3 runs Plex but struggles with 1080p content and library scans on large collections.

Does Plex work without internet?

Yes for local streaming. Plex clients on your LAN connect directly to the Pi without internet. Features that stop working without internet: new metadata downloads, remote access outside your network, multi-user authentication for Plex Home, and software updates. Your media and existing metadata remain fully accessible locally.

Is Plex Pass worth it for Raspberry Pi?

For most Pi setups, no. Hardware transcoding on Pi is limited regardless of Plex Pass. The Pi 5 V4L2 M2M decoder works better with Jellyfin than with Plex. The other Plex Pass features (offline sync, live TV DVR, mobile sync) are valuable for specific use cases. If your clients all direct play without transcoding, Plex Free covers everything you need. If you want hardware transcoding on Pi specifically, Jellyfin provides it without a subscription.

Should I use Plex or Jellyfin on Raspberry Pi?

Plex if you use Roku, Fire Stick, or Apple TV and want polished native apps without configuring reverse proxies. Jellyfin if you want no subscription cost, no external account, and are comfortable with the setup. Both work on Pi hardware. The meaningful difference is the Plex Pass cost for features that matter on Pi, and the Plex account requirement for setup and remote access. See Jellyfin Raspberry Pi 5 for a full comparison in practice.

How do I move my Plex server to a new Pi?

Back up /var/lib/plexmediaserver/ from the old Pi, install Plex on the new Pi using the same APT repository method, stop the Plex service, copy the backup to the same path on the new Pi, set ownership to the plex user, and start the service. Your entire library, watch history, and settings transfer with the database.

References


About the Author

Chuck Wilson has been programming and building with computers since the Tandy 1000 era. His professional background includes CAD drafting, manufacturing line programming, and custom computer design. He runs PidiyLab in retirement, documenting Raspberry Pi and homelab projects that he actually deploys and maintains on real hardware. Every article on this site reflects hands-on testing on specific hardware and OS versions, not theoretical walkthroughs.

Last tested hardware: Raspberry Pi 5 (8GB), USB 3.0 SSD. Last tested OS: Raspberry Pi OS Bookworm Lite 64-bit. Plex Media Server 1.41.

Was this helpful?

Yes
No
Thanks for your feedback!