A run-down of my experiences with the Plex media server on a Raspberry Pi 4. Installation, lessons, enhancements, and tweaks.
Contained in this article
This tutorial will cover:
- a brand new RP4 setup
- configuring your linux environment
- installing plex
- configuring and tuning plex to run optimally on a small system
A Brief Overview of Why
What is Plex?
In Plex's own words,
Plex brings together all the media that matters to you. Your personal collection will look beautiful alongside stellar streaming content. Enjoy Live TV & DVR, a growing catalog of great web shows, news, and podcasts.
I decided a while back that I was no longer comfortable with the model of buying digital content from a service such as Google Play or Amazon, since I did not actually own the content. I don't like that these services can dictate how and even when I can consume the content. With Plex, I'm able to digitize all my [legally] purchased content and be comforted knowing I will always have access to it. With Plex, I'm my own content provider, serving up decades of my own music, TV, movies, and photos.
Why the Pi?
The Raspberry Pi is an inexpensive and fun platform on which to geek out, to put it simply. In addition, my goal was to create as low-profile a system as I could. The Raspberry Pi is tiny, and the hard drives I purchased were small, laptop SSHDs. All in all, I just tucked them away behind some books and no one was the wiser.
A Word of Caution
Just because we can, doesn't mean we should...
This write-up is for anyone who, like me, loves to mess around and tinker with stuff. However, if you want a basic tutorial to simply get Plex up and running, there are far easier ways to do it. It can be as easy as downloading it to your Mac or PC, installing, and then you're pretty much off to the races.
Additionally, if you require a powerful system that supports multiple simultaneous streaming of 4K content, you do not want to use a Raspberry Pi! The pi simply does not have the horsepower.
Now the disclaimers are out of the way, let's get going!
That said, with some careful configuration and tweaking, the Raspberry Pi Plex server can meet most needs and be a lot of fun in the process.
In any project, a good plan can help you stay focused and ensure you successfully complete your mission. This project is no different. As you go into the project, ask yourself how much content you have, how you plan to back up your data, where you want your little server set up to live, etc. etc. Will you have multiple hard drives or just one? Are they going to be dedicated to only the Pi?
Getting a good plan together will help you save money. It's also good to read a bunch of blogs about what other people have done. That said, here's what I've done.
- 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.
(New Out Of The Box Software)
- 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.
Full or basic, is 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".
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).
armhfrequires the "ARMv7" 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
pi, so you end up with:
- Save your changes and exit out. If you're not sure how to do so:
- Once everything is installed, in your browswer, navigate to
https://127.0.0.1:32400/webwhere you should see the glorious Plex logo appear!
- Connect your hard drive(s) if you haven't already.
Follow the setup steps on the Plex server site. 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 and can skip the next section. If you cannot, continue on. There is more work to be done.
Map Your Hard Drives
Because of the way Linux handles permissions, Plex most likely does not have permission to see into your harddrives.