A run-down of my experiences with the Plex media server on a Raspberry Pi 4. Installation, lessons, enhancements, and tweaks.
Plex is a fantastic way to watch and share all of your media with one powerful tool. Even better, it can be installed on a small footprint with a Raspberry Pi. If you like to tinker, this tutorial is for you. However, just because you can, doesn’t mean you should. While the Pi is a great way to get Plex going, it doesn’t have the horse power to do lots of high quality simultaneous device streaming. That said, for most people, it will do the job nicely.
- Raspberry Pi 4 (4GB RAM is pretty necessary)
- USBC power adapter
- Mini HDMI to HDMI cable
- Micro SD card (32GB or more)
- Raspbian OS
- Plex Linux Server
Set up the Raspberry Pi
Install Raspbian OS
In this section we're going to get the Raspbian OS up and running so that we can then install Plex.
- Download NOOBS
- Format your micro SD to FAT.
The Mac's Disk Utility is an easy way to do it.
- Transfer Noobs onto the SD card.
Note: Only transfer the files inside the downloaded folder. Noobs will not boot if you transfer the root folder over.
- Insert the SD card into the Pi and turn it on. If the files were transferred correctly, the Pi will automatically boot up to a distro install screen.
- Choose Raspbian and install. Either full or basic are fine. I went with basic to preserve a little space and the fact I wouldn't be using any extra software.
- Follow all the prompts making sure to change your default pi password, set up wifi, download any updates, etc.
- Finally, enable SSH via the GUI to enable remote access from another computer: Pi Menu>Preferences>Raspberry Pi Configuration>Interfaces>SSH=Enable.
This is very handy if you end up having your setup in a hard-to-access location, or run it headless. In most cases, I do all my RP work over SSH since my Pi is located in an invonvinient place.
Prepping your system and storage requirements
There a few things you'll need to make sure are installed and working properly to ensure everything goes smoothly. Launch the terminal on your Pi and get to work.
- Ensure HTTPS transport package is installed (it most likely is for the latest versions of Noobs & Raspbian):
- If you're going to be dealing with NTFS drives, you'll want the NTFS packages:
- If you're dealing with EXFAT drives:
- Finally for this section, find out what architecture you have. This is how you're going to determine the correct version of the Plex server to download. Remember what's returned, you're about to need it.
Set Up Plex
Head to the Plex download page and grab the right version for your Linux distro. In our case, Raspbian is a Debian fork, so you want the Debian install. In addition, you want the right version for your architecture (the value you got in the last step).
- armhf requires the ARMv7 package
- arm64 requires ARMv8 package
Do not extract the downloaded package in the GUI, we'll do that via the command line.
Back in the terminal, run the following command to install the Plex server:
- You now need to change the default Plex user from "plex" to whatever your chosen username is. Let's face it, it's probably "pi", amirite? You will do this in the command line. I used Nano to edit the file, but you can use the editor of your choice.
- In the file, locate the line reading,
PLEX_MEDIA_SERVER_USER=plexand change the user from
plexto your user name (which is probably
- Save your changes and exit out. If you're in Nano and not sure how to do so: CTRL+X, Y, ENTER
- Once everything is installed, in your browswer, navigate to https://127.0.0.1:32400/web where you should see the glorious Plex logo appear!
- It's now time to have Plex discover your content. Connect your hard drive(s) to the Pi if you haven't already.
Follow the setup steps on the Plex server site that you just navigated to. At some point, it will ask you to set up your content libraries. This is where you're going to find out if you need to do some harddrive mapping.
Go ahead and choose the type of library you want to set up (movies, music, TV, etc.) and navigate to the harddrive that contains the files.
If you can see your hard drive contents you're in business. If you cannot, there is more work to be done. You must manually map your drives. For information on how to do that, check out these resources:
Plex frequently releases updates to the server. The easiest way to stay up-to-date is to periodically run an update command. For this, I went ahead and created a bash script so I wouldn't have to run everything manually. The script involves these commands:
There may be an occasion where you need to start, stop, or restart the Plex server. You can do so with these commands:
This tutorial only scratches the surface of how you can install and tweak Plex. If you like to get your hands dirty, it's a fun project to tweak and maintain.