keepcalculator

06 Numbers and Powers

Plex Server on Raspberry Pi: Setup Guide

Card No. 06·6000 · Updated · Standard formula, shown below

Yes, you can create a Plex server on a Raspberry Pi, and it works well for direct-play streaming to a few devices. You install the Plex Media Server software on the Pi, point it at a folder of media files, and then access your library from any device on your network or remotely. This guide covers what you need, how to set it up, and what to expect in terms of performance.

Why Use a Raspberry Pi for Plex?

The Raspberry Pi is a low-cost, low-power single-board computer. Compared to a traditional PC or a NAS, it draws only a few watts, runs silently, and costs around $35–$75 for the board alone. For a small home library of movies and TV shows, it can replace a dedicated media PC. The main trade-off is processing power: the Pi’s CPU and GPU are not designed for heavy video transcoding. If you only play media that your client device can handle natively (direct play), the Pi can serve multiple streams without breaking a sweat. If you need to convert video formats on the fly, you’ll hit its limits quickly.

What You Need

  • Raspberry Pi 4 or 5 – The Pi 4 with 4GB or 8GB RAM is the sweet spot. The Pi 5 is faster but costs more. Older models (Pi 3) are too slow for smooth playback.
  • MicroSD card (16GB or larger, Class 10/A2) – For the operating system and Plex installation. A high-endurance card is recommended for constant reads/writes.
  • Power supply – Official USB-C power supply for Pi 4/5 (5V/3A or 5V/5A for Pi 5).
  • External storage – USB 3.0 hard drive or SSD for your media library. A 2.5″ portable drive works well; a desktop drive with its own power supply is more reliable.
  • Network connection – Ethernet cable is strongly recommended for stable streaming. Wi-Fi can work but may cause buffering with high-bitrate files.

How to Install Plex on Raspberry Pi

There are two main ways: using the official Raspberry Pi OS (Debian-based) or using a dedicated media server OS like DietPi or OpenMediaVault. The steps below use Raspberry Pi OS Lite (64-bit) for a minimal setup.

  1. Flash the OS – Use the Raspberry Pi Imager to write Raspberry Pi OS Lite (64-bit) to the microSD card. Enable SSH in the imager settings.
  2. Boot and update – Insert the card, power on, and SSH into the Pi (default user pi, password raspberry unless changed). Run sudo apt update && sudo apt upgrade -y.
  3. Install Plex – Add the Plex repository and install the server:
    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
    sudo apt install plexmediaserver
  4. Mount your storage – Connect your external drive, find its device name (lsblk), create a mount point (e.g., /mnt/media), and add an entry to /etc/fstab so it mounts automatically at boot.
  5. Set permissions – Ensure the Plex user (plex) can read your media folder: sudo chown -R plex:plex /mnt/media or add the plex user to the appropriate group.
  6. Access the web interface – Open a browser on your computer and go to http://:32400/web. Follow the setup wizard to claim your server and add libraries.

Performance and Transcoding Limits

The Raspberry Pi 4 can handle one 1080p transcode, but only if the source is H.264 and the target is also H.264. It cannot handle 4K transcoding at all. The Pi 5 has a more powerful GPU and can handle a few 1080p transcodes, but still not 4K. In practice, you should aim for direct play: ensure your client (TV app, phone, etc.) supports the codecs of your files. Common codecs like H.264 and H.265 (HEVC) are widely supported, so most modern devices can direct play them. If you have a file that needs transcoding, you’ll see high CPU usage and potential buffering. To avoid this, pre-convert files with HandBrake or choose a client that supports the format.

Setting Up Remote Access

Plex can stream over the internet, but you need to enable remote access. In Plex settings, go to Settings > Remote Access and enable it. Plex will attempt to set up a secure connection via a relay, which is limited to 2 Mbps (enough for mobile streaming but not full quality). For full-speed remote streaming, you need to port forward port 32400 on your router to the Pi’s IP address. This exposes your server to the internet, so use a strong password and enable two-factor authentication on your Plex account. If you have a dynamic IP, consider using a dynamic DNS service.

Common Problems and Fixes

  • Server not showing up – Ensure Plex is running (sudo systemctl status plexmediaserver) and that port 32400 is open in your firewall.
  • Buffering on Wi-Fi – Use Ethernet or move the Pi closer to the router. Also check if the Wi-Fi is 5GHz and not congested.
  • External drive not mounting – Check dmesg for errors, and make sure the filesystem is supported (NTFS works but uses more CPU; ext4 is native).
  • Transcoding is slow – Disable transcoding for that library or convert files beforehand. Lower the quality in the client app to reduce CPU load.
  • Plex not seeing media – Verify folder permissions and that the library path is correct. Also check that the drive is mounted before Plex starts (add nofail to fstab).

Cost and Power Comparison

A Raspberry Pi setup costs roughly $100–$150 including a case, power supply, SD card, and a basic USB drive. It uses about 5–10 watts, which translates to a few dollars a year in electricity. In contrast, a used office PC might cost $150–$300 and use 30–60 watts. A dedicated NAS (like Synology or QNAP) starts at $300 without drives. The Pi is the cheapest and most energy-efficient option, but you get what you pay for: less storage expansion (usually one USB drive) and limited transcoding. If you have a large 4K library or multiple users, a more powerful machine is worth the extra cost.

Alternatives to Plex on Raspberry Pi

If Plex doesn’t fit your needs, consider other media servers that run on the Pi:

  • Jellyfin – Free and open-source, with similar features to Plex. It has no premium tier and no account requirement, but its apps are less polished.
  • Emby – A paid alternative (with a free tier) that is more lightweight than Plex but similar in functionality.
  • Kodi – Not a server, but a media player that can be installed on the Pi and access shared folders. It works well for a single TV, but not for remote streaming.
  • MiniDLNA – A simple UPnP server that streams raw files to DLNA-compatible TVs. No transcoding, no library management, but extremely lightweight.

Frequently Asked Questions

Can a Raspberry Pi 4 run Plex in 4K?
It can, but only if the client can direct play the 4K file. The Pi cannot transcode 4K, so any conversion will fail or buffer. If your TV app supports HEVC and the file is H.265, it will play fine.

How many users can stream at once?
For direct play, the Pi can handle 3–5 simultaneous streams, depending on bitrate. For transcoding, you’ll be limited to 1–2 1080p streams, and only if the source is H.264. The Pi 5 is slightly better but still not a multi-user transcoding machine.

Do I need a Plex Pass for the Raspberry Pi?
No, a Plex Pass is optional. It adds features like hardware-accelerated transcoding, but the Pi doesn’t have a supported GPU for that (the Pi 5’s VideoCore VII is not supported by Plex’s hardware transcoding). The free version works fine for basic streaming.

Can I use a USB drive for both the OS and media?
Technically yes, but it’s not recommended. The SD card or USB drive will wear out faster with constant reads and writes. Use a separate drive for media to keep the OS stable.

How do I update Plex on the Pi?
Simply run sudo apt update && sudo apt upgrade – Plex updates are included in the repository. You can also check for updates in the Plex web interface.

Is it safe to expose Plex to the internet?
With a strong password and two-factor authentication, it’s reasonably safe. However, any internet-facing service has some risk. If you’re concerned, use a VPN to access your home network instead of port forwarding.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →