With its low power draw, low cost, and decent performance, the Raspberry Pi is almost perfect as an always-on media server to stream movies, TV shows, music, family photos, and other media files to your devices.

Setting up your Raspberry Pi as a Plex server is quick and straightforward. Here's how to do it.

What You Need to Install Plex on Raspberry Pi

Raspberry Pi 4 in case

Before you set aside an afternoon for tinkering, make sure you have everything you'll need first. The project will take significantly longer if you have to nip out to Walmart or place an Amazon order halfway through the process. This is what you'll need:

  • A Raspberry Pi: A Raspberry Pi 4B is the best option due to its superior capabilities.
  • An Ethernet cable: While you can set up your Raspberry Pi as a Plex server over Wi-Fi, streaming speeds will suffer.
  • A storage device: A high-capacity microSD card is adequate, although a USB solid-state drive (SSD) is better.
  • A computer you can use to install Raspberry Pi OS and connect from over Secure Shell (SSH).

Install and Update Raspberry Pi OS

Your humble single-board computer can run a huge range of operating systems—even Windows 10 and 11 can be made to run on a Raspberry Pi.

We recommend deploying Raspberry Pi OS Lite (64-bit). This is a lightweight Debian port, with no extraneous fluff or packages you're not going to use. As the Pi will be used as a server, you don't even need a desktop environment.

Follow our Raspberry Pi installation guide, and make sure you configured the advanced options to set your username, password, and are able to connect to your local network. You should also set a memorable hostname, such as "plexpi", so that it's easy to find on your local network and access via SSH.

Once the image has been written, insert the microSD card or plug in your SSD. If using the latter, check out how to boot a Raspberry Pi from SSD.

You'll need to SSH into your Pi for the rest of this guide, using either your Linux terminal or an SSH client for Windows. Read more on how to SSH into a Raspberry Pi for remote access.

Connect to your new Raspberry Pi with:

        ssh your_username@plexpi.local
    
ssh authenticity warning in terminal

You'll see a warning that the authenticity of the host can't be established, and be asked if you want to continue. Type yes and press Enter. Then enter your password when prompted, and press Enter again. As part of the warning, you'll also see the local IP address of the Raspberry Pi. Take a note in case you need it later.

Packages may have become out-of-date since the OS image was released. Update and upgrade them with:

        sudo apt update && sudo apt upgrade
    

Once all the software is updated, you will be returned to the command prompt.

Install Plex Media Server on Raspberry Pi 4B

install plexmediaserver on raspberry pi

The Plex media server isn't available in the standard repositories, so you'll need to add the Plex repository before you can install it. First though, you need to install the apt-transport-https package.

        sudo apt install apt-transport-https
    

You're now able to add the official Plex media server repository to your sources with:

        echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
    

...and the key to your keyring:

        curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
    

Update your system and install Plex with the following commands:

        sudo apt update
sudo apt install plexmediaserver

After a few minutes, installation will complete. Read through the output and you'll see that a new user called "plex" has been created, along with a "plex" group.

Start and enable the Raspberry Pi Plex server with:

        sudo systemctl start plexmediaserver
sudo systemctl enable plexmediaserver

This will ensure that Plex starts as soon as your Raspberry Pi starts up. Reboot the Pi with:

        sudo reboot
    

Check the server is running with:

        sudo service plexmediaserver status
    

If everything is working well, you should see the word "active" displayed in green.

Configure Plex Media Server on Raspberry Pi

Before you go any further, decide what media types you want to stream through your Raspberry Pi Plex server, and create directories for them. To create a directory for movies, for instance, you would enter:

        mkdir ~/movies
    

To transfer movies from a different PC to the correct location on your Pi, use the Secure Copy (scp) command on that computer, either from your Linux/Mac terminal or through an SSH app, such as PuTTY.

        scp /path/to/your/local/movies/* your_username@plexpi.local:~/movies   
    

For the rest of this guide, you will configure your Raspberry Pi Plex streaming server through a browser. In the URL bar, enter: your-pi-local-ip-address:32400/web. Or, if you used our suggested hostname, you would enter plexpi.local:32400/web.

create plex account

Plex requires central authentication, and you can create an account using your ID from Google, Facebook, or Apple. Alternatively, you can use email.

The option to sign up with email is in small gray text, and is located below the "Sign in" button. You'll need to hand over your email address and create a password. Given Plex's record with data breaches, it's a good idea to use an email alias and a unique password instead of handing over your main address.

plex introductory summary

On the next screen, you'll see a very brief summary of how Plex works. Click the Got it! button,

Next up is a pop-up advert with options for the "Plex Pass"—a collection of paid-for features which supposedly enhance your experience. Decide whether you think they're worth it. Click the X at the top right of the screen or anywhere away from the pop-up to dismiss it.

When prompted, give your server a friendly name to help identify it in Plex apps and on your network. If you want to access media from outside your house, you can check the box for "Allow me to access my media outside my home", and follow the instructions.

Click Next, then decide whether you want to sync your watched shows and ratings with the central Plex servers. According to TorrentFreak, Plex is under tremendous pressure from copyright groups to more actively police its users, so you should, perhaps, be circumspect with what information you share with the company.

Add media directory to plex

Now it's time to add your media libraries. Click Add Library, then choose the media type from Movies, TV Shows, Music, Photos, or Other Videos. Click Browse for Media Folder, and locate the correct directory on your Pi, then click Add.

Repeat this for each type of media you want Plex to serve, then select your streaming services from a list.

Connect Plex to Client Devices

While it's super-easy to connect to Plex through the web browser on your PC, you'll also be able to connect to your Raspberry Pi Plex server using the dedicated apps for Android and iOS. Sign in to the apps using the same credentials you created earlier, and enjoy all of your own media as well as streaming shows from Plex itself.

Plex Isn't the Only Raspberry Pi Streaming Media Server

While Plex is the market leader among streaming media servers you can run from your Raspberry Pi, it's far from the only one.

It's possible you don't like the idea of signing in through a third party, accepting terms and conditions, disclosing your viewing habits, or being constantly upsold on features which should come as standard. If that's the case, consider Jellyfin—a completely free and self-contained alternative which can handle movies, shows, music, photos, live TV, and even audiobooks!