ThinkingCog

Articles written by Parakh Singhal

Installing Plex Media Server on Raspberry Pi

 

Key Takeaway

In my last post I wrote about how to install and operate Raspbian operating system in a headless mode using a static IP address with the intention of starting and using services that require a static IP address. Plex Media Server is one such service which can run fruitfully on Raspberry Pi 3 Model B and use the hardware to the fullest. In this post I will demonstrate how to install Plex Media Server on your Raspberry Pi and consume media from it.

Read On

Plex Media Server as the name suggests is a media server and can serve various types of media on a variety of devices. The basic premise behind the server is to provide media to the consuming point per the capabilities of the client. For example, if you have a video file in mkv (Matroska) format and you want to see the video on an iPad, you cannot do until you transcode the file into a format that is compatible with iPad. In this case it will be mp4. Plex provides on the fly transcoding capabilities, so you do not have to wait for the entire video file to be transcoded and then see it. It instead, transcodes the file on the fly and streams it to your device.

To get started, make sure that you have the latest version of Raspbian operating system installed and Pi is configured to communicate to your router using a static IP address. Before we start, let’s make sure that the system is having the latest packages installed using the following commands:

sudo apt-get update sudo apt-get upgrade

Update command brings information about the newer versions of the packages installed in the operating system and are available in the repository, while upgrade actually downloads the packages and installs them. Please note that upgrading the packages can download a significant amount of data, so if you are on metered bandwidth, beware.

After this we need to ensure that the traffic between Pi and clients travel on an encrypted channel. For that we need to make sure that the “https” package is installed and running. Run the following command:

sudo apt-get install apt-transport-https

 

Plex is not officially supported on Pi, so we will download the port created by the good folks at dev2day. The first step to do that is to add the public key corresponding to the package. Run the following command to get it done:

 

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

 

01 Installation of Key - Cropped

 

I tried searching for the Plex package made for Stretch, but was not available at the time of writing this post/. So we will install the one available for Jessie. Add the package to the list of packages by running the following command:

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

 

02 Correct - Inclusion in the package List - Cropped


Now update the package list so we are able to pull in the latest Plex Media Server package:

sudo apt-get updateNow get and install the package: sudo apt-get install -t jessie plexmediaserver

 

 

03 Updating the packages - Cropped

 


04 Installation of Plex - Cropped

We need to change the default user under which the PMS is supposed to run from “plex” to “pi”:

sudo nano /etc/default/plexmediaserver.prev

 

05 Change of user - Cropped


Now restart the plex service and reboot Pi:

sudo service plexmediaserver restart sudo reboot

 Once Pi comes up, go to the static IP address at which Pi operates appended by “:32400/web” and it will take you to the welcome screen. From there on you can register for an account and add media to your library. Note that creating and using an account is not necessary to use Plex.

06 Plex Installed - Cropped

Welcome to Plex Media Server on Raspberry Pi.