How to Turn a Raspberry Pi Into a Plex Media Server
Want to stream videos hosted on a Raspberry Pi to difference devices around your home? Several options are available (including Kodi) but for the best results, a dedicated Plex installation is recommended.
Here’s how to install Plex server on a Raspberry Pi, configure it, and start streaming your favorite movies, TV shows, music, family photos, and other media files.
What Is Plex?
If you’re not aware, Plex is an application that lets you stream your media anywhere, on almost any device. Installed standalone, it can be used to play video, music, and image files stored on a local (or network) drive.
Meanwhile, if it is installed as a server, a secondary device can then access the same content remotely, just as long as the Plex app is installed. The app adapts to changing scenarios; it too can act as a server, or it can be your Plex client.
Our guide to Plex demonstrates just how awesome it is. It’s worth noting quickly that Plex in its server form has been available for the Raspberry Pi since 2017. Prior to that, the Pi was only suitable for running Plex client apps.
What You’ll Need for a Raspberry Pi Plex Server
To install Plex server on your Raspberry Pi, you will need:
- Raspberry Pi 3 or later
- microSD card (8GB or more)
- External HDD or USB flash drive with media files
- USB keyboard and mouse
Naturally, you’ll also need a TV, with a competent sound system attached. You may use these optional extras:
- 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 for directly controlling Plex once it’s up and running.
Step 1: Install and Update Raspbian
You probably have Raspbian running on your Raspberry Pi already. Other versions of Linux for the Raspberry Pi should work, but this guide is produced 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 installation guide should see you through.
Once installed, boot up your Pi, and in the Terminal enter:
sudo apt update sudo apt upgrade
This will ensure that your version of Raspbian is fully up to date.
Step 2: Install dev2day and Download Plex
To install Plex, you’ll need to add a new repository. You’ll also need a GPG key to download it. We’ll deal with that first:
wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -
Next, edit the package list 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
Repeat the package update:
sudo apt update
Plex is now ready to install. Use
sudo apt install -t stretch plexmediaserver
Follow the on-screen prompt to complete the download and installation. A few minutes later, the Plex server should be installed on your Raspberry Pi.
Step 3: Configure Permissions and IP Address
So, you have the Plex server installed, but it’s not yet ready to run. First, you need to change the default username for the software; after this, you’ll 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 through to find the line that reads:
Edit the line so that it instead reads:
You should only change the username to “pi” if that is the username you’re using to log into your Raspberry Pi. Of course, you should have changed this by now. If you’re using a different username, substitute this for “plex” instead. (Read our important security tips for Raspberry Pi.)
Press Ctrl + X to exit, confirming your change, then restart the server:
sudo service plexmediaserver restart
To ensure that the Plex server is always accessible from your other devices, it’s worth setting a static IP address. Begin by finding the current address:
Next, open the cmdline.txt file and add a new line at the bottom.
sudo nano /boot/cmdline.txt
The new line should read:
Save and exit with Ctrl + X. Finish by restarting the Raspberry Pi:
Step 4: Add Media Files to Your Plex Server
When the computer has rebooted, you’ll be ready to start adding files to the server library.
These should already exist on the HDD (or your storage device of choice), but will need adding into Plex. Next, 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…
…without the square brackets.
The Plex web interface will open, so sign in (or create a new account) and read overview. Close this view, and the give your Plex server a name. Wait as this is detected, then click Add Library, and choose the library type. This will depend on the content you plan to add. Plex is capable of checking the internet for the correct movie and album art, so it’s important to get this right.
In the Add folders view, use the Browse for media folder button and search for the directory on the HDD. Repeat this as often as necessary until all of the media you want Plex to serve has been added into the library.
You should also check the Advanced tab to ensure the default display options for the folder are to your liking. Here you can select the online database for listings and artwork, as well as how to display collections of media, such as TV show seasons. The Advanced tab will display different options based on the type of content you’re adding.
Step 5: Connect With Client Devices and Enjoy!
Ready to enjoy your videos via Plex? First and foremost, you can just start watching on your TV. But if you want to take your videos with you around your property, you’ll need a Plex mobile app.
Available from Google Play for Android and the App Store for iOS, if you sign into the app with the same credentials you used on the server, the devices will link up. From there, you’ll be able to browse Plex for what you want to watch, hit play, and enjoy!
Interestingly, these apps have a built-in remote control, for use when enjoying media on Plex via your TV. This is an option you could use in place of the mouse and keyboard.
Meanwhile, as well as enjoying your own media files, check out the numerous unofficial channels that are available for Plex.
Read the full article: How to Turn a Raspberry Pi Into a Plex Media Server
- Before Samsung’s big event today, just ab...
- Book lovers are stuck in a neverending quest to...
- The days of having the perfect browser setup on...
- CERN (the European Organization for Nuclear Res...
- Sometimes when you connect an external hard dri...
- YouTube is updating its Community Guidelines to...
- Most well-paid jobs come with a list of entry r...
- It’s 2019. You’ve heard of bots. Th...
- Netflix has canceled The Punisher and Jessica J...
- Apple Music is the best music streaming service...