We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Install and Configure Plex Media Server on Debian 11/10

Learn how to – Install and Configure Plex Media Server on Debian 11/10.

Welcome to this guide on how to install and configure Plex Media Server on Debian 11 / Debian 10. Media servers are important since they help store, access/stream digital media over the internet. Today there are many media servers among them are Kodi, Subsonic, Emby, Madsonic, Universal Media Server, LibreELEC, Gerbera e.t.c

Plex is one of the most popular free media servers. It is highly preferred due to its simple and beautiful interface that allows one to organize music, videos, TV shows. These media can as well be accessed and shared using a client application such as mobile app, Roku e.t.c.

Other amazing features related to the Plex Media Server are:

  • Supports cloud sync.
  • Supports encrypted connections with multiple user accounts.
  • Allows you to easily pick and choose what to share.
  • Has a media optimizer
  • Supports flinging of video from one device to another.
  • Supports audio fingerprinting and automatic photo-tagging.
  • Offers the parental control functionality.
  • Supports encrypted connections with multiple user accounts.

By following this guide to the end, you should be able to install and configure Plex Media Server on Debian 11 / Debian 10.

Getting Started

Begin by updating the Debian packages to their latest versions.

sudo apt update && sudo apt upgrade -y

Also, install the required packages:

sudo apt install apt-transport-https curl vim wget sudo gnupg2 -y

Step 1 – Add Plex Repository on Debian 11 / Debian 10

There is a repository that provides the Plex packages. In order to install Plex on Debian 11 / Debian 10, we need to add this repository to our system.

Add the Plex repository using the below command.

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

Import the GPG keys for the repository.

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

Step 2 – Install Plex Media Server on Debian 11 / Debian 10

With the repository added, we can now proceed and install the latest available version of Plex on Debian 11 / Debian 10.

First, update the APT package index.

sudo apt update

Form the added Plex repo, install the Plex media server.

sudo apt install plexmediaserver

Dependency Tree:

The following additional packages will be installed:
  beignet-opencl-icd
The following NEW packages will be installed:
  beignet-opencl-icd plexmediaserver
0 upgraded, 2 newly installed, 0 to remove and 32 not upgraded.
Need to get 94.7 MB of archives.
After this operation, 291 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
....
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

Once installed, the Plex service is automatically started. Verify this using the command:

$ systemctl status plexmediaserver
 plexmediaserver.service - Plex Media Server
     Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vend>
     Active: active (running) since Thu 2022-03-10 03:28:17 EST; 16s ago
    Process: 3205 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER>
   Main PID: 3207 (PMS RunServer)
      Tasks: 131 (limit: 7075)
     Memory: 213.1M
        CPU: 18.238s
     CGroup: /system.slice/plexmediaserver.service
             ├─3207 /usr/lib/plexmediaserver/Plex Media Server
             ├─3264 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/>
             ├─3309 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexme>
             ├─3343 Plex Plug-in [tv.plex.agents.series] /usr/lib/plexmediaserv>
             ├─3415 Plex Plug-in [org.musicbrainz.agents.music] /usr/lib/plexme>

If it is not started, start it as below.

sudo systemctl start plexmediaserver

Enable the service to run automatically on system boot.

sudo systemctl enable plexmediaserver

Step 3 – Configure Apache Reverse Proxy for Plex

At this point, the Plex dashboard can be accessed using the URL http://localhost:32400/web. You can as well configure a reverse proxy in order to access Plex remotely and secure it with HTTPS.

Install the Apache webserver on Debian Debian 11 / Debian 10.

sudo apt install apache2 -y

Once Apache is installed, create a virtual host file for Plex.

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

In the file, add the lines below.

<VirtualHost *:80>
   ServerName plex.ownyourlife.com.ng
   ErrorDocument 404 /404.html

   #HTTP proxy
   ProxyPreserveHost On
   ProxyPass / http://localhost:32400/
   ProxyPassReverse / http://localhost:32400/

   #Websocket proxy
   <Location /:/websockets/notifications>
        ProxyPass wss://localhost:32400/:/websockets/notifications
        ProxyPassReverse wss://localhost:32400/:/websockets/notifications
   </Location>
</VirtualHost>

Save the file, enable the site and proxy module.

sudo a2enmod proxy_http
sudo a2enmod rewrite
sudo a2ensite plex.conf

Move the default Apache conf to a backup file as below.

sudo mv /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf.bak

Restart Apache.

sudo systemctl restart apache2

Step 4 – Access Plex Web UI

At this point, you can access plex using the URL http://IP_address/web or http://domain_name/web

Sign in to Plex using any of the preferred methods. Go through the page that describes Plex is and how it works.

Now configure Plex, begin by setting up the server name.

Proceed and set up the media library. This will allow you to pre-add your media directories if you have them already existing. Click on ADD LIBRARY and proceed as below.

Select the type of library you intend to add. Browse for the media on your local storage and add it.

Now with the preferred media library configured, proceed to the next step and finish up the server set up.

Now you will see the Plex dashboard appear as below.

You can now proceed and watch live TV, movies, podcasts, and listen to music. For example, watching live TV, you are required to select the desired live TV channel from the provided list

To view local storage files, click on more and your media server will appear with the added libraries. You can as well add more libraries here.

Make configurations to Plex such as language, the user interface, plugins e.t.c under the settings tab.

Step 5 – Setup a Plex Client

The Plex client can be installed on several platforms that include; Android, Mac, Apple TV, Windows e.t.c. The client applications are provided on the Plex apps page.

For example, using an android client, I can view the added media libraries, viewed channels on my account.

Sign in to the Plex account

Choose how you want to sign in to the Plex account.

If you have more than one Plex server, proceed and select the desired server to connect to.

Optimize navigation on the Plex client, then proceed to the Plex dashboard.

Under more, you can view media from the Plex server media library.

Step 6 – Secure Plex Media Server with Let’s Encrypt SSL

You can consider securing your Plex Media Server with Let’s Encrypt SSL certificate.

Closing Thoughts.

At this point, you should be more excited about this media server. With the Plex media server set up on Debian 11 / Debian 10, you can store digital media such as music, videos, photos e.t.c and access them anywhere over the internet.

Related posts:

Cart

Your Cart is Empty

Back To Shop