Would you want to stream videos from a Raspberry Pi to a variety of devices across your house? Although there are several solutions (including Kodi), a dedicated Plex installation is advised for the best results. The Raspberry Pi is among the best devices for use as a Plex media server.
Install Plex server on a Raspberry Pi, set up the server, and start streaming your favorite movies, TV shows, music, family photographs, and other media files.
What Is Plex?
If you're unaware, Plex is an application that enables you to stream your media on nearly any device, anywhere. It can play video, audio, and picture files stored on a local (or network) disc when it is installed standalone.
A Plex server may view the same content remotely if it is installed on a secondary device, just as long as the Plex app is installed as a server. The application is flexible and may function as a server or as your Plex client.
Just how fantastic Plex is, as shown in our guide It's worth mentioning quickly that since 2017, the Raspberry Pi has been able to run Plex in its server version. Before then, the Pi was only suitable for running Plex client applications.
What You'll Need to Install Plex Server on a Raspberry Pi
To install Plex server on your Raspberry Pi, you will need:
- Raspberry Pi 3 or later
- Micro SD Card or an SD card if you’re using an old version of the Pi.
- External HDD or USB flash drive with media files
- USB Keyboard and mouse
You'll also need a TV with a competent sound system. You may add these things as an option:
- Ethernet cable for more reliable router connection
- Wireless/Bluetooth keyboard and mouse
You'll need a device for directly managing Plex once it's running, even though it's possible to set up a Raspberry Pi through an SSH connection.
Step 1: Install and Update Raspbian
Raspbian is most likely already running on your Raspberry Pi. This article was produced using a new install of Raspbian Stretch, although other versions of Linux for the Raspberry Pi should work.
Do you need assistance installing an OS on your Raspberry Pi? Beginners should usually start with NOOBS, but if you're familiar with computers, see the standard Raspberry Pi installation tutorial.
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
You'll need to create a new repository before you can install Plex. To download it, you'll also need a GPG key. We'll take care of it first.
wget -O - https://dev2day.de/pms/dev2day-pms.gpg.key | sudo apt-key add -
Using the echo and tee commands, edit the package list in the terminal next:
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
The download and installation must be finished according to the on-screen prompts. Your Raspberry Pi should have the Plex server installed within a few minutes.
Step 3: Configure Permissions and IP Address
You have installed the Plex server, but it isn't yet ready to function. Changing the software's default username is the first step; next, you'll need to specify a static IP.
To edit the plexmediaserver.prev file, open it in the Nano text editor.
sudo nano /etc/default/plexmediaserver.prev
Scan through to find the line that reads:
Edit the line so that it instead reads:
If you normally log into your Raspberry Pi using the username “pi,” you only need to update the username to that. Of course, by now, you ought to have changed this. Substitute “plex” for this if you're using a different username.
Restart the server by pressing Ctrl + X after confirming your change:
sudo service plexmediaserver restart
It's worth establishing a static IP address to make sure that the Plex server is always accessible to your other devices. Find the current address first:
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
You'll be ready to begin adding files to the server library when the machine has restarted.
These should already be present on the HDD (or other storage devices of your choice), but you'll need to add them to Plex when you're ready. Next, open your Raspberry Pi browser and type 32400/web/, followed by the IP address of the Plex server. It should resemble the following:
without the square brackets.
Sign in (or create a new account) and review the overview when the Plex web interface opens. Close this window before naming your Plex server. When this has been detected, click “Add Library” and choose the library type. This will depend on the content you plan to add. It's crucial to get this right since Plex is capable of searching the internet for the appropriate movie and album art.
Use the “Browse for Media Folder” button in the “Add Folders” window to search for the HDD directory. Until all of the media you want Plex to serve has been added to the library, repeat this as frequently as required.
Additionally, make sure the folder's default display options are to your taste by checking the Advanced tab. Select the online database for listings and artwork, as well as how to display media collections like TV show seasons, from this tab. Depending on the type of content you're adding, the Advanced tab will display different options.
Step 5: Connect With Client Devices
Are you ready to watch your videos on Plex? To begin with, just turn on your TV and start watching. You will, however, need a Plex mobile app if you want to take your videos with you around your property.
If you sign into the app using the same credentials you used on the server, the devices will link up. It is available through Google Play for Android and the App Store for iOS. From there, just browse Plex for the content you want to view, press “Play“, and enjoy!
When enjoying media on Plex via your TV, these applications feature a built-in remote control that may be used. In place of the mouse and keyboard, here is an option you might use.
Check out the numerous unofficial media channels that are available for Plex while you're waiting, as well as enjoy your media files.