Categories
Raspberry Pi

Install Plex on Raspberry Pi

Turn your Raspberry Pi into a home media server through the use of Plex. Learn how to set up and install it.

Install Plex on Raspberry Pi | Overview

In this article we’re going to install Plex on Raspberry Pi. By doing this you’ll be able to turn your Pi into a media server. This will allow you to stream all the content that you have stored on a hard drive to any device you own. You’ll be able to access your Plex Server both locally and remotely. This means you can stream your home library while across the globe!

What is Plex

Plex is a piece of software that is installable on a Linux devices, such as a Raspberry Pi, or Windows computers. You can take media that you have downloaded or stored on the device or a connected drive and then stream it to your other devices. This includes media such as movies, TV shows, music, pictures, and videos. Plex is available to stream content on iPhone, Android, Windows, Linux, and Roku devices.

Why Install Plex on Raspberry Pi?

Well, if you already own or have copies of media, or acquire them by “other means,” Plex is great because it’s 100% free! There is no subscription fee, and no one is harnessing your data and selling it to other companies. Plus, I mean, now you have a convenient client to watch all the “Linux ISOs” that you’ve downloaded.

So, you think Plex is something you’re interested in and you want to install it? Perfect, that’s the whole point of this article! Let’s get right into it.

What You'll Need to Get Started

Everything you need

  • Raspberry Pi 4GB
  • On/Off Switch
  • Power Supply
  • Aluminum Heatsinks

Get it here!

How to Install Plex to Your Raspberry Pi

1. Update and Upgrade Your Pi

The first step is to make sure that all the packages on your Raspberry Pi are up to do date. To do this, use the commands below.

				
					sudo apt update
sudo apt full-upgrade
				
			

2. Allow Retrieving Packages Over HTTPS

Next, we’re going to want to install a package that will allow us to retrieve packages over the HTTPS protocol. This is required because it is what Plex uses.

				
					sudo apt install apt-transport-https
				
			

3. Add the Plex Repository GPG Key

After we’ve allowed receiving packages over HTTPS we’ll want to add the Plex Repository GPG Key. This will ensure that when we attempt to download Plex in the next step, it is indeed a legitimate file signed by the same key.

				
					curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
				
			

4. Add the Plex Repository

The second to last step to installing Plex on your system is to add the Plex repository to your system. This will add Plex’s information to your apt/sources.list.d file so we can install it and update it.

				
					echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

				
			

5. Update Your Pi Again

Now that we’ve added Plex to the apt/sources.list.d file, we’ll want to update our system again to pull Plex’s information.

				
					sudo apt update
				
			

6. Install Plex

Our Pi is now ready for Plex, let’s get it installed.

				
					sudo apt install plexmediaserver
				
			

How to Assign a Static IP Address to Your Raspberry Pi

At this point, Plex is technically installed. You may want to configure a static IP address on your Raspberry Pi to make sure your router doesn’t assign it a new address. If your router were to assign your Pi a new address, you would have to manually find out what it is in order to re-connect to the server.

1. Get Your Current IP Address

Use the below command to get your Pi’s current IP address. Save your IP address somehow. You can write it down, take a picture, or copy it to your clipboard.

				
					hostname -I
				
			

2. Get Your Router's IP Address

Next, you’ll want to grab your router’s IP address, just like the previous step, you’ll want to make a note of it somehow.

				
					ip route | grep default
				
			
				
					# example output of above

default via 192.168.1.1 dev eth0 src 192.168.1.7 metric 202
				
			

The numbers after “default via” is your routers IP address.

3. Edit dhcpcd conf File

Now we’ll want to edit the dhcpcd conf file using the following command to do so.

				
					sudo nano /etc/dhcpcd.conf
				
			

Then we’ll want to add the following information to the bottom of the file. In this example, my Pi’s IP address is 192.168.1.7 and my router’s IP address is 192.168.1.1

				
					interface eth0
static ip_address = 192.168.1.7/24
static routers = 192.168.1.1
static domain_name_servers = 1.1.1.1 1.0.0.1
				
			

interface eth0 is if you’re using Ethernet. If you’re using Wi-Fi do interface wlan0.

In this example static_domain_servers is using Cloudflares DNS servers, in my experience they have been the fastest. If you would prefer to use google you can do static domain_name_servers = 8.8.8.8 8.8.4.4.

4. Reboot Your Pi to Make Sure Everything is Working

You’ll now want to reboot the Pi and test it to ensure that you didn’t break your Internet.

				
					sudo reboot
				
			

Once the Pi comes back online, use the below command to check for an active internet connection.

				
					ping google.com
				
			

If you receive data back, everything is working. If you get a “response timed out” error, you did something wrong and need to go back and carefully re-read each step.

Accessing the Plex Web Interface

Now that Plex has been installed and we’ve set up a static IP address, we’ll want to access the Plex Web Interface to configure it and add media.

To do this go to Your_Pi_IP:32400/web in a web browser. My Pi’s ip is 192.168.1.7 so I would do 192.168.1.7:32400/web.

At this point you are connected to Plex’s Web Interface. When you first go to the address it should make you run through some easy to follow instructions for adding your media to Plex. If you’re planning to stream remotely, create a plex.tv account.

You can install Plex on Windows and Mac for streaming in higher quality than Chrome supports or you can download the Plex app on iPhone and Android. You can also install Plex on other devices such as Chromecasts, Rokus, and quite a bit more, check the Plex download page to see if your device supports it.

What to do if You Have Questions or Issues?

If you come across any errors or issues that you can’t resolve, reach out to us. You can either leave a comment below, or Contact us.

Get tutorials delivered to your inbox weekly.

Recent Blog Posts

Leave a Reply

Your email address will not be published.