Install Plex Media Server on Ubuntu from Terminal

In this guide, you will learn to Install and Configure Plex Media Server on Ubuntu from Terminal. As you may know, Plex software allows you to manage and access digital media. It has incredible features including muti-platform support, a user-friendly interface, secure sharing, remote access, etc. You can install it on most distributions such as the Ubuntu Linux system. Now you can follow the steps below to start your Plex Media Server installation on Ubuntu 22.04 LTS or older LTS release Ubuntu 20.04.

Guide Steps To Install Plex Media Server on Ubuntu from Terminal

Before you start your Plex installation from the terminal, you must have access to your server as a non-root user with sudo privileges and set up a basic firewall. For this purpose, you can check the following Ubuntu initial server setup guides:

Initial Server Setup with Ubuntu 22.04

Initial Server Setup with Ubuntu 20.04

Then, follow the steps below to complete this guide.

Step 1 – Add Plex Media Server Repository on Ubuntu

To start, you must run the system update and upgrade on Ubuntu with the following commands:

sudo apt update && sudo apt upgrade

Then, run the command below to install the required packages for Plex installation:

sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y

Next, use the following curl command to import the Plex media server GPG signing key:

curl | sudo apt-key add -

Now use the command below to add the Plex repository from the Ubuntu terminal:

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

Finally, run the system update with the command below:

sudo apt update

Step 2 – Command To Install Plex Media Server on Ubuntu

At this point, you can use the following command from the terminal to install your Plex:

sudo apt install plexmediaserver

Now you have completed your Plex installation. Proceed to the next step to verify it is up and running.

Step 3 – Check Plex Media Server Status on Ubuntu

By default, your Plex service must be activated during the installation. To verify this, you can use the command below:

sudo systemctl status plexmediaserver
● plexmediaserver.service - Plex Media Server
     Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vend>
     Active: active (running) since Sat 2023-10-28 08:14:20 UTC; 13s ago
    Process: 9293 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER>
   Main PID: 9295 (Plex Media Serv)
      Tasks: 113 (limit: 4575)
     Memory: 201.3M
        CPU: 15.732s
     CGroup: /system.slice/plexmediaserver.service

If your service is not activated, you can run the commands below:

# sudo systemctl start plexmediaserver
# sudo systemctl enable plexmediaserver

Step 4 – Configure UFW Rules For Plex Media Server

At this point, if you have a running UFW firewall, you must allow the Plex port through your firewall rules on Ubuntu. By default, Plex uses port 32400. To allow it through the firewall, run the command below:

sudo ufw allow 32400

Reload the firewall to apply the new rules:

sudo ufw reload

Step 5 – Configure Ubuntu SSH Access For Plex Media Server

If you are using SSH instead of the Ubuntu desktop, you must set up an SSH tunnel to access your Plex media server. To do this, install and enable SSH with the commands below:

# sudo apt install openssh-server -y
# sudo systemctl enable ssh

Then, use the command below with your Server’s IP address to enable the SSH access:

sudo ssh {server-ip-address} -L 8888:localhost:32400

Step 6 – Access Plex Media Server via Web Interface

At this point, you can access your Plex media server app via the web interface by typing:


If you are using SSH, you can use the following URL address:


At this point, you can log in to your Plex Media Server dashboard with an existing account or create a new one.

Plex Media server Account login screen Ubuntu

After you sign in to your account, you will see your dashboard and from there you can easily manage your digital media.

Plex account dashboard Ubuntu

Is Plex Media Server Free?

As you can see, you can install and use the Plex Media server for free. But it doesn’t have all the features. To access and use it completely, you can make it premium.

Where does Plex Media Server install on Ubuntu?

On the Ubuntu server, the Plex media server will be located at the following path:

/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/


At this point, you have learned to install and configure the Plex media server on Ubuntu from the command line terminal and access it from the web interface. Hope you enjoy using it.

Also, you may like the following guides:

Drupal CMS Installation with LAMP Stack on Debian / Ubuntu

Check Nginx Version Installed on Linux Terminal

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!