Plex is a streaming media server that lets you organize your video, music, and photo collections and stream your media to your computer, phone, tablet, or TV at any time and from anywhere. Plex media server can be installed on all major operating systems and devices.
This article explains how to install Plex Media Server on Ubuntu 22.04.
Installing Plex Media Server on Ubuntu
Plex is proprietary computer software, and it is not included in the Ubuntu repositories.
Installing Steam on Plex Media Server is fairly straightforward. We’ll enable the Plex official repository and install the package with apt
. It requires no technical knowledge, and it should not take you more than 20 minutes to install and configure the media server.
- Add the Plex APT repository to your system and import the repository’s GPG key:
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
Once the repository is enabled, update the apt package list and install the latest server version:
sudo apt update
sudo apt install plexmediaserver
To verify that the Plex is running, check the service status:
sudo systemctl status plexmediaserver
The output should look something like this:
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-06-17 19:36:33 UTC; 23min ago
That’s it. At this point, you have a Plex media server installed on your Ubuntu machine.
Adjusting the Firewall
Now that Plex is installed and running on your server, you need to make sure the server firewall is configured to allow traffic on the Plex-specific ports.
If you do not have a firewall running on your system, skip this section.
If you are using UFW
to manage your firewall, the easiest option is to create a UFW application profile:
sudo nano /etc/ufw/applications.d/plexmediaserver
/etc/ufw/applications.d/plexmediaserver
[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 the file and update profiles list:
sudo ufw app update plexmediaserver
Apply the new firewall rules:
sudo ufw allow plexmediaserver-all
Finally, check if the new firewall rules are applied successfully with:
sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
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
Leave a Reply