How to Install Plex Media Server on Ubuntu 20.04/18.04

Ubuntu is one of the most stable operating systems out there. So it should not be surprising that it is used by many different people in the world. Well, Ubuntu is also present on the servers and there you can take advantage of it even more. And since it is currently fashionable to play multimedia files, today in this post, we will install Plex Media Server on Ubuntu. This tutorial will work for both version 20.04 and 18.04

Plex Media Server

In a few words, Plex is open-source software that allows us to deploy a media center quickly. This media center will take care of organizing all your collection of movies, audio, photos, and play it on another device such as a Roku, TV, mobile, or PC through a network or the Internet.

If you have a server, then you can take advantage of even more of the benefits of Plex.

Installing Plex Media Server on Ubuntu 20.04 / 18.04

First, you have to visit the Plex website and choose the corresponding binary for Ubuntu. Once you do that, you can copy the direct link to the file to download it using wget.

Plex Website
Plex Website

At the time of writing this post, the latest available version of Plex is 1.19.5.

Also, if you use the -O option of the wget command, you can set a name for the downloaded file. This is useful because we can choose a simpler one instead of the complex one it has by default.

cd /tmp/
wget -c https://downloads.plex.tv/plex-media-server-new/1.19.5.3112-b23ab3896/debian/plexmediaserver_1.19.5.3112-b23ab3896_amd64.deb -O plex.deb
Downloading Plex Media Server on Ubuntu
Downloading Plex Media Server on Ubuntu

This will download a file called plex.deb which is the one we will have to install.

sudo dpkg -i plex.deb
Installing Plex Media Server on Ubuntu 20.04 / 18.04
Installing Plex Media Server on Ubuntu 20.04 / 18.04

Then Plex will be installed in Ubuntu. And it is possible to verify its operation by checking the status of the service.

sudo systemctl status plexmediaserver
Installing Plex Media Server on Ubuntu
Installing Plex Media Server on Ubuntu

As with MySQL or Apache, Plex can be stopped, started, and restarted using the systemctl command.

So as you can see, Plex is working correctly.

Optional: Enable the Plex repository

Although Plex is correctly installed, when you install the DEB package, you also set up the Plex repository. Enabling it has the advantage of being able to update Plex from APT along with the system. In any case, it is not mandatory to do so.

If you wish to do so, edit the file /etc/apt/sources.list.d/plexmediaserver.list and uncomment the third and last line.

sudo nano /etc/apt/sources.list.d/plexmediaserver.list
Enabling the Plex repository
Enabling the Plex repository

Save the changes and close the file. Then add the GPG key to the repository so the system can accept it.

wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -

Output:

OK

And that’s it, the repository is already added, when there is a new version, you just need to run

sudo apt update
sudo apt upgrade

And with this, you can update Plex without any problem.

Configuring Plex Media Server for the first use

Now we have to configure Plex. To do this, open your favorite web browser and go to http://localhost:32400/web. However, in case you are installing Plex on a server with Ubuntu, it is necessary to make an SSH tunnel. To do this, log out of your SSH session and write:

ssh [Server-IP] -L 8888:localhost:32400

In my case:

ssh 192.168.250.20 -L 8888:localhost:32400

You will be asked to log in and now yes, go to http://localhost:32400/web and you will see the following:

Plex Account
Plex Account

On this screen, you have to create a Plex account using Google, Facebook, or any other option.

When you create the account, you will see the following screen where it is quickly explained how Plex works.

How Plex works screen
How Plex works screen

Then, the installation will start as such. First, write a name for your new media center. And be sure to check the box Allow me to access my media outside my home and press the Next button.

Server setup
Server setup

Then, add a folder where your media files are by using the Add Library button and press the Next button.

Add library to Plex
Add library to Plex

So, you can then install some Plex Apps clients on your devices. When you are ready, you can click on the Done button.

Get the Plex App to improve Plex Media Server on Ubuntu
Get the Plex App to improve Plex Media Server on Ubuntu

On the next screen, you can choose which media files to follow. Then, click the Finish button.

Finishing the installation
Finishing the installation

When you’re done, you’ll be able to access your Media Server.

Now to access Plex again, you have to type in your web browser http://ip-address:32400/web

Plex Media Server on Ubuntu
Plex Media Server on Ubuntu

Congratulations, you have completed the tutorial.

Conclusion

Using Plex you can create a Media Center quickly and easily. It is open-source and compatible with our Ubuntu. As we have noticed, the installation is not difficult and is within reach of anyone.

For more information visit the Plex website.

Scroll to Top