How to Setup Plex Media Server on Ubuntu 18.04/20.04

Install Plex Media Server Ubuntu

Plex is a centralized media server that can store all your movies, shows, and other media in one place. As the media server contains all libraries, the server should be attached to storage (say NAS) or high capacity disks. Once you setup Plex server, then you can remotely stream those media libraries from any device (smart TV, web browser, XBox One, PlayStation, or Apple TV) whether from home or while you travel.

Plex media server application software is completely free and most client apps are free as well. Most feature of Plex can be enjoyed free of cost, have to upgrade to Plex Pass to have more features.

This article will guide you on how to install Plex media server on Ubuntu 18.04/20.04 LTS, as well as how to connect to plex media server using plex client.

Download and install Plex package on Ubuntu

Please check the newest version from plex download page.  Using Linux wget command you can download deb file to temp folder for installation.

# cd /tmp
# wget

Install package using dpkg command

# dpkg -i plexmediaserver_1.13.5.5291-6fa5e50a8_amd64.deb

How to update plex to the latest version

First, remove the currently installed version, type:

# dpkg -r plexmediaserver

Download the latest version of plex .deb file. Then install using dpkg:

# dpkg -i plexmediaserver_1.13.5.5291-6fa5e50a8_amd64.deb

Install Plex media server via Plex repository

This way show you how to add Plex repository that you can install via apt-get. So please ignore this if you have installed Plex by download and install Plex package

Add Plex GPG key  o the apt sources keyring and create a new file containing an entry to the Plex repository

# curl | sudo apt-key add -
# echo "deb public main" | tee /etc/apt/sources.list.d/plexmediaserver.list

Install Plex media server via repository

# apt-get install plexmediaserver

After installed, enable and start plex media service:

# systemctl enable plexmediaserver
# systemctl start plexmediaserver

Check and make sure Plex media server is running:

# systemctl status plexmediaserver

● plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2018-08-05 19:15:08 +07; 3h 26min ago
Process: 9960 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUP
Main PID: 9969 (sh)
Tasks: 55 (limit: 2321)
CGroup: /system.slice/plexmediaserver.service
├─ 9969 /bin/sh -c LD_LIBRARY_PATH=/usr/lib/plexmediaserver "/usr/lib/plexmediaserver/Plex Media Server"
├─ 9970 /usr/lib/plexmediaserver/Plex Media Server
├─10040 /usr/lib/plexmediaserver/Plex DLNA Server
├─10042 /usr/lib/plexmediaserver/Plex Tuner Service /usr/lib/plexmediaserver/Resources/Tuner/Private /usr/lib/plexmediaserver/Resources/Tuner/Shar
└─10697 Plex Plug-in [com.plexapp.system] /usr/lib/plexmediaserver/Resources/Plug-ins-6fa5e50a8/Framework.bundle/Contents/Resources/Versions/2/Pyt

Aug 05 19:15:08 163-44-121-231 systemd[1]: Starting Plex Media Server for Linux...
Aug 05 19:15:08 163-44-121-231 systemd[1]: Started Plex Media Server for Linux.

Configure Plex Media Server

After installed Plex and start service, we need an initial setting for Plex Media Server through web service

NOTE: Before cconfiguringPlex Server Media, please make sure you have a Plex account. You can register to follow this link and Plex Media Server IP address must be in same segment with your client when setting server, or it's can be localhost.

In this article, I use ssh tunneling with putty, like this:

After ssh tunneling connected, local PC will listen port 32400, all traffic to this port will forward to target server (Plex Media Server). Then you need access and interactive with Plex Media Server through localhost:32400

Login to Plex Media Server web page http://localhost:32400/web/ at the first time when you have not sign-in yet

You will be redirected to

Plex sign-in

Just 'Sign-in' then it automatically get you back to your Plex Media Server, like this:


Now, named the media server that we have installed, type the friendly name for your media server.

Keep checked "Allow me to access my media outside my home" if you want access from outside of server

Then click Next and Done, you have done your setup Plex Media server


Congratulations, Your Plex Server is ready, now you can add any media library to Plex Media server that you want and play it using a browser or Plex client.

How to see Plex version installed

To check Plex version that you already installed and running, login to your Plex server through web browser.

Go to Setting (left panel), choose Server Tab, you will see Plex version and update status


I hope you can now easily install and set up Plex media server to your system. You can easily browse all your media libraries right from the Plex control panel.

1 thought on “How to Setup Plex Media Server on Ubuntu 18.04/20.04”... add one

  1. I been using plex for 2 years and yesterday my plex account got removed, so i contact support and they told me they can not tell me that type of information when i asked why i got removed, so i created a new account and not even 1 day i got removed again, what is funny the new account had only myself on it sharing the plex server and on facebook i still get no help, in the terms it says you can share it with the whole family but also plex can remove your account at any time for any reason. I was just sharing my desktop that had plex with family members and plex still today will not give me a answer........ I switch to emby and it does work better with playback then plex i would give emby a try forget about plex


Leave a Comment