Setup Plex Media Server on RHL Linux

Reading Time: 4 minutes

What is Plex Media Server?

Plex Media Server is a great application for sharing your personal media at home and over the internet. I use it to stream my music over the internet to my phone when I am commuting to work, but it can also be used to stream movies, TV, photos to mention just a few.

Please note that there is also a Plex Media Player Application, make sure you download the correct version, you need Plex Media Server, not Plex Media Player.

Is Plex free?

Yes, the Plex media server is completely free, but there is no free support from Plex apart from the very helpful teams at Plex.tv forums. Plex does offer a Plex Pass which is a premium add-on that adds a few extra features. The best of these features is the ability to download, perfect for going on holiday or if you are commuting. There are also a number of really good search indexes available in Premium which make your music collection come alive, it’s not too different from the Spotify interface, but it uses all of your content.

Plex Media Server was originally released in 2008 for the Apple Mac, but since then it is fair to say that it is available for almost every device going. Not just Windows and Linux, but Storage devices, network appliances, and so on.

According to Wikipedia, Plex Media Server is available for:

  • Windows 7 and later, OS X Mavericks and later, Linux, FreeBSD 11.2 and later, Nvidia Shield TV, Synology Disk Manager 5 and later, Netgear, QNAP, Unraid, Drobo, ASUStor, Thecus, Seagate, Western Digital.
  • Player:
    Amazon Echo, Echo Dot, Echo Show, Amazon Fire tablet , Amazon Fire TV,, Android 5.0 and later, Android Auto, Android TV, Apple TV 4th Gen, Apple TV 4K, Chromecast, iOS 9.3 or later, PlayStation 3, PlayStation 4, Roku, Sonos, Oculus Go, webOS, Tizen, Windows 7 and later, Xbox 360, Xbox One, macOS High Sierra and later.

How to install Plex Media Server on CentOS (7+) and setup plex on RHL

This is a guide on how to install the Linux version of Plex Media Server on CentOS and Red Hat (7+) versions. Plex is not officially supported on older versions of Linux, with the CentOS 6 version officially being discontinued in Summer 2020.

  • Plex is not available by default on Centos Repos
  • I will be using Centos 8.3 for this demo
  • I will be using the root account

Step 1 – Update your CentOS Operating System

From the command line, uptime your Operating System to the latest level. This is not a mandatory step, however, it is highly recommended.

dnf update -y

Step 2 – Add the Plex Media Service Repository

Create a plex.repo config file for the plex repository

nano /etc/yum.repos.d/plex.repo

Input the following text into the file, you don’t have to use nano, just use your favorite text editors such as VI, VIM, or NANO.

[Plex]
name=Plex
baseurl=https://downloads.plex.tv/repo/rpm/$basearch/
enabled=1
gpgkey=https://downloads.plex.tv/plex-keys/PlexSign.key
gpgcheck=1
Plex

Save and Close the text editor, not we can install Plex Media Server.

Plex

Step 3 – Install Plex on RHL

Install Plex Media Server on your Operating System using the following command.

dnf install plexmediaserver -y

Step 4 – Set Plex Media Server to start at system boot up

Next set Plex to start at system boot, this is essential in case you ever need to reboot the server.

systemctl enable plexmediaserver
systemctl start plexmediaserver

Step 5 – Configure the local Firewall

If you opt to disable your local firewall you can skip this step, however, it’s recommended to keep the firewall enabled and instead create specific rules required by plex to punch through the firewall.

firewall-cmd --zone=public --add-port=32400/tcp --permanent
firewall-cmd --zone=public --add-port=32469/tcp --permanent
firewall-cmd --zone=public --add-port=8324/tcp --permanent
firewall-cmd --zone=public --add-port=3005/tcp --permanent
firewall-cmd --zone=public --add-port=32412/udp --permanent
firewall-cmd --zone=public --add-port=32413/udp --permanent
firewall-cmd --zone=public --add-port=32414/udp --permanent
firewall-cmd --zone=public --add-port=32410/udp --permanent
firewall-cmd --zone=public --add-port=1900/udp --permanent
firewall-cmd --zone=public --add-port=5353/udp --permanent
firewall-cmd --zone=public --add-port=80/tcp --permanent

Step 6 – Reload the Firewall

Now reload the firewall to pick up the changes

firewall-cmd --reload

Step 7 – Configure SELinux

If you have SELinux enabled you will need to allow Plex to run

setsebool httpd_can_network_connect on -P

What is the plex media server IP address?

You can log onto the Plex Server to complete the installation. The default address is your local IP address using port 32400. You can also use localhost from the same computer, or you can

http://localhost:32400/web/index.html
Plex
Plex Media Server main page

You can also download the app for your mobile phone from the Andriod & Apple stores.

Plex

Top Plex Q&A

How Does Plex work?

Plex Media server is an application that enables users to stream media content over their home network and even to the Internet.  It works great with Movies, Music, TV, photos and so on. 

It is written in python and c++ and was first released in 2008, and quickly became one of the most popular media stream apps ever released.  Its relatively lightweight but is compatible with every format going.  Media is transcoded at source and can be streamed to TVs, Games consoles, mobile phones, computers and even cars!

How to Add Files to Plex Media Server?

Plex can scan any Media attached to your computer,  be it local storage, USB drives or Network Attached Storage.  To add files navigate to the Plex Media Server library and click the plus icon. you will be asked if you want to load movies,  TV shows and so on, select your desired option, click Next and point the app to you files.  

What is Plex?

Plex Media Server is a great application for sharing your personal media at home and over the internet. I use it to stream my music over the internet to my phone when I am commuting to work, but it can also be used to stream movies, TV, photos to mention just a few.

Please note that there is also a Plex Media Player Application, make sure you download the correct version, you need Plex Media Server, not Plex Media Player.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *