Are you looking for a guide to installing the Plex Media Server on your Ubuntu 22.04 or Ubuntu 20.04? So that you can easily access, manage, organize, and stream your media content.
Then, you are at the right place, this guide will provide two comprehensive methods to install Plex Media Server in your Ubuntu. It will also portray the process of configuring, accessing, and removing the Plex Media Server.
However, it would be better if I just briefly introduce Plex before proceeding with the installation journey.
What is Plex?
Plex is a robust and powerful streaming media server that enables users to access, organize and stream their media, such as photos, audio, movies, music, or TV show to Plex clients.
You can stream the media content within your home network or access it remotely, which is supported by all major devices and operating systems including Ubuntu.
Plex Media Server is free to download, install and use. However, the free version has limited features, you can buy “Plex Pass” worth “$4.99/month”, or opt for a yearly or lifetime subscription to enjoy advanced features like “scan your media”.
Install Plex in Ubuntu Using Deb Package
To begin the installation, go to Plex’s download page and select the Operating System as “Linux” and choose the distribution as “Ubuntu (16.04+) / Debian (8+) – Intel/AMD 64-bit”. The download process of its setup file (“.deb”)
will start automatically.
Now, open the terminal and go to the “Downloads” directory and execute the apt command to install the Plex Media Server using its “.deb”
file.
$ cd Downloads/ $ sudo apt install ./plexmediaserver_1.32.5.7328-2632c9d3a_amd64.deb
.deb
package you downloaded.Now that the Plex Media Server is installed, execute these systemctl commands to start, enable and check the status of the Plex server.
$ sudo systemctl start plexmediaserver $ sudo systemctl enable plexmediaserver $ sudo systemctl status plexmediaserver
Install Plex in Ubuntu Using Repository
In this method, we will install the Plex Media Server in our Ubuntu by utilizing Plex’s official repository. Firstly, let’s run this command to ensure that your system is up-to-date.
$ sudo apt update && sudo apt upgrade -y
After that, we will execute the following command to install all the required dependencies.
$ sudo apt install apt-transport-https curl -y
Now that all the dependencies are installed, download and add its GPG key to your system by using the curl command stated below.
$ curl https://downloads.plex.tv/plex-keys/PlexSign.key | gpg --dearmor | sudo tee /usr/share/keyrings/plexserver.gpg > /dev/null
The next step is to add the URL of the Plex Media Server’s repository to the system’s package sources by executing this command.
$ echo deb [arch=amd64 signed-by=/usr/share/keyrings/plexserver.gpg] https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
After making these changes, refresh the local package repository by running the “apt update” command.
$ sudo apt update
Finally, to install the Plex Media Server run the command stated below.
$ sudo apt install plexmediaserver -y
Once the Plex Media Server is installed, you can use the systemctl command to start, enable and verify the status of the Plex service.
$ sudo systemctl start plexmediaserver $ sudo systemctl enable plexmediaserver $ sudo systemctl status plexmediaserver
Your Plex Media Server’s service is active and running.
Configure Firewall for Plex in Ubuntu
Next, configure the firewall setting of your Ubuntu to allow Plex. For that purpose, execute the command provided below to allow the incoming traffic on port “32400”.
$ sudo ufw allow 32400
Now that the firewall rules have been updated, simply reload the firewall.
$ sudo ufw reload
After that, let’s access the Plex Media Server using any web browser.
Access and Setup Plex Media Server from Browser
Once the Plex server is installed and configured, open any web browser on your Ubuntu to access the Plex Media Server by entering below URL in the address bar:
http://localhost:32400/web
After the successful login, you will get a pictorial preview of how Plex Media Server works, press the “Got It!” button.
Next, type the name of your Plex server and see if you want to select the checkbox “Allow me to access my media outside my home”. Then, press the “Next” button.
Moving forward! You can add the desired media and proceed further.
The next step is to obtain the “plex.tv” app if necessary and then click the “Next” button.
Finally, press the “Finish setup” button.
Your Plex Media Server is ready for your use.
Enjoy using your Plex server to access, organize and share media!
Uninstall or Remove Plex Media Server from Ubuntu
To remove the Plex Media Server from your Ubuntu, open the terminal and stop its service by executing the command:
$ sudo systemctl stop plexmediaserver
After that, run the command stated below to remove Plex from the Ubuntu system:
$ sudo apt --purge remove plexmediaserver* -y
After removing the Plex server, you should also remove its repository from the package source by running the stated command.
$ sudo rm /etc/apt/sources.list.d/plexmediaserver.list
Conclusion
Plex Media Server aids users to share, access, and organize their media content effectively. This guide demonstrated different methods to install Plex Media Server in Ubuntu. It also provided the solution to set up and access the Plex server.