There is a new version of this tutorial available for Ubuntu 20.04 (Focal Fossa).

How To Install Plex Media Server on Ubuntu 18.04 LTS

This tutorial exists for these OS versions

On this page

  1. Requirements
  2. Getting Started
  3. Install Plex Media Server
  4. Access Plex Media Server

Plex is a free and open source media server that can be used to store all your movies, shows, and other media in one place. Plex allows you to remotely stream those media libraries from any device like smart TV, web browser, Xbox One, PlayStation, and Apple TV. Plex supports various operating systems including, Windows, MacOS, Linux, FreeBSD and many more. Plex also provides a premium service called Plex Pass that offers various useful features like synchronization with mobile devices, cloud storage integration, metadata and matchings for music, support for multiple users, parental controls, live TV and DVR.

In this tutorial, we will learn how to install the Plex media server on Ubuntu 18.04 server.

Requirements

  • A server running Ubuntu 18.04.
  • A static IP address is set up on your server.
  • A root password is set up on your server.

Getting Started

First, you will need to update your system with the latest version. You can do it with the following command:

apt-get update -y
apt-get upgrade -y

Once your system is updated, restart the system to apply these changes.

Install Plex Media Server

By default, Plex is not available in the Ubuntu 18.04 default repository. So you will need to add the repository for that. You can add the Plex official repository with the following command:

apt-get install curl -y
curl https://downloads.plex.tv/plex-keys/PlexSign.key | apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | tee /etc/apt/sources.list.d/plex.list

Next, update the repository and install Plex media server with the following command:

apt-get update -y
apt-get install plexmediaserver -y

Once the installation has been completed successfully, you can check the status of Plex service with the following command:

systemctl status plexmediaserver

Output:

? plexmediaserver.service - Plex Media Server for Linux
   Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
   Active: active (running) since Fri 2019-02-15 08:10:17 UTC; 28s ago
  Process: 22668 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICAT
 Main PID: 22676 (sh)
    Tasks: 152 (limit: 1114)
   CGroup: /system.slice/plexmediaserver.service
           ??22676 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server"
           ??22677 /usr/lib/plexmediaserver/Plex Media Server
           ??22740 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/Versions
           ??22792 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tune
           ??22793 /usr/lib/plexmediaserver/Plex DLNA Server
           ??22802 Plex Plug-in [com.plexapp.agents.thetvdb] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resources/
           ??22967 Plex Plug-in [com.plexapp.agents.opensubtitles] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Reso
           ??22978 Plex Plug-in [com.plexapp.agents.plexthememusic] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Res
           ??23058 Plex Plug-in [com.plexapp.agents.plexmusic] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resource
           ??23082 Plex Plug-in [com.plexapp.agents.themoviedb] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resourc
           ??23084 Plex Plug-in [com.plexapp.agents.localmedia] /usr/lib/plexmediaserver/Resources/Plug-ins-cc260c476/Framework.bundle/Contents/Resourc

Feb 15 08:10:17 ubuntu1804 systemd[1]: Started Plex Media Server for Linux.
Feb 15 08:10:20 ubuntu1804 sh[22676]: Error in command line:the argument for option '--serverUuid' should follow immediately after the equal sign
Feb 15 08:10:20 ubuntu1804 sh[22676]: Crash Uploader options (all are required):
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --directory arg       Directory to scan for crash reports
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --serverUuid arg      UUID of the server that crashed
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --userId arg          User that owns this product
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --platform arg        Platform string
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --url arg             URL to upload to
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --help                show help message
Feb 15 08:10:20 ubuntu1804 sh[22676]:   --version arg         Version of the product

Next, you will need to create a directory structure for Plex. You can do this with the following command:

mkdir -p /opt/plexmedia/movies
mkdir /opt/plexmedia/series

Next, change the ownership of the plexmedia directory with the following command:

chown -R plex:plex /opt/plexmedia

Access Plex Media Server

Plex media server is now installed and listening on port 32400. Now, open your web browser and type the URL http://your-server-ip:32400/web. You will be redirected to the following page:

Plex Account Signup

Now, click on the Google, Facebook or Email button to create a free Plex account. After signing up, you will be redirected to the following page:

How Plex works

Now, click on the Got it button. You should see the following page:

Plex Server setup

Now, provide your server name and click on the Next button. You should see the following page:

Add Media Library to Plex

Now, click on the ADD LIBRARY button. You should see the following page:

Add Library

Now, select Films and click on the Next button. You should see the following page:

Enter the path to your media files

Now, provide the path of your movies folder and click on the ADD LIBRARY button. You should see the following page:

Media Library added successfully

Now, click on the Next button. You should see the following page:

Get Plex apps

Now, click on the DONE button to finish the setup. You will be redirected to the Plex dashboard in the following page:

Finish the setup

Share this page:

4 Comment(s)