How to Install Plex Media Server on Ubuntu 20.04 LTS

Plex is a media streaming server that allows you to organise and stream your video, music, and photo collections to your computer, phon...


Plex is a media streaming server that allows you to organise and stream your video, music, and photo collections to your computer, phone, tablet, or television at any time and from anywhere. Plex media server is compatible with a wide range of operating systems and devices.

Installing Plex Media Server on Ubuntu

Plex is a commercial piece of software that isn't available in the Ubuntu repository.

Steam can be installed on Plex Media Server with relative ease. We'll activate the official Plex repository and use apt to install the programme. It doesn't require any technical skills, and installing and configuring the media server shouldn't take more than 20 minutes.

1. 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

2. Once the repository is enabled, update the apt package list and install the latest server version:

$ sudo apt update
$ sudo apt install plexmediaserver

3. To verify that the Plex is running, check the service status:

$ sudo systemctl status plexmediaserver

The output should look something like this:

Output
● 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 is all there is to it. On your Ubuntu machine, you now have a Plex media server installed.

Adjusting The Firewall

Now that Plex is up and operating on your server, double-check that the server firewall is set to accept traffic on the Plex-specific ports.

  • [message]
    • If you do not have a firewall running on your system, skip this section.

The simplest option if you're using UFW to administer your firewall is to build a UFW application profile:

$ sudo nano /etc/ufw/applications.d/plexmediaserver
  • [message]
    • /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
Output
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

Configuring Plex Media Server

You can create the directories that will store the Plex media files before starting the Plex setup wizard:

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

The Plex Media Server runs as the user plex, and the media files and directories must have read and execute rights. Enter the following command to set the correct ownership:

$ sudo chown -R plex: /opt/plexmedia
  • [message]
    • You can choose any location to store the media files; just make sure you set the correct permissions.

You can now proceed with the server configuration. Open your browser, type http://YOUR_SERVER_IP:32400/web, and you will be redirected to the plex website.


You'll need to establish an account for Plex to work properly.

Create a free Plex account by pressing the Google, Facebook, Apple, or Email buttons. Purchase a Plex Pass plan if you want access to premium features.

After you join up, you'll be led to the page below, which contains information about how Plex works:


Select the "I've Got It" option.

Enter your Plex server name on the next screen, check Allow me to view my media outside my home box, and click Next.


After that, you'll need to add a media library. Select Add Library from the drop-down menu.

Select movies as the library type in the popup box that appears, then click Next.


In the next step, click on the Browse for media folder and add the path to the directory that will contain the Movies media files, in our case /opt/plexmedia/movies.


Click on the Add button and then on the Add Library.

You can add as many Libraries as you want.


Click Next, then Done, and you will be redirected to the Plex web dashboard.


Now that you've completed the setup procedure, you can begin exploring Plex's features and capabilities.

Updating Plex Media Server

To update Plex when a new version is published, use the following instructions in your terminal:

$ sudo apt update
$ sudo apt install --only-upgrade plexmediaserver

The official Plex repository may be disabled during the installation procedure. Open the plexmediaserver.list file and uncomment the line beginning with "deb" to enable the repository:

$ sudo nano /etc/apt/sources.list.d/plexmediaserver.list

# When enabling this repo please remember to add the PlexPublic.Key into the apt setup.
# wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -
deb https://downloads.plex.tv/repo/deb/ public main

Conclusion

We've taught you how to install Plex Media Server and establish a Media Library on your Ubuntu 20.04 system.

Plex is now available for download on Android, iPhone, Smart TV, Xbox, Roku, and other supported devices. On the Plex Downloads page, you can discover a list of supported Apps & Devices, or you can just install the app from the device's app store.

Check out the official Plex Quick-Start tutorial and the Plex Documentation website as well.

COMMENTS

Name

2023,2,Ai,2,AlmaLinux 9,3,Amazon Linux,5,Apache Web Server,1,AppImage,1,Arduino IDE,1,Artificial Intelligence,2,BalenaEtcher,1,Bitcoin,1,Blockchain Data,1,Bookworm,2,Bootable USB,1,C++,1,centos,1,CentOS 8,1,CentOS Stream,1,CMake,1,CockroachDB,2,cuDNN,1,Database Security,1,Debian,2,Debian 10,2,Debian 11,2,Debian 12,9,DNS,1,Docker,1,E-commerce,1,Fail2ban,1,Fedora Linux,1,Firefox 118,1,FreeIPA Server,1,Function,1,Game Projects,1,Git,3,Google PageSpeed,1,How to,5,How to Install,9,HTTPS,1,Introduction,1,Iptables,1,ISO Image,1,KVM,1,Laravel,1,Let's Encrypt SSL,1,Linux,4,Linux 6.4,1,Linux Kernel 6.5,1,Linux Mint,1,Linux Server,1,Linux-Based Systems,1,Mageia 9,1,Magento,1,MariaDB,1,Media Server,1,ModSecurity,1,New Features,1,Nextcloud,2,NGINX,2,Nvidia CUDA,1,odoo,1,Oracles,1,Performance,1,PHP Zip Module,1,pip,1,Plex,1,Port Forwarding,1,postgresql,2,Privacy,1,Programming,1,Pylint,1,python,5,Python 3.10,2,Quantum,1,Quantum Computers,1,Remote Branch,1,Renew,1,RHEL,1,Rocky Linux 9,2,Rufus,1,Shadow Password,1,SQLite,1,SSH,1,SSH key,1,SSH Keys,1,Step-by-Step,4,SuiteCRM,1,SUSE Linux,1,Syslog,1,System,1,Testing,1,Top 10,1,Translation,1,Ubuntu,1,Ubuntu 18.04,1,Ubuntu 20.04,5,Ubuntu 22.10,1,Ubuntu 23.04,1,Ubuntu Server,1,Ubuntu Upgrade,1,unsupported,1,Up-to-Date,1,Upgrade,1,Visual Studio Code,1,Vivaldi 6.2,1,Web 3.0,1,Web Hosting Security,1,Web Security,1,Webmin,1,What's New,1,Windows 11,1,
ltr
item
Linux code EDU: How to Install Plex Media Server on Ubuntu 20.04 LTS
How to Install Plex Media Server on Ubuntu 20.04 LTS
https://blogger.googleusercontent.com/img/a/AVvXsEi2YEV75yB_pu7aNl13W4lXofvV9BjIJxu60Izha7Ox2uTvFy9sHpv0gMirjctevqUH1WZr5xMvpTQ2B_HqHe0DnDtOPCTj9u9XUg2IX_Oj6JDduecjiBkUtSH4SLA71dR5dzh0YsOGI4WvWBHKUZPgdx6EiMPg72FRqoF3U50hSvPPNlwbzigU_pZefA=w640-h378
https://blogger.googleusercontent.com/img/a/AVvXsEi2YEV75yB_pu7aNl13W4lXofvV9BjIJxu60Izha7Ox2uTvFy9sHpv0gMirjctevqUH1WZr5xMvpTQ2B_HqHe0DnDtOPCTj9u9XUg2IX_Oj6JDduecjiBkUtSH4SLA71dR5dzh0YsOGI4WvWBHKUZPgdx6EiMPg72FRqoF3U50hSvPPNlwbzigU_pZefA=s72-w640-c-h378
Linux code EDU
https://linuxcodeedu.blogspot.com/2021/06/how-to-install-plex-media-server-on.html
https://linuxcodeedu.blogspot.com/
https://linuxcodeedu.blogspot.com/
https://linuxcodeedu.blogspot.com/2021/06/how-to-install-plex-media-server-on.html
true
6096992636254302192
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content