How to Install and Configure Plex Media Server on Ubuntu

Key Takeaways

  • Install Plex on Ubuntu by downloading the latest DEB package available on Plex’s website and running the sudo dpkg -i <package> command with your package file name in place.
  • To configure Plex, enter the address http://127.0.0.1:32400/web into your web browser and follow the prompts that appear.


If you always wanted to create your own personal streaming service, then Plex is the solution you’re looking for. So if you want to start using Plex on your Ubuntu system, then this guide is for you. We’ll walk through installing Plex, setting it up via the web client, and creating your media libraries.


What Is Plex?

Plex is an all-in-one streaming solution that brings your favorite movies, TV shows, and other media formats into one place. You can access and manage your multimedia libraries across multiple devices and platforms with Plex. And you can get started for free, no credit card required.

Some of the key features of Plex include:

  • Streaming to multiple types of devices such as TVs, smartphones, computers, tablets, and streaming devices.
  • Organizing your media into different categories for easy navigation.
  • Remotely accessing and streaming your media when you’re not at home.
  • Sharing your libraries with friends and family.

With that out of the way, let’s jump right into the installation process.

The first thing we do before installing Plex is update the system. So you’ll need to launch your terminal. After opening the terminal, enter the below command:

sudo apt update

Now press the “Enter” button. You should be prompted to enter your user password. Enter your password and press the “Authenticate” button.

Once the update is over, head over to the Plex downloads page. From the “Choose your platform” dropdown menu, select “Linux.” Then press the “Choose Distribution” button.

Official Plex website displaying different Plex Media Server packages for various systems and a button to choose your Linux distribution

From the list, select the version most suited for you. We’ll go with the 64-bit version. Download the provided DEB package.

A dropdown on the Plex download page displaying the availble packages for different Linux distributions

Once the download is over, navigate to the directory where you downloaded it. By default, it’s the ~/Downloads directory. Go to that directory with this command:

cd ~/Downloads

Linux terminal displaying how to use the cd command to navigate to the Downloads directory

Now you will install the package. Install Plex on Ubuntu simply by running the below command (Note that your command may differ depending on the version you downloaded.):

sudo dpkg -i plexmediaserver_1.32.6.7557-1cf77d501_amd64.deb

That should start installing the Plex media server on your device.

If the installation is done, you can check whether it was installed correctly. You can confirm that by seeing its status with this command:

sudo systemctl status plexmediaserver.service

Linux terminal displaying the current status of the Plex Media Server

The green “active” status indicates that it’s running properly. Press “q” to exit from the buffer.

If you see a white “inactive” text instead, you have to manually start the service with this command:

sudo systemctl start plexmediaserver.service

Right now, Plex is not enabled. That means if you shut down your computer, it will become inactive. By enabling it, it will become active every time you boot your device. Enable Plex using this command:

sudo systemctl enable plexmediaserver

Now that you’ve installed Plex on Ubuntu, let’s see how you can prepare your media files to use them on Plex.

Sometimes, you may notice that after configuring Plex on the web (which we’ll cover soon), you can’t find your media files. That’s because of not having the proper folder permission set up. So it’s best to do that prior to the configuration.

The first thing you should do is prepare your media files. Because you should have your media available on the device you’re setting up Plex on before we move on to configuring it. We’ll use those media to build our libraries.

Libraries are collections of your media content, grouped by type, such as movies, TV shows, music, and more. When you add a library to Plex, you’re telling the system where your content is located and how it should be categorized for easy access.

Plex suggests that you should follow a few best practices to name your media files and store them in the correct folders so that Plex can easily find them. Otherwise, it may fail to locate the content you’re searching for.

For example, you should store all your movies in a “Movies” folder, all the TV shows in a “TV Shows” folder, and so on.

Movies should be named in a [Movie_Name (Release_Year)] format. For TV shows, you should add the season and episode numbers in a format like this: [Show Name SxxEyy]. Another additional requirement for TV shows is that you should store them in a structured directory sequence like this: /TV Shows/Show Name/Season/episodes

Now let’s see how to configure the folder permissions. You can use the chown command to change the file and directory ownership. To change the ownership of a full directory, use the command in the below format:

sudo chown -R plex:plex /path/to/media/directory

However, there might be other directories in the parent directory that you don’t want to give access to. In that case, you can specify the individual directories in the command, like this:

