Want to stream video hosted on your Raspberry Pi to various devices in your home? There are several options available (including Kodi), but for the best results, a dedicated Plex install is recommended. In fact, the Raspberry Pi is one of the best devices to use as a Plex media server.

Here’s how to install a Plex server on your Raspberry Pi, set it up, and start streaming your favorite movies, TV shows, music, family photos, and other media.

What is a plex?

In case you don’t know, Plex is an app that lets you stream media anywhere, on almost any device. Installed separately, it can be used to play video, music and image files stored on a local (or network) drive.

Meanwhile, if set as a server, the secondary device can then access the same content remotely, as long as the Plex app is installed. The application adapts to changing scenarios; it can also act as a server, or it can be your Plex client.

raspberry pi plex media server tutorial

Our Guide to Plex shows how cool it is. It’s worth noting that Plex in server form has been available for the Raspberry Pi since 2017. Prior to this, the Pi was only suitable for running Plex client applications.

What You Need for a Raspberry Pi Plex Server

To install a Plex server on your Raspberry Pi, you will need:

  • Raspberry Pi 3 or later
  • microSD card (8 GB or more)
  • External HDD or USB flash drive with media files
  • USB keyboard and mouse

Naturally, you will also need a TV with a competent sound system connected. You can use these additional features:

  • Ethernet cable for more reliable router connection
  • Wireless / Bluetooth keyboard and mouse

While it is possible to set up a Raspberry Pi via an SSH connection you’ll need a device to directly control Plex once it’s up and running.

Step 1: Install and update Raspbian

You are probably already running Raspbian on your Raspberry Pi. Other versions of Linux for the Raspberry Pi should work, but this guide was prepared using a fresh install of Raspbian Stretch.

Need help installing an operating system on your Raspberry Pi? Beginners should probably start with NOOBS, but if you’re computer savvy, the standard Raspberry Pi setup guide should help you out.

Once installed, boot up your Pi and type in Terminal:

sudo apt update sudo apt upgrade 

This ensures that your version of Raspbian is fully up to date.

Step 2: Install dev2day and download Plex

To install Plex, you need to add a new repository. You will also need a GPG key to download it. Let’s deal with this first:

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

Then edit the list of packages from the terminal using the echo and tee commands:

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

Retry the package update:

 sudo apt update 

Plex is now ready to install. usage

 sudo apt install -t stretch plexmediaserver 

Follow the on-screen instructions to complete the download and installation. In a few minutes, your Raspberry Pi should have a Plex server installed.

Step 3: Set permissions and IP address

So, you have a Plex server installed, but it’s not ready to go yet. First, you need to change the default username for the software; after that you will need to specify a static IP.

Open the plexmediaserver.prev file in the nano text editor to edit it.

 sudo nano /etc/default/plexmediaserver.prev 

Scan to find the line that reads:

 PLEX_MEDIA_SERVER_USER=plex 

Edit the line so that it reads instead:

 PLEX_MEDIA_SERVER_USER=pi 

raspberry pi plex media server tutorial

You should only change the username to «pi» if that username is used to log into the Raspberry Pi. Of course you should have changed that now. If you are using a different username, replace it with «plex». (Read our important Raspberry Pi safety tips.)

Click ctrl+X, to exit after confirming the changes, then restart the server:

 sudo service plexmediaserver restart 

To ensure that the Plex server is always accessible from your other devices, it is worth setting a static IP address. Start by looking for the current address:

 hostname -I 

Then open the cmdline.txt file and add a new line at the bottom.

 sudo nano /boot/cmdline.txt 

The new line should read:

 ip=[YOUR.IP.ADDRESS.HERE] 

Save and exit with Ctrl + X Finish by restarting your Raspberry Pi:

 sudo reboot 

Step 4: Add Media Files to Your Plex Server

When the computer restarts, you will be ready to start adding files to the server library.

They should already exist on your hard drive (or storage device of your choice), but they need to be added to Plex. Then open a browser on your Raspberry Pi and enter the IP address of the Plex server followed by: 32400 /web/. It should look something like this…

 [YOUR.IP.ADDRESS.HERE]:32400/web/ 

… without square brackets.

The Plex web interface will open, so sign in (or create a new account) and read the overview. Close this view and provide the name of your Plex server. Wait until it’s detected, then click Add Library and select a library type. This will depend on the content you plan to add. Plex is able to check the internet for the correct artwork for movies and albums, so it’s important to get it right.

Add Library to Plex

In the view » Add folders» use the button » Browse Media Folder » and find the directory on your hard drive. Repeat this as many times as needed until all the media you want to use with Plex has been added to the library.

You should also check the Advanced tab to make sure the default display options for the folder are to your liking. Here you can select an online database for listings and artwork, as well as ways to display media collections such as TV show seasons. The Advanced tab will display different options depending on the type of content you’re adding.

Run a Plex Server on Your Raspberry Pi

Step 5: Connect to client devices and enjoy!

Ready to enjoy videos through Plex? First of all, you can just start watching on TV. But if you want to take your videos around with you, you’ll need the Plex mobile app.

Available on Google Play for Android and the App Store for iOS, if you sign in to the app with the same credentials you used on the server, the devices will connect. From there, you will be able to browse Plex to see what you want to watch, hit «play» and enjoy!

Interestingly, these apps have a built-in remote control for use when watching media on Plex through your TV. This option can be used instead of a mouse and keyboard.

Meanwhile, in addition to enjoying your media, check out the many unofficial channels available for Plex

Похожие записи