Raspberry PI

Plex Install on Raspberry PI 5

On a trip to update my Plex Server… I want to move it to the new Raspberry PI 5… What could go wrong?

Ok, here we go…

The assumption to start with is that you have your Raspberry setup and are at a terminal/ssh window (there are lots of step by step instructions on the web to get you there). Needless to say, you need the hardware and os setup before you start here.

Step 1. Make sure your raspberry is up to date with the sudo apt update/upgrade (apt-get is shown here)

sudo apt-get update
sudo apt-get upgrade

Step 2. You have to have the https protocol available on the PI (if it’s not already there).  Install the package.

sudo apt-get install apt-transport-https

Step 3.  Now the fun part. This step is about making sure that the Plex repository is available to the atp command for installing. This step is to put the signed key, for the repository, onto your PI’s keyring. This ensures that what you are installing is legit.

***Now many step throughs on the web have not updated this part, depending on what version of Debian/PI you have, you may see an error about a keyring command being deprecated. Trust me, if you get that error with the keyring step, using those an older ‘How to install plex for the PI’, you guess it… Plex will not install. I want to point out this whole step through assumes a reasonable latest Debian and a PI 5 (at the time of this post). Anything other than that, your milage may vary!

 Ok onto it. Let’s get that signed key in place so we can add the Plex repository:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor | sudo tee /usr/share/keyrings/plex-archive-keyring.gpg >/dev/null

Step 4. Now that the Plex GPG key is installed, we need to add the official plex repository.

echo deb [signed-by=/usr/share/keyrings/plex-archive-keyring.gpg] https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

Keep in mind that we have not actually installed Plex just yet. Steps 1-4 are about getting the PI ready.

Step 5. And just when you thought we were done with “step up”. Nope, one more housekeeping thing to do. We have to actually update to refresh the package list. This time the Plex repo is available. This of course is done with apt update:

sudo apt-get update

Step 6. Finally we are ready to install Plex with a apt install:

sudo apt install plexmediaserver

The install does a number of things. It creates a “plex” user and group. It should set up two directories-  one where to store files temporarily that Plex is transcoding. You can find this folder at “/var/lib/plexmediaserver/tmp_transcoding“.

The second directory is where Plex will store all the metadata it retrieves for your media. This folder can be found at “/var/lib/plexmediaserver/Library/Application Support

I found that I had to set these up for myself and make sure that “plex” was the owner with a “sudo chown”, and once installed, that Plex was using those paths. Again your milage may vary depending on how you have your PI filesystems set up.

At this point, you should have a Plex server available at it’s favorite http port.. Something like this:

http://<your PI ip Address>:32400/web

Some other tips about your newly formed Plex server…

I would make sure that the IP address to your PI is static (lots of places on the web with “how tos” down that rabbit hole).
That your router allows port 32400 to this PI to be available (useful if you want devices other than your browser to have access).
I would also, for the Raspberry PI 5, take advantage of the PI 5’s pcie port (hey it’s new! It’s faster! Why not?)

For my Plex move to the PI5, I have a 2Tb WD Blue SN580 NVMe attached to a PI 5 pcie hat/shield and a WD Blue SSD attached to the usb port. My PI 5 boots off the NVMe and Plex runs from that filesystem. I have libraries on both the NVMe and the SSD for Plex. And finally, I have Samba shares to the Plex library folders.

All in all, it is definitely a step up from my Raspberry PI 4b! Now all’s that is left for me to do is…. move over my massive library of TV and Movies… Oh Bother!

Happy Plex’ng
~SG

 

Leave a Reply