DIY Entertainment

How to Turn a Raspberry Pi Into a Plex Media Server

Christian Cawley 22-06-2018

Want to stream videos hosted on a Raspberry Pi to difference devices around your home? Several options are available (including Kodi) but for the best results, a dedicated Plex installation is recommended. In fact, Raspberry Pi is one of the best devices to use as a Plex media server.


Here’s how to install Plex server on a Raspberry Pi, configure it, and start streaming your favorite movies, TV shows, music, family photos, and other media files.

What Is Plex?

If you’re not aware, Plex is an application that lets you stream your media anywhere, on almost any device. Installed standalone, it can be used to play video, music, and image files stored on a local (or network) drive.

Meanwhile, if it is installed as a server, a secondary device can then access the same content remotely, just as long as the Plex app is installed. The app adapts to changing scenarios; it too can act as a server, or it can be your Plex client.

raspberry pi plex media server tutorial

Our guide to Plex Your Guide To Plex - The Awesome Media Center If you have a lot of locally-saved movies and TV shows, you need to install Plex. And this is the only guide to getting started with Plex you'll ever need to read. Read More demonstrates just how awesome it is. It’s worth noting quickly that Plex in its server form has been available for the Raspberry Pi since 2017. Prior to that, the Pi was only suitable for running Plex client apps.


What You’ll Need for a Raspberry Pi Plex Server

To install Plex server on your Raspberry Pi, you will need:

  • Raspberry Pi 3 or later
  • microSD card (8GB or more)
  • External HDD or USB flash drive with media files
  • USB keyboard and mouse

Naturally, you’ll also need a TV, with a competent sound system attached. You may use these optional extras:

  • Ethernet cable for more reliable router connection
  • Wireless/Bluetooth keyboard and mouse

While it is possible to set up a Raspberry Pi via an SSH connection Setting Up Your Raspberry Pi For Headless Use With SSH The Raspberry Pi can accept SSH commands when connected to a local network (either by Ethernet or Wi-Fi), enabling you to easily set it up. The benefits of SSH go beyond upsetting the daily screening... Read More , you’ll need a device for directly controlling Plex once it’s up and running.

Step 1: Install and Update Raspbian

You probably have Raspbian running on your Raspberry Pi already. Other versions of Linux for the Raspberry Pi should work, but this guide is produced using a fresh install of Raspbian Stretch.


Need help installing an operating system on your Raspberry Pi? Beginners should probably start with NOOBS, but if you’re computer savvy, the standard Raspberry Pi installation guide should see you through.

Once installed, boot up your Pi, and in the Terminal enter:

sudo apt update
sudo apt upgrade

This will ensure that your version of Raspbian is fully up to date.

Step 2: Install dev2day and Download Plex

To install Plex, you’ll need to add a new repository. You’ll also need a GPG key to download it. We’ll deal with that first:

wget -O - | sudo apt-key add -

Next, edit the package list from the terminal using the echo and tee commands:

echo "deb jessie main" | sudo tee /etc/apt/sources.list.d/pms.list

Repeat the package update:

sudo apt update

Plex is now ready to install. Use

sudo apt install -t stretch plexmediaserver

Follow the on-screen prompt to complete the download and installation. A few minutes later, the Plex server should be installed on your Raspberry Pi.


Step 3: Configure Permissions and IP Address

So, you have the Plex server installed, but it’s not yet ready to run. First, you need to change the default username for the software; after this, you’ll need to specify a static IP.

Open the plexmediaserver.prev file in the nano text editor to edit it.

sudo nano /etc/default/plexmediaserver.prev

Scan through to find the line that reads:


Edit the line so that it instead reads:


raspberry pi plex media server tutorial

You should only change the username to “pi” if that is the username you’re using to log into your Raspberry Pi. Of course, you should have changed this by now. If you’re using a different username, substitute this for “plex” instead. (Read our important security tips for Raspberry Pi.)

Press Ctrl + X to exit, confirming your change, then restart the server:

sudo service plexmediaserver restart

