How to Install Plex Media Server on Ubuntu 16.04 or 18.04

This post will guide you how to install Plex Media Server on your Ubuntu Linux 18.04 or 16.04. How do I setup the Plex Media Server with Plex repository or using .deb package on Ubuntu system.

install plex media server ubuntu12

What is Plex?


Plex is a streaming media server and you can use it to organize your video, music and photo collections and stream them to all of your devices like web browser, smart TV, at any time and from anywhere over the network. And it has two main components, one is Plex Media Server and another is Plex desktop application, and it can be run on Windows, MacOS or Linux system.

Plex is a client-server media player system and software suite comprising two main components. The Plex Media Server desktop application runs on Windows, macOS and Linux-compatibles including some types of NAS devices.

Plex Media Server supports a variety of different NAS devices for storing all types of media files.

Prerequisites


  • Before you get started with this post, and you need to have a non-root user with sudo privileges so that you can update or install packages under Ubuntu system.
  • Before you begin, you also need to update the package index and all installed packages to the latest version on your Ubuntu system with the following steps:
$ sudo apt update
$ sudo apt upgrade

Installing Plex Media Server with Deb Package


If you want to setup Plex Media Server on your Ubuntu system, you can directly go to Plex Server’s download page to download the latest version of Plex package for Ubuntu 16.04+ Linux distribution. Just using wget tool to get it, type:

$ wget https://downloads.plex.tv/plex-media-server-new/1.16.3.1402-22929c8a2/debian/plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb

Outputs:

devops@devops:~$ wget https://downloads.plex.tv/plex-media-server-new/1.16.3.1402-22929c8a2/debian/plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb
--2019-08-02 08:52:57-- https://downloads.plex.tv/plex-media-server-new/1.16.3.1402-22929c8a2/debian/plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb
Resolving downloads.plex.tv (downloads.plex.tv)... 104.18.157.41, 104.18.156.41, 2606:4700::6812:9c29, ...
Connecting to downloads.plex.tv (downloads.plex.tv)|104.18.157.41|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 79105318 (75M) [binary/octet-stream]
Saving to: ‘plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb’

plexmediaserver_1.16.3.1402-22929c8a2_am 100%[=================================================================================>] 75.44M 5.64MB/s in 14s

2019-08-02 08:53:12 (5.45 MB/s) - ‘plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb’ saved [79105318/79105318]

Once deb package of Plex Media server is downloaded on your local disk, you can install plex package with the following apt command or dpkg -I command:

$ sudo apt install plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb

Or

$ dpkg -i plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb

Installing Plex Media Server with Plex Repository


You can also install Plex Media Server package by using Plex’s official repository, and you just need to import the Plex repository’s GPG key and then add the Plex repository to your default APT repositories, then you can begin to install it.

#1 import the repository’s GPG key with the following curl command:

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

Outputs:

devops@devops:~$ curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3072 100 3072 0 0 2285 0 0:00:01 0:00:01 --:--:-- 2285[sudo] password for devops:

OK

#2 add the Plex repository to your system’s software repository list by running the following command:

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

#3 once the Plex repository is added, you still need to update the APT repositories with the following command:

$ sudo apt update

Outputs:

devops@devops:~$ sudo apt update
Hit:1 http://mirrors.aliyun.com/ubuntu bionic InRelease
Hit:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease
Hit:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease
Hit:4 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease
Hit:5 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease
Hit:6 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic InRelease
Ign:7 https://downloads.plex.tv/repo/deb public InRelease
Get:8 https://downloads.plex.tv/repo/deb public Release [5,815 B]
Hit:9 http://ppa.launchpad.net/flexiondotorg/minecraft/ubuntu bionic InRelease
Get:10 https://downloads.plex.tv/repo/deb public Release.gpg [821 B]
Get:12 https://downloads.plex.tv/repo/deb public/main amd64 Packages [864 B]
Ign:13 https://apache.bintray.com/couchdb-deb bionic InRelease

From the above outputs, you should see that the Plex repository has been added into the system repository.

#4 now you can install the latest version of the Plex Media Server with the following apt command:

$ sudo apt install plexmediaserver

Outputs:

