Building a Plex Media Server with Raspberry Pi
If you’re looking for a low-power, always-on solution for streaming your personal media library, the Raspberry Pi makes a great Plex server. It’s compact, quiet, affordable, and perfect for handling basic media streaming—especially for home use.
In this post, I’ll guide you through setting up Plex Media Server on a Raspberry Pi, using Raspberry Pi OS (Lite or Full) or Debian-based distros like Ubuntu Server.
🧰 What You’ll Need
- Raspberry Pi 4 or 5 (at least 2GB RAM, 4GB+ recommended)
- microSD card (32GB+), or SSD via USB 3.0
- External storage for media (USB HDD/SSD or NAS)
- Ethernet or Wi-Fi connection
- Raspberry Pi OS (Lite or Desktop)
- A Plex account (free is enough)
⚙️ Step 1: Prepare the Raspberry Pi
- Flash Raspberry Pi OS using Raspberry Pi Imager
- Enable SSH and set hostname (optional)
- Boot the Pi, log in, and update:
sudo apt update && sudo apt upgrade -y
📦 Step 2: Install Plex Media Server
Plex is available for ARM-based devices via their official repository.
- Add Plex repo and key:
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt update
- Install Plex:
sudo apt install plexmediaserver -y
🔁 Step 3: Enable and Start the Service
Enable Plex on boot and start the service:
sudo systemctl enable plexmediaserver
sudo systemctl start plexmediaserver
Make sure it’s running:
sudo systemctl status plexmediaserver
🌐 Step 4: Access Plex Web Interface
Open your browser and go to:
http://<your-pi-ip>:32400/web
Log in with your Plex account and begin the setup wizard.
📂 Step 5: Add Your Media Library
Plug in your external HDD or mount a network share, then:
sudo mkdir -p /mnt/media
sudo mount /dev/sda1 /mnt/media
Make sure Plex can access it:
sudo chown -R plex:plex /mnt/media
Add the media folder during the Plex setup under Library > Add Library.
💡 Optional Tips
- Transcoding: The Pi can handle direct play (no transcoding) well, but struggles with transcoding large files. Use compatible formats like H.264 (MP4).
- USB Boot: For better performance, boot the Pi from an SSD instead of a microSD card.
- Power Supply: Use a proper 5V/3A PSU to avoid crashes under heavy disk load.
- Thermal: Add a heatsink or fan for the Pi if using Plex for long sessions.
🔐 Secure Your Server
- Use your router to forward port
32400
only if you want remote access. - Set a strong Plex password.
- Enable Tailscale or WireGuard for secure remote access without exposing ports.
✅ Conclusion
A Raspberry Pi might not replace a full-blown NAS or dedicated server, but for personal use or as a secondary Plex node, it’s surprisingly capable. With low energy usage and silent operation, it’s the perfect DIY home media solution.
If you’re running other services like Pi-hole or Home Assistant, the Pi can multitask well — just avoid overloading it with too much transcoding.
Post Comment