To ensure that the Plex server is always accessible from your other devices, it’s worth setting a static IP address. Begin by finding the current address:

hostname -I

Next, open the cmdline.txt file and add a new line at the bottom.

sudo nano /boot/cmdline.txt

The new line should read:


Save and exit with Ctrl + X. Finish by restarting the Raspberry Pi:

sudo reboot

Step 4: Add Media Files to Your Plex Server

When the computer has rebooted, you’ll be ready to start adding files to the server library.

These should already exist on the HDD (or your storage device of choice), but will need adding into Plex. Next, open a browser on your Raspberry Pi and enter the IP address of the Plex server, followed by :32400/web/. It should look something like…


…without the square brackets.

The Plex web interface will open, so sign in (or create a new account) and read overview. Close this view, and the give your Plex server a name. Wait as this is detected, then click Add Library, and choose the library type. This will depend on the content you plan to add. Plex is capable of checking the internet for the correct movie and album art, so it’s important to get this right.

Add media library to Plex

In the Add folders view, use the Browse for media folder button and search for the directory on the HDD. Repeat this as often as necessary until all of the media you want Plex to serve has been added into the library.

You should also check the Advanced tab to ensure the default display options for the folder are to your liking. Here you can select the online database for listings and artwork, as well as how to display collections of media, such as TV show seasons. The Advanced tab will display different options based on the type of content you’re adding.

Run a Plex server on your Raspberry Pi

Step 5: Connect With Client Devices and Enjoy!

Ready to enjoy your videos via Plex? First and foremost, you can just start watching on your TV. But if you want to take your videos with you around your property, you’ll need a Plex mobile app.

Available from Google Play for Android and the App Store for iOS, if you sign into the app with the same credentials you used on the server, the devices will link up. From there, you’ll be able to browse Plex for what you want to watch, hit play, and enjoy!

Interestingly, these apps have a built-in remote control, for use when enjoying media on Plex via your TV. This is an option you could use in place of the mouse and keyboard.

Meanwhile, as well as enjoying your own media files, check out the numerous unofficial channels that are available for Plex 20 Unofficial Plex Channels and Plugins You Should Install Right Now Want to unlock more Plex plugins? We show you how to access 20 of the best Plex channels to watch via the Unsupported AppStore. Read More .

Related topics: Plex, Raspberry Pi.

Affiliate Disclosure: By buying the products we recommend, you help keep the site alive. Read more.