devops@devops:~$ sudo apt install plexmediaserver
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
plexmediaserver
0 upgraded, 1 newly installed, 0 to remove and 112 not upgraded.
Need to get 79.1 MB of archives.
After this operation, 234 MB of additional disk space will be used.
Get:1 https://downloads.plex.tv/repo/deb public/main amd64 plexmediaserver amd64 1.16.3.1402-22929c8a2 [79.1 MB]
Fetched 79.1 MB in 14s (5,553 kB/s)
Selecting previously unselected package plexmediaserver.
(Reading database ... 179379 files and directories currently installed.)
Preparing to unpack .../plexmediaserver_1.16.3.1402-22929c8a2_amd64.deb ...
Unpacking plexmediaserver (1.16.3.1402-22929c8a2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Setting up plexmediaserver (1.16.3.1402-22929c8a2) ...

Configuration file '/etc/apt/sources.list.d/plexmediaserver.list'
==> File on system created by you or by a script.
==> File also in package provided by package maintainer.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** plexmediaserver.list (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/apt/sources.list.d/plexmediaserver.list ...
Created symlink /etc/systemd/system/multi-user.target.wants/plexmediaserver.service → /lib/systemd/system/plexmediaserver.service.
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
devops@devops:~$

Note: the installer will ask you if installing new version of config file for plex server, just type Y and press enter to continue.

After the Plex Media Package is installed on your Ubuntu system, and you check the status of Plex service with the following command:

$ systemctl status plexmediaserver

You should see the status information as shown below:

devops@devops:~$ systemctl status plexmediaserver
plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2019-08-02 09:05:53 EDT; 7min ago
Process: 14451 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_
Main PID: 14454 (sh)
Tasks: 128 (limit: 1129)
CGroup: /system.slice/plexmediaserver.service
├─14454 /bin/sh -c PLEX_MEDIA_SERVER_INFO_VENDOR="$(grep ^NAME= /etc/os-release | awk -F= "{print \$2}" | tr -d \" )" PLEX_MEDIA_SERVER_INFO_DEVICE="P
├─14464 /usr/lib/plexmediaserver/Plex Media Server
├─14517 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versions/2/Python/bo
├─14606 /usr/lib/plexmediaserver/Plex DLNA Server
├─14607 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shared 1.1
├─14660 Plex Plug-in [com.plexapp.agents.plexmusic] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versions/2
├─14772 Plex Plug-in [com.plexapp.agents.plexthememusic] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versi
├─14774 Plex Plug-in [com.plexapp.agents.thetvdb] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versions/2/P
├─14957 Plex Plug-in [com.plexapp.agents.opensubtitles] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versio
├─14995 Plex Plug-in [com.plexapp.agents.themoviedb] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versions/
└─15024 Plex Plug-in [com.plexapp.agents.imdb] /usr/lib/plexmediaserver/Resources/Plug-ins-22929c8a2/Framework.bundle/Contents/Resources/Versions/2/Pyth
Aug 02 09:05:53 devops systemd[1]: Starting Plex Media Server...
Aug 02 09:05:53 devops systemd[1]: Started Plex Media Server.

If you need to stop, start or restart Plex media server, can use the following commands:

$ sudo systemctl start plexmediaserver
$ sudo systemctl stop plexmediaserver
$ sudo systemctl enable plexmediaserver

Accessing Plex Media Server


After the Plexis installed and its server is running, you can open you web browser with the following URL to open its portal web page.

http://192.168.3.47:32400/web/index.html

then it will redirect to the below page:

install plex media server ubuntu1

install plex media server ubuntu2
If you want to use the Plex Media Server, you need to create an account with an email address or sign in with Google or Facebook account.

Once you sign up for the new account, and you will be redirected to the below page. And it will show you how plex works. Click on the Got IT button.

install plex media server ubuntu3

Click the close button if you do not want to subscribe for Plex Pass.

install plex media server ubuntu4

Then you need to type a friendly name to help identify it in Plex apps and on your network. Click on the NEXT button.

install plex media server ubuntu5

Click on the Add Library button to add a media library. Then select movies as your library type, click NEXT button.

install plex media server ubuntu6

install plex media server ubuntu7

Clicking BROWSE FOR MEDIA FOLDER button to add folders to your library. Click NEXT button.

install plex media server ubuntu8

You should see that the movies library has been added. Click NEXT button.

install plex media server ubuntu9

Click the DONE button to complete the Plex Media configuration.

install plex media server ubuntu10

install plex media server ubuntu11

Updating Plex Media Server


After installed the Plex Media Server with the Plex repository, and the repository entries for Plex is disabled. So if you want to update the plex media server package while a new version of Plex is released, you need to update the plexmediaserver.list configuration file, and uncomment the repo line with your vim text editor:

$ sudo vim /etc/apt/sources.list.d/plexmediaserver.list

And uncomments the below line:

#deb https://downloads.plex.tv/repo/deb/ public main

Save and close the file. When a new version of Plex Media server is released, and you can update it with the following apt command:

$ sudo apt update
$ sudo apt upgrade plexmediaserver

Conclusion


You should know that how to install the Plex Media Server on your Ubuntu or Debian Linux. If you want to see more detailed information about Plex, you can directly go to its official web site.

You might also like:

Sidebar



back to top