sudo chown -R plex:plex /path/to/media/directory/photos

Linux terminal displaying the use of chown command to change Plex folder permissions

That should take care of finding the right media in the Plex media server.

Set Up Plex on Ubuntu via the Web UI

We will set up Plex using a web browser. So, fire up any browser of your choice. We’ll use Firefox. In the search bar, enter the following address:

http://127.0.0.1:32400/web

You should be welcomed by the following interface:

Plex web UI login interface using different methods such as Google, Facebook, Apple, and Email

Log in using one of your preferred methods. We’re going to use Google to log in. That’s because it’s faster since we already had Google credentials set up on the browser. You can choose any of the login methods that feel safest and most comfortable to you.

After logging in, you should see a “How Plex Works” page that summarizes its working process. Press the “Got it” button.

A Plex web UI webpage displaying how Plex works

You should see a popup about Plex Pass. It’s a subscription that allows some extra features. You can choose any of the given monthly plans. We’re going to skip it by pressing the cross button in the top right corner.

A Plex web UI webpage displaying the benefits of Plex Pass and the different monthly plans

In the next window, we will start setting up the server. The first tab is about the name of our server. Enter a name for your server so that you can easily identify it on your network. Then you have the option to enable remote access. If you want to access your media outside your home, tick the box. Else, remove the tick mark. When you’re done, press the “Next” button.

A tab on the Plex web configuration page displaying the name of your Plex media server

Then comes the media organization step.

In the “Media Library” tab, you can add your libraries and organize them into several types.

To do that, press the “Add Library” button. Then select the type of library you want to make.

A Plex web UI webpage displaying the types of library you can add to your server

After choosing a type, you can change the library name and language. Let’s set up a photo library. Press the “Next” button.

A Plex web UI webpage showing the different library types you can add with the Photo library currently selected

Next, you have to add a folder to your library. Press the “Browse For Media Folder” button. Now navigate through the directories to find the folder you’d like to add to your library. Then press the “Add” button.

A Plex web UI webpage showing the directories on your Ubuntu device with the available media

Then finally, press the “Add Library” button.

A Plex web UI webpage displaying the directories added for your library on the Plex server

If you want to create more libraries, follow the same steps. When finished, press the “Next” button.

A Plex web UI webpage shows that a photos library has been added to the Plex server

The last tab is the “Finish” tab which asks you to download the Plex app. Press the “Done” button.

A Plex web UI webpage showing that the Plex media server configuration has been complete

In the last window, you can customize your media by pinning different sources to the sidebar. By default, everything is selected. You can unselect any of the options if you want. Then press the “Finish Setup” button.

A Plex web UI webpage displaying the options you want to have on the sidebar navigation menu in your Plex dashboard

And that should bring you to your user dashboard where you can start watching your favorite media.

Plex dashboard on the web displaying the most popular media and other controls

Enable Repository Updating for Plex on Ubuntu

Since we installed Plex via a DEB package from the official website, we don’t have Plex’s official repository connected to our system’s repository list. So if there’s a new update available on that repository, we won’t receive that. To ensure you always have the latest Plex media server on your Ubuntu device, you should enable repository updating for Plex.

For that reason, we need to add its repository. First, add the Plex repository with this command:

echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

Next, download the GPG key and add it to your trusted keys with the following command:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -

To make the changes take effect, execute this last command:

sudo apt-get update

Now you can update Plex every time you update other packages on Ubuntu.

How to Remove Plex From Ubuntu

If you don’t want to use Plex on Ubuntu any longer then follow these steps to completely remove it.

First, stop the Plex media server with this command:

sudo systemctl stop plexmediaserver.service

Now remove Plex using the following command:

sudo dpkg -r plexmediaserver

Then delete the associated directory with this command:

sudo rm -r /var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/

Linux terminal displaying the systemctl command to stop the Plex Media Server

Lastly, you can delete the downloaded DEB file to save hard disk space.

Plexcellent Fun on Ubuntu

And that wraps up the guide on how you can install and configure Plex Media Server on Ubuntu. You can start enjoying your favorite multimedia from the comfort of your Ubuntu desktop. To make things even better, you can consider getting the Plex App or a Plex Pass to unlock some cool features.

Source

      Guidantech
      Logo
      Shopping cart