Whatsapp Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. electron1979
    July 16, 2019 at 12:13 pm

    This link, states that "Finally, official ARMv7 and ARMv8 Plex packages are available" and "an official Plex repository should be available soon".

  2. Edwin66
    November 27, 2018 at 9:09 am

    Will this play files stored in my Synology 414j? I can't Plex to run on that nas

  3. Edwin 66
    November 27, 2018 at 9:07 am

    Would this be able to play movies that are on my bad (Synology 413j)?

  4. KevinK
    June 27, 2018 at 2:05 am

    The Raspberry Pi definitely is not a powerhouse; however, I've been using it as the family Plex media server for some time now. My first setup was with the Raspberry Pi 2B but shortly after setting it up the Pi 3 became available. All of my video files are mp4 format and all of my audio files are mp3 format which are stored on an external USB drive. I have not had any issues streaming videos (up to 1080p) from this device. (It is important to note that we seldom have more than 2 devices streaming from that server.) What I think is the best part about using the Raspberry Pi as a Plex server is not that you can do it, but that it is portable. I have configured the Raspberry Pi to be a WiFi access point running DNS and DHCP. With this setup, we can plug the Pi into the power outlet in the car, the kids can connect to the Plex server, and they have access to the full library while we are traveling down the road or have down time at the ball fields. The kids appreciate it on the long trips and it works fine for a limited number of devices. A couple things to note: 1) you need to authenticate to the plex server with your mobile device at least once before taking it on the road since there isn't an Internet connection available for authentication purposes. 2) The car's power outlet is enough to run the Raspberry Pi and external USB drive. I have had limited success using a portable recharger to run the setup. The Pi and drive draw too much power for most rechargers, and most of them don't have enough battery to run the server for very long.

  5. LordK1
    June 25, 2018 at 2:53 pm

    You'd better use the external HDD to boot the system on, as SDCards have a pretty low lifetime when writting on it.

  6. Krill Monsta
    June 25, 2018 at 4:50 am

    I've got a Plex server running on my 3b+ and it performs perfectly. No problem stream 1080p mkv downloads.

    • Krill Monsta
      June 25, 2018 at 4:51 am

      Though you do need to have a case with a fan, as it can get quite hot.

    • Szalai Barna
      June 30, 2018 at 2:00 pm

      Good news! Thanks.

  7. Andrew H
    June 23, 2018 at 6:28 pm

    If you're considering doing this, don't. Raspberry pi makes a terrible media server. I wasted weeks trying to get in working before giving up and buying a barebones PC to run a Linux based Plex server. Spend the extra $100 and save yourself a lot of trouble.

  8. Geoffrey Wilkes
    June 23, 2018 at 5:43 pm

    Raspberry Pi makes a horrible server. Nothing against the device but it can only transcode audio (usually), can't reliably send anything in HD (don't even try to transcode HD), multiple streams are a nonstarter. I really wanted it to work but it just isn't there yet. This is a very thorough setup guide but will lead the user to hours of frustration and disappointment unfortunately. A guide with minimum specs needed for each type of media would be very valuable however.

    • Torrey B
      June 23, 2018 at 11:27 pm

      This was my first thought as well. There's no way the pi has the power to do it properly.

  9. Chris
    June 23, 2018 at 11:38 am

    I'm curious how well the Raspberry Pi can keep up with transcoding on multiple streams. Any ideas here? I'm assuming this would only work for internal network use?

    • Wayne
      June 23, 2018 at 5:35 pm

      The Pi doesn't have enough horsepower to do transcoding. If you like to watch stuttering videos, run plex on a raspberry pi.

  10. Chris
    June 23, 2018 at 11:36 am

    I'm really curious how well transcoding works with the Raspberry Pi. Most of my library requires transcoding.

    • Frank
      June 23, 2018 at 1:15 pm

      Transcoding on the pi just isn't going to happen. If you go this route you will need to pre-transcode everything before putting it in the media library so that it can direct play on every client you intend to use.

      Plex on a pi is definitely possible, and can be fun to experiment with, but it's not very usable outside of very small usecases. Even a used laptop with a broken screen in the same price range as the pi would be a massive step up and give far more options.

  11. B. Szalai
    June 22, 2018 at 8:30 pm

    Can I use this setup to watch movies on Tv connected Rpi trough hdmi cable? If no, Chromecast 2 shoud work with my old Tv? Currently my Macbook is the Plex server, my iPhone has the client role, I want to replace the Mac with Pi.

    • Torrey B
      June 23, 2018 at 11:28 pm

      There is no way the pi will make a good Plex server or even a slightly functional one. Just not enough processing power there.

      • Me
        June 28, 2018 at 9:34 am

        True but it's not meant to be a powerhouse media streaming machine. This tutorial could merely be a stepping stone into further tinkering, hacking and low cost computing fun

      • George
        December 7, 2018 at 6:02 pm

        I set up a PMS on a RPI 3B+ just as a side project, as I had one of those boards sitting around. Running Raspbian, connected to through the ethernet. Attached to it is a 1TB HDD almost full with some kids movies and classics I want to have on hand. Everything works fine and can stream movies to my Sony Android TV (also hard wired to the LAN) and to my tablet, although I never tried to do 2 streams simultaneously. I find that this is a working solution, although not perfect (I sometimes get the "disconnected from server" message, I don't know why). I am not using any case with the PI, just heatsinks. The PI and the HDD sit in a drawer beside my desk, in a different room. Oh, and I also can watch without any issues my favorite shows outside of my home network and even asked people overseas to try. It works for them too.