Introduction: Plex is a popular media center. Raspberry Pi fans have been putting the client-side Plex app on Raspberry Pis for years. Until recently it wasn’t possible to set up the server-side app on the Raspberry Pi. That has changed, this post will show you how to set up a Raspberry Pi Plex server.

Assumptions:

You have a Raspberry Pi with a monitor, keyboard and mouse connected

Internet connectivity for your Pi

Micro SD 8Gb or larger

(optional) external storage, e.g. USB hard drive

To Begin:

Step 1: Install Raspbian on your Pi. If you’re not familiar with this, I recommend using NOOBS, which is the easiest option.

Step 2: If you’re not familiar with the command line, these two commands might seems confusing. We’re just updating the OS, drivers, and other integrated applications to be sure everything is up to date.

sudo apt-get update

sudo apt-get upgrade

Step 3: Let’s use HTTPS for everything, it may not be critical, but it’s good practice. If your system already has it installed you’ll get a message indicating that, if not this will install it.

sudo apt-get install apt-transport-https

Step 4: We need to add the repository where Plex Media Server is stored online. The first step is to get the public key from the repository, this ensures we’re communicating with the correct server in the net steps.

wget -O https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -

Now that we have the Plex repository’s public key stored in a file, we add the repository to our systems list of package repositories.

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

Now that we have the repository listed as a package source, we need to download our package list.

sudo apt-get update

Now we can get to what we wanted in the first place! download and install Plex. You’ll be asked to approve the download, type y and hit enter.

sudo apt-get install -t jessie plexmediaserver

Step 5: Assuming you’re logged in as the default pi user, we need to set the Plex server to run under that user’s permissions. Edit Plex’s configuration file via

sudo nano /etc/default/plexmediaserver.prev

Now find the line with the text PLEX_MEDIA_SERVER_USER=plex replace the user name plex with the Pi’s default username pi

PLEX_MEDIA_SERVER_USER=pi

If you’re not familiar with nano, CTRL+x is the command to exit, pressing y indicates you want to save changes on exit. Do that.

Now we have to restart Plex to apply the new configuration.

sudo service plexmediaserver restart

Optional: Static IP:

It’s optional, but very useful, to have your server always assigned to the same IP address. Because your home router is usually responsible for assigning an IP to devices which connect to it, the currently assigned IP is most likely the best choice to use as the static IP going forward. If you don’t know what your Pi’s IP is you can type

hostname -I

It’s a good idea to write down this IP address, I like to write it on tape and stick it to the case of my PI

Finally:

Restart your Pi to test configuration worked and Plex runs at startup. You can hit the reset button or type

sudo reboot

You can now visit your Pi via web browser via IP, if you did the static IP that’s the IP you assigned above, the web server is served over port 32400 by default.

xxx.xxx.xxx:32400/web/

You’re now all set. If you need help uploading media check out Plex’s guides. As always leave questions and/or comments down below.