Plex media is a platform that offers free media streaming services with a client-server model made by Plex inc. It offers software for users to manage their own personal media collections and gaming services. 

There is a free option for Plex and a paid option called Plex Pass. The free option allows you to download and use Plex but it is not open to all features unless you pay a subscription fee. Plex pass allows syncing and thus you can stream on multiple devices. It also gives you parental control like locking out content for your kids.

Features of Plex Media Server

  • 200+ Free Live TV channels
  • Plex Media Server enables you to manage your own media collection.
  • Lots of Free Movies and Shows to stream.
  • Stream on almost every device, from mobile to computers, and some supported Smart TVs.
  • Pause, Save, Resume feature that allows you to continue where you left off from any device once you are signed in.

In this guide, I’ll show you how to install Plex Media Server on KDE Neon|Kubuntu Linux system.

Install Plex Media Server on KDE Neon / Kubuntu

First, update your system using the following commands

### KDE Neon ### 
sudo apt update && sudo pkcon update -y

### Kubuntu ###
sudo apt update && sudo apt upgrade -y

Install curl, if you do have it in your system. This will be used later in this guide.

sudo apt install curl -y

Next will be to import the GPG key and add the Plex APT repository to your system.

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

Update the package list and install the latest Plex media server on KDE Neon|Kubuntu using the following commands

sudo apt update
sudo apt install -y plexmediaserver

If prompted to install the configuration file, type y. Sample Output

Setting up plexmediaserver (1.25.7.5604-980a13e02) ...

Configuration file '/etc/apt/sources.list.d/plexmediaserver.list'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** plexmediaserver.list (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/apt/sources.list.d/plexmediaserver.list ...
PlexMediaServer install: PlexMediaServer-1.25.7.5604-980a13e02 - Installation starting.
PlexMediaServer install: 
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   New
PlexMediaServer install:   Process Control:     systemd
PlexMediaServer install:   Plex User:           plex
PlexMediaServer install:   Plex Group:          plex
PlexMediaServer install:   Video Group:         video
PlexMediaServer install:   Metadata Dir:        /var/lib/plexmediaserver/Library/Application Support
PlexMediaServer install:   Temp Directory:      /tmp 
PlexMediaServer install:   Lang Encoding:       en_US.UTF-8
PlexMediaServer install:   Intel i915 Hardware: Not found
PlexMediaServer install:   Nvidia GPU card:     Not Found
PlexMediaServer install:  
PlexMediaServer install: Completing final configuration.
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
PlexMediaServer install: PlexMediaServer-1.25.7.5604-980a13e02 - Installation successful.  Errors: 0, Warnings: 0
Setting up beignet-opencl-icd:amd64 (1.3.2-7build1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...

To check if the Plex media server is running, use the following command;

$ systemctl status plexmediaserver
 plexmediaserver.service - Plex Media Server
     Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-03-21 21:00:40 EAT; 2min 38s ago
    Process: 33522 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mk>
   Main PID: 33525 (Plex Media Serv)
      Tasks: 110 (limit: 4572)
     Memory: 222.7M
     CGroup: /system.slice/plexmediaserver.service

Configure Firewall on Plex Media Server

The best option is to create a UFW application profile. Create a new file inside /etc/ufw/applications.d/ directory called plexmediaserver.

sudo nano /etc/ufw/applications.d/plexmediaserver

Then add the following content to it

[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
ports=1900/udp|32469/tcp

[plexmediaserver-all]
title=Plex Media Server (Standard + DLNA)
description=The Plex Media Server (with additional DLNA capability)
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp|1900/udp|32469/tcp

Save and exit the file then update the profile list using the command below

sudo ufw app update plexmediaserver

Apply the firewall rules using the following command

sudo ufw allow plexmediaserver-all

Verify the rules are configured or not, use the following command

sudo ufw status verbose

Sample Output;

Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To                         Action      From
--                         ------      ----
32400/tcp (plexmediaserver-all) ALLOW IN    Anywhere                  
3005/tcp (plexmediaserver-all) ALLOW IN    Anywhere                  
5353/udp (plexmediaserver-all) ALLOW IN    Anywhere                  
8324/tcp (plexmediaserver-all) ALLOW IN    Anywhere                  
32410:32414/udp (plexmediaserver-all) ALLOW IN    Anywhere                  
1900/udp (plexmediaserver-all) ALLOW IN    Anywhere                  
32469/tcp (plexmediaserver-all) ALLOW IN    Anywhere                  
32400/tcp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
3005/tcp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
5353/udp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
8324/tcp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
32410:32414/udp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
1900/udp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             
32469/tcp (plexmediaserver-all (v6)) ALLOW IN    Anywhere (v6)             

Configure Plex Media Server on KDE Neon / Kubuntu

First, create a directory to store the media contents. You can change the folder, to what you want to name it.

sudo mkdir -p /opt/plexmedia/{movies,series}

Then set permission for plex user to access the content files using the following command.

sudo chown -R plex: /opt/plexmedia

Now we can go to http://server_ip:32400/web on your browser and continue the server configuration.

It will open with a signup page, choose the option you want to continue.

Once you are signed in, The following page appears. You might be required to install other dependencies called DRM to be able to play videos on Plex. Click on the “GOT IT” button.

The next option is to select the Plex Pass option. You can skip this part by clicking the “x” button.

Next is the server setup. First, give the server a name then check the box that says “Allow me to access my media outside my home”. Then click Next.

Then add Media Library. On the pop-up window that appears, Select Movies then click Next. You can add more libraries.

Next is to browse the media folder. Ours is /opt/plexmedia/movies. You can choose where to store yours.

Then you are done. Click on Done to see the dashboard.

The Plex web dashboard opens.

Configure Apache as a reverse proxy to Plex Media Server

Install Apache if you do not have it

sudo apt install apache2 -y

Check to see if it is running using the commands below:

$ systemctl status apache2
 apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-03-21 21:07:43 EAT; 9s ago
       Docs: https://httpd.apache.org/docs/2.4/
   Main PID: 35367 (apache2)
      Tasks: 55 (limit: 4572)
     Memory: 4.7M
     CGroup: /system.slice/apache2.service
             ├─35367 /usr/sbin/apache2 -k start
             ├─35368 /usr/sbin/apache2 -k start
             └─35369 /usr/sbin/apache2 -k start

Us the following command to create a new virtual host

sudo nano /etc/apache2/sites-available/plex.conf

Add the following configuration

 <VirtualHost *:80>
   ServerName plex.example.com
   ProxyPass        / http://localhost:32400/
   ProxyPassReverse / http://localhost:32400/
 </VirtualHost>

Enable the newly created virtual host and restart the service.

sudo a2ensite plex
sudo systemctl restart apache2

You can now access the plex media server at HTTP://plex.example.com/web.

Update Plex Media Server on KDE Neon / Kubuntu

Run the apt update command

sudo apt update

If there is any updates use the following command

sudo apt upgrade plexmediaserver -y

To remove Plex Media Server use the following command.

sudo apt autoremove plexmediaserver --purge -y

Conclusion

You have successfully installed and configured Plex Media Server on KDE Neon|Kubuntu. You have also configured Apache as a reverse proxy server. It is also easy to set up Plex Media Server on the Web interface just as we have done. Plex allows you to save your favorite TV shows in one place.

More guides available on our website:

LEAVE A REPLY

Please enter your comment!
Please enter your name here