Sep 6, 2023 5 min read

How to Install Plex on Ubuntu 20.04

Install Plex on Ubuntu 20.04 with our step-by-step tutorial. Plex is a media platform that organizes and streams movies, TV shows, and music.

Install Plex on Ubuntu 20.04
Install Plex on Ubuntu 20.04
Table of Contents

Choose a different version or distribution

Before we begin talking about how to install Plex on Ubuntu 20.04, let's briefly understand - What is Plex?

Plex is a versatile media platform that organizes and streams your favorite movies, TV shows, music, and photos. With Plex, you can access your personal media collection from anywhere and on various devices like smartphones, tablets, computers, and smart TVs.

It offers an intuitive interface and supports a wide range of file formats. Plex also provides additional features like automatic media organization, personalized recommendations, and the ability to share your media with friends and family.

In this tutorial, you will install Plex on Ubuntu 20.04.

Advantages of Plex

  1. Media Organization: Plex efficiently organizes your media collection, automatically fetching metadata, cover art, and subtitles.
  2. Remote Access: Enjoy your media library anywhere, accessing it remotely via the internet.
  3. Multi-Device Streaming: Stream your content on smartphones, tablets, computers, and smart TVs.
  4. Personalized Recommendations: Plex suggests new content based on your viewing habits, expanding your entertainment options.
  5. Sharing Options: Easily share your media with friends and family, allowing them to access and enjoy your collection.

Install Plex Media Server on Ubuntu

Plex is proprietary software and is not available in the Ubuntu media repositories.

Plex installation is quite straightforward and doesn't require any technical know-how. It will hardly take 20 minutes to install and configure the media server. You will have to enable the Plex official repository and install the package with apt.

1) Firstly, you need to enable the repository, update the apt package list and install the latest server version:

curl | sudo apt-key add -
echo deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

2) Now that the repository is enabled, you need to update the apt package list and install the latest server version:

sudo apt update
sudo apt install plexmediaserver

3) To check the service status, verify if Plex is running:

sudo systemctl status plexmediaserver

● plexmediaserver.service - Plex Media Server
    Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
    Active: active (running) since Fri 2021-11-26 13:36:33 UTC; 23min ago\

Plex media server is successfully installed on your Ubuntu machine.

Adjust the Firewall

Now, you will have to configure the firewall to allow traffic on the Plex-specific ports.

Skip this step if you don't have a firewall running on your system.

1) Create a UFW application profile if you are using UFW to manage your firewall:

sudo nano /etc/ufw/applications.d/plexmediaserver
title=Plex Media Server (Standard)
description=The Plex Media Server

title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)

title=Plex Media Server (Standard + DLNA)
description=The Plex Media Server (with additional DLNA capability)

2) Save the file and update the profile list:

sudo ufw app update plexmediaserver

3) Apply the new firewall rules:

sudo ufw allow plexmediaserver-all

4) Now, confirm if the new firewall runes are applied successfully:

sudo ufw status verbose

5) You will get an output like below:


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

Configure Plex Media Server

1) Firstly, you need to create a directory that will store the media files of Plex:

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

2) Plex runs as the user plex, it must have the read and execute permissions to the media files and directories. Enter the following command to set the correct ownership:

sudo chown -R plex: /opt/plexmedia

3) Now, type http://YOUR_SERVER_IP:32400/web in your browser, it will redirect you to the Plex website. You can proceed with the server configurations.

4) Now, create an account on Plex to explore the features.

5) You can create a free account on Plex by pressing Google, Facebook, Apple, or the Email button. To access the premium features, purchase a Plex Pass plan.

6) After that, you will be redirected to the page with information about the working of Plex.

7) Click on Got it button.

8) Now, enter the Plex server name and don't uncheck the Allow me to access my media outside my home and click Next.

9) After that, add the media library by clicking on the Add Library button.

10) Select movies as library type and click Next.

11) Now, go to the folder which has movies and select the movies, and press Add the button, and then to Add Library. You can add multiple libraries based on your choice.

12) After that, click Next and then Done, you will be redirected to the Plex web dashboard.

13) Now that the setup is complete, you can begin exploring the features of Plex.

Update Plex Media Server

1) Run the following command to update to the new version of Plex:

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

2) The official Plex repository can be disabled during the installation process. To enable it, open the plexmediaserver.list and uncomment the line starting with deb:

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

FAQs to Install Plex on Ubuntu 20.04

Can I access Plex from other devices on my network?

Yes, you can access Plex from other devices on your network. Simply open a web browser on the device and enter the IP address of your Ubuntu machine followed by ":32400/web" (e.g., Make sure both devices are connected to the same network.

How do I add media to Plex?

In the Plex web interface, click on the Add Library button, select the media type (e.g., Movies, TV Shows, Music, etc.), and specify the folder where your media is stored. Plex will scan and index your files automatically.

Can I stream media outside my home network with Plex on Ubuntu?

Yes, you can stream media outside your home network by setting up remote access in the Plex settings. This allows you to access your Plex server securely from anywhere using the Plex app or web interface.

Can I install Plex on a headless Ubuntu server?

Yes, you can install Plex on a headless Ubuntu server. After installation, you can manage Plex through its web interface using a browser on any device connected to the same network.

How do I uninstall Plex from Ubuntu 20.04?

To uninstall Plex from Ubuntu 20.04, run the command: sudo apt remove --purge plexmediaserver. This will remove the Plex package along with its configuration files.

Does Plex support subtitles?

Yes, Plex supports subtitles. It can automatically download subtitles for your media or you can add them manually by placing the subtitle file in the same folder as your media.

Can I use Plex Pass features on Ubuntu?

Yes, Plex Pass features are available on Ubuntu. Plex Pass provides additional benefits like mobile sync, hardware transcoding, live TV, and more. You can subscribe to Plex Pass on the Plex website and access these features on your Ubuntu installation.


We hope this detailed tutorial helped you understand how to install Plex on Ubuntu 20.04. Check out the official Plex Quick-Start guide and Plex Documentation page for more details.

If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.

Great! You’ve successfully signed up.
Welcome back! You've successfully signed in.
You've successfully subscribed to DevOps Tutorials - VegaStack.
Your link has expired.
Success! Check your email for magic link to sign-in.
Success! Your billing info has been updated.
Your billing was not updated.