Plex is an interesting streaming media service. Like Netflix or Prime Video, there are a few shows and movies you can watch after creating an account (it’s free!). But the best feature is that you can host a Plex server on your Raspberry Pi, add your own files to it, and watch them from any device, even remotely.
In this tutorial, I’ll show you how to set this up.
Plex offers a Debian package for ARMv8 and ARMv7, that can be installed on Raspberry Pi OS to host media files on it, and access them from any device (computers, iPads, smartphones), all over the world.
Let’s start directly with the server installation, and I’ll explain the basics along the way.
If you’re looking to quickly progress on Raspberry Pi, you can check out my e-book here. It’s a 30-day challenge where you learn one new thing every day until you become a Raspberry Pi expert. The first third of the book teaches you the basics, but the following chapters include projects you can try on your own.
Plex media server installation on Raspberry Pi
Here are the required steps to install Plex Media Server on your Raspberry Pi:
- Install a compatible system on your device (any Debian based distribution).
- Download the Debian package from the official website.
- Install the package and start the application.
Install Raspberry Pi OS or Ubuntu
The easiest way to install Plex Media Server on a Raspberry Pi is to use a Debian based distribution, as Plex offers packages for this system. So, using Raspberry Pi OS or Ubuntu seems a great choice.
Plex Media Server is a service, so you don’t need a desktop environment. Using a minimal or server version of these distributions is totally fine if it works for you.
Before going further, just make sure to configure the Internet connection (LAN or Wi-Fi) and do the system updates. Enabling SSH or VNC on the Raspberry Pi, and following this tutorial from your computer can also make it easier, but it’s not mandatory.
Download Plex media server
Once your system installed, you need to download the latest version of Plex Media Server from the official website:
- Open this page.
- Choose Linux on the left side.
- Then click on “Choose distribution” on the right.
- You have the choice between a 64-bits version (ARMv8) or 32-bits (ARMv7).
If you have a Raspberry Pi 3B+ or higher, you can pick ARMv8. For older models, use ARMv7.
If you don’t have a desktop environment on your Raspberry Pi, you need to use a command line to download the package. From your computer, do a right-click on the link and copy the URL.
Then, open a terminal and use wget to download the file on the Raspberry Pi, here is the syntax:
wget <URL>So, for example:
Don’t use this exact command, as the link will change with any version update.
Are you a bit lost in the Linux command line? Check this article first for the most important commands to remember and a free downloadable cheat sheet so you can have the commands at your fingertips.
Plex media server installation
Once downloaded, Plex can be installed directly on your Raspberry Pi.
If you have a desktop environment, you can most likely just click on the downloaded file to install it.
It will ask your password, install the prerequisites automatically and add the Plex icon to your main menu (I’ll explain the next steps later).
On a minimal installation, you’ll need to install it manually, with this command line:
sudo dpkg -i <package_name>So, in my example, it’s:
sudo dpkg -i plexmediaserver_126.96.36.19998-99a4a6ac9_arm64.deb
It will install everything for you, and configure the corresponding service. The Plex media server will start automatically on boot. There is nothing else to do.
Note : there is a Docker version of the Plex Media Server, if you really need it, but ARM is not supported directly. You can find more details on this page (scroll down to “Using docker-compose on ARM devices”). I find it harder to install than with this Debian package, so I won’t give more details about it in this tutorial.
And if you have no idea what Docker is, you should probably start by reading my complete guide about it here.
First access to Plex media server
Plex comes with a web interface that can be accessed locally. We’ll use it to create your Plex account (or log in if you already have one) and connect the server to this account.
Web interface access
On a distribution with a desktop environment, Plex is now available in the main menu.
On Raspberry Pi OS, it’s under “Sound & video”:
The shortcut will open this URL in your web browser:
So, if you don’t have a desktop environment, or want to use your computer directly, you can just access:
http://<IP>:32400/webto get the same interface.
Create a free account
The first step will be to sign in with a Plex account:
Don’t worry if you don’t have one yet, you will be able to create an account on the next page if needed.
Fill the form with your email and create a password (or use one of the services to link Plex to an existing account on Google, Facebook or Apple).
Note: I got an issue after signing in. A loading icon stayed forever on my screen. I had to refresh the page to move to the next step. Feel free to do the same if you experience the same bug.
Once logged in, a welcome wizard shows up, explaining how the Plex Media Server Works:
Click on the bottom button to move forward.
You’ll be offered to get a Plex Pass for advanced features, but you don’t need it for now. Close the pop-up to skip it.
You can then choose a name for your server, and add your media libraries (media folders) if needed. I’ll get back to this later, so you can skip this part if you’re lost:
Once completed, you’ll then access the full interface of Plex, looking like this:
As I explained previously, even if you don’t have any local files, you can already use Plex to watch free movies and shows.
But you don’t need a Raspberry Pi for this, so I guess that’s not what is interesting to you.
Adding a Raspberry Pi (or another device) as a server, allows you to add access to this server remotely.
It’s like having your own media files inside your Netflix account.
You can browse the interface to see all the default features you get with your new Plex account. I recommend starting with the settings (key icon in the top-right corner), to adjust your preferences (language, stream quality, etc.).
You can also use advanced features, like linking other streaming services (Netflix, Prime, etc.) or use webhooks to link your smart devices to Plex (dim the lights when you start a movie is the example they give).
Stream local files in your Plex account
So, how do you use your Raspberry Pi to stream local files into your Plex account?
Well, it’s not very complicated, so let’s find out.
The main issue I received while testing this on Raspberry Pi relates to file permissions.
The Plex server runs with the “plex” user, while you are using another user on your system (maybe “pi” or the one you created on first boot).
If you have all your files under /home, let’s say in the “Movies” subfolder, Plex won’t have access to them.
If you use a USB drive to store your files, you will have the same issue. Raspberry Pi OS will auto-mount the drive, giving access to your username only.
So, the first step, is to make sure you give access to both users.
For example, you can create a new folder outside /home, and add permissions for everyone (or at least Plex and your main username):
sudo mkdir /opt/plex_files
sudo chmod 777 /opt/plex_files
This will give everyone all privileges for this folder. This is not the best practice, but in most cases it’s not a big deal, and it’s the easiest way.
Then, move all your media files to this folder. You can do it with the file explorer, or in command line too. For example:
mv /home/<username>/Videos/* /opt/plex_files/
Once your files are stored in a directory that you and Plex have access to, adding these files in the Plex interface is pretty straightforward:
- Open the Plex web interface.
- In the left menu, click on “More” and hover on your server name.
- Then click the “+” icon to add a new library.
- Select the library type, and give a name to this library.
- Then browse or type the files location (/opt/plex_files in my example).
- Click on “Add Library” to complete this step.
It will add a new entry below your server name, with the library you just created. And you’ll get access to the files that you put in the corresponding folder:
What’s nice is that you have now access to these files from everywhere, any device, as soon as you log in to your Plex account. I will show you in the next part how to access your account from any computer, smartphone or tablet.
Note: Using a USB drive for your library location is a bit more complex. I recommend reading this tutorial first, to learn how to mount your USB drive and give it the correct permissions.
Reminder: Remember that all the members of my community get access to this website without ads, exclusive courses and much more. You can become part of this community for as little as $5 per month & get all the benefits immediately.
Install Plex player on other devices
Once Plex Media Server is installed, your account is created and your local files are added to the interface, you can now use the Plex service from anywhere.
I tested it on my computer and smartphone, and it works really well. Here is how to do the same thing depending on the device you use.
On a computer: Windows / Linux / macOS
From a computer, the easiest way would be to access Plex from your web browser.
Just go to plex.tv and sign in. You’ll get direct access to your account, with your Raspberry Pi available in the left menu (click on “More” if it doesn’t show up directly).
The interface is almost the same as when you access the IP address directly, so you shouldn’t be lost. By the way, you can always use the IP address directly. I didn’t test it, so I don’t know if it uses the Internet connection when you directly access the Raspberry Pi. If you have a slow connection, maybe it’s better to use Plex locally.
For Windows and Mac users, the Plex player can also be installed on your computer.
Go to this page, select your operating system and download the corresponding file from there.
Smartphones and tablets (Android / iOS)
Plex is also available in your smartphone app store. Whether you are using Android or an iPhone, you’ll be able to easily find it. Like on computer apps or in your web browse, the interface looks similar, with almost the same features. You can even link your local files to your account if you have a Premium pass.
Smart TV and consoles
Plex is also available on other devices, like smart TVs, game consoles and VR devices. If you want to use Plex and stream files from your Raspberry Pi on those devices, check their app store, or download the installer from the official website.
You can also use Plex with the Amazon Fire TV, Chromecast or Android TV (which can run on another Raspberry Pi by the way, as explained in this article).
Overall, Plex is an interesting app if you are looking for a useful project to do with your Raspberry Pi. It’s free, and it works well, even with a cheap device like a Raspberry Pi.
LibreElec and OSMC are great tools for local files only, but Plex adds another set of features to that kind of project.
Also, I just want to address a special thanks to György Tamás Vizi, who is one of my “True Fans” on Patreon. True fans get nice perks, like access to the website without ads and behind-the-scenes content. It helps me a lot, so thanks for your support!
Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.
Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.
Need help building something with Python?
Create, understand, and improve any Python script for your Raspberry Pi.
Learn the essentials step-by-step without losing time understanding useless concepts.
Get the e-book now.
You can also find all my recommendations for tools and hardware on this page.