Install Plex Media Server on Ubuntu Server 20.04

Hello, fellow SysAdmin 💪

In the following post, I am going to install Plex Media Server on Ubuntu Server 20.04. In case you don't know about Plex before:

Plex is one of the most important streaming services, even if it's not one of the most well-known offerings. While the best streaming services often place large libraries of shows and movies at your reach for on-demand viewing, Plex lets you become the master of your own domain.

If you have a collection of media (or know someone else with one), Plex enables you to stream all that stuff from a computer or server onto your TV. You can watch your personal collection of media on Smartphone (Android/Iphone), PC or even on TV.

This tutorial was tested on

  • Ubuntu 20.04 (Focal)
  • 1 Core AMD EPYC 7443 (shared), 15 GB NVME, 2GB RAM, 500GB Bandwidth 🇸🇬 for $17.00/year on HostHatch

Plex app and Plex Media Server are a bit different.

With Plex Media Server you can store your own personal collection of media, either film, videos, or music. Plex Media Server is a free and proprietary media center that can run as a dedicated media server on GNU / Linux, Windows, Mac, and BSD systems.

in order to watch (stream) your collection you need Plex App. You can download Plex App on Playstore, App store, Playstation store, Microsoft store, or a .exe for Windows Installation. Download Plex App on here

Now in this post, we are going to Install how to install Plex Media Server on Ubuntu Server 20.04, so we can store our content collection on the server.

Installing Plex Media Server on Ubuntu 20.04

Before we start, there are two simple ways to download and install Plex Media Server.

Using the .deb file

First, we are going to visit the official download page of Plex Media Server and select Linux as a platform.

Download and Install .deb
Choose Distribution for Linux Intel/AMD 64bit

Choose Linux and Distribution = Ubuntu 16.04+/Debian 8+ - Intel/AMD 64-bit

And then copy the .deb link like this one*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..

SSH into your remote Ubuntu server, and download it with wget command.


root@redroc:~# wget*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..             --2022-12-09 08:16:24--*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..
Resolving ( 2606:4700::6812:1260, 2606:4700::6812:1360,, ...
Connecting to (|2606:4700::6812:1260|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 84526490 (81M) [application/x-debian-package]
Saving to: ‘plexmediaserver_1.29.2.6364-6d72b0cf6_amd64.deb?_gl=1*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..’

plexmediaserver_1.29.2.6364-6d72 100%[==========================================================>]  80.61M  32.0MB/s    in 2.5s

2022-12-09 08:16:27 (32.0 MB/s) - ‘plexmediaserver_1.29.2.6364-6d72b0cf6_amd64.deb?_gl=1*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..’ saved [84526490/84526490]

Once the download is finished, rename your plexmediaserver installer file with an easy name (like plexmediaserver.deb), with the following command:

mv 'plexmediaserver

and then click a tab on your keyboard, and it will autocomplete like this one:

mv 'plexmediaserver_1.29.2.6364-6d72b0cf6_amd64.deb?_gl=1*1fj7e4o*_ga*MTg5NzU5MTg1MS4xNjY2MDA3NjEx*_ga_G6FQWNSENB*MTY3MDU3MzA1NC44LjAuMTY3MDU3MzA1NC4wLjAuMA..' plexmediaserver.deb

Check the root directory with ls command:

root@redroc:~# ls
plexmediaserver.deb  snap

We will use the following command to install the package with dpkg command:

sudo dpkg -i plexmediaserver.deb
Plex Media Server installed successfully

Check whether the Plex Media Server service running or not by using the following command:

sudo systemctl status plexmediaserver.service


If the service is running, the status will be Active: active (running)

Setup completed, you can proceed to the next step:

How to Activate / Claim Plex Media Server

Using the Plex Repository

If you prefer the apt-get way by using the official repository of Plex. you must first import GPG key from the repository.

First, we need to install basic dependencies:

sudo apt update
sudo apt install wget curl gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates

Add Plex APT repository to your system by using the following command:

echo deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

Import GPG key:

cat  PlexSign.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/PlexSigkey.gpg

Once the repository has been added, then update your system again:

sudo apt update


root@redroc:~# sudo apt update
Get:1 public InRelease [6685 B]
Get:2 public/main amd64 Packages [432 B]
Hit:3 focal-security InRelease
Hit:4 focal InRelease
Hit:5 focal-updates InRelease
Hit:6 focal-backports InRelease
Fetched 7117 B in 1s (10.1 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
62 packages can be upgraded. Run 'apt list --upgradable' to see them.

At this point already we can install plex running the command:

root@redroc:~# sudo apt install plexmediaserver
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 62 not upgraded.
Need to get 84.5 MB of archives.
After this operation, 251 MB of additional disk space will be used.
Get:1 public/main amd64 plexmediaserver amd64 [84.5 MB]
Fetched 84.5 MB in 1s (86.7 MB/s)
Selecting previously unselected package plexmediaserver.
(Reading database ... 94693 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.29.2.6364-6d72b0cf6_amd64.deb ...
PlexMediaServer install: Pre-installation Validation.
PlexMediaServer install: Pre-installation Validation complete.
Unpacking plexmediaserver ( ...
Setting up plexmediaserver ( ...
PlexMediaServer install: PlexMediaServer- - Installation starting.
PlexMediaServer install:
PlexMediaServer install: Now installing based on:
PlexMediaServer install:   Installation Type:   Update
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:   Processor:           AMD EPYC 7443 24-Core Processor
PlexMediaServer install:   Intel i915 Hardware: Not found
PlexMediaServer install:   Nvidia GPU card:     Not Found
PlexMediaServer install:
PlexMediaServer install: Completing final configuration.
PlexMediaServer install: Starting Plex Media Server.
PlexMediaServer install: PlexMediaServer- - Installation successful.  Errors: 0, Warnings: 0
Processing triggers for mime-support (3.64ubuntu1) ...

Once Plex is installed, we can check service status running:

sudo systemctl status plexmediaserver.service

Setup completed, you can proceed to the next step:

How to Activate / Claim Plex Media Server

Summary :

Plex Media Server is installed on our server (server-side application), while Plex App is installed on your devices. In order to watch your film/videos, or music collections that are stored on your Plex Media Server, you need to install Plex App on your devices (For TV: Roku, Fire TV, Samsung || For Mobile: iOS and Android || For Consoles: Xbox and Playstations || For Dekstop: Mac, Windows, and Web).

We can install Plex Media Server in Ubuntu Server in two ways:

  1. Using .deb file
  2. Using the Plex Repository

After the Plex Media Server installation is completed, we need to activate/claim the Plex Media Server with this tutorial:

How to Activate / Claim Plex Media Server

Thanks for reading!


-Average SysAdmin