Skip to content
Bots!
Bots!
  • About
    • Myself
    • আমার দোয়া
  • Bookmarks
    • Bookmarks
    • My OCI Bookmarks
    • Useful Proxmox Commands & Links
    • Learning Nano
    • Useful Sites
    • Useful Virtualbox Command
    • Useful MySQL Command
    • Useful Linux Command
    • BTT-CAS
  • Resources
    • Webinar on Cloud Adoption for Project Managers
  • Photos
  • Videos
  • Downloads
Bots!

Install Plex on Ubuntu 18.04

Rumi, August 14, 2019

Plex is a streaming media server that lets you organize your video, music, and photo collections and stream them to all of your devices at any time and from anywhere.

Although this tutorial is written for Ubuntu 18.04 Bionic Beaver the same steps can be used for Debian and Ubuntu 16.04 Xenial Xerus.

Prerequisites

You’ll need to be logged in as a user with sudo access to be able to install packages on your Ubuntu system.

Install Plex Media Server

The easiest way to install and manage Plex Media Server on Ubuntu 18.04 is by using the Plex official repository. It requires no technical knowledge and it should not take you more than 20 minutes to install and configure the media server.

Follow the steps below to install the Plex Media Server on your Ubuntu system:

Start by importing the repository’s GPG key using the following curl command:

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

Add the Plex APT repository to your system’s software repository list by issuing:

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

Once the Plex repository is enabled, update the apt package list and install the latest version of the Plex Media Server with:

sudo apt install apt-transport-httpssudo apt updatesudo apt install plexmediaserver

To verify that the Plex service is running type:

sudo systemctl status plexmediaserver

The output should look something like this:

plexmediaserver.service - Plex Media Server for Linux
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Mon 2018-06-25 10:42:28 PDT; 35min ago
Process: 2544 ExecStartPre=/bin/sh -c /usr/bin/test -d "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" || /bin/mkdir -p "${PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR}" (code=exited, status=0/SUCCESS)
Main PID: 2556 (sh)
Tasks: 56 (limit: 2321)
CGroup: /system.slice/plexmediaserver.service

Adjust the Firewall Rules

Now that you have Plex installed and running on your server you need to make sure your firewall is configured to allow traffic on Plex Media Server specific ports.

If you do not have firewall running on your system you can skip this section.

The following steps assume that you are using UFW to manage your firewall:

Open your text editor of choice and create the following UFW application profile:

/etc/ufw/applications.d/plexmediaserver
[plexmediaserver]
title=Plex Media Server (Standard)
description=The Plex Media Server
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp

[plexmediaserver-dlna]
title=Plex Media Server (DLNA)
description=The Plex Media Server (additional DLNA capability only)
ports=1900/udp|32469/tcp

[plexmediaserver-all]
title=Plex Media Server (Standard + DLNA)
description=The Plex Media Server (with additional DLNA capability)
ports=32400/tcp|3005/tcp|5353/udp|8324/tcp|32410:32414/udp|1900/udp|32469/tcp

Save the file and update profiles list:

sudo ufw app update plexmediaserver

Apply the new firewall rules by typing:

sudo ufw allow plexmediaserver-all

Finally check if the new firewall rules are applied successfully with:

sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip

To Action From
-- ------ ----
22/tcp ALLOW IN Anywhere
32400/tcp (plexmediaserver-all) ALLOW IN Anywhere
3005/tcp (plexmediaserver-all) ALLOW IN Anywhere
5353/udp (plexmediaserver-all) ALLOW IN Anywhere
8324/tcp (plexmediaserver-all) ALLOW IN Anywhere
32410:32414/udp (plexmediaserver-all) ALLOW IN Anywhere
1900/udp (plexmediaserver-all) ALLOW IN Anywhere
32469/tcp (plexmediaserver-all) ALLOW IN Anywhere

Configure Plex Media Server

Before starting the Plex setup wizard let’s create the directories that will store the Plex media files:

sudo mkdir -p /opt/plexmedia/{movies,series}

The Plex Media Server runs as the user plex which must have read and execute permissions to the media files and directories. To set the correct ownership run the following command.

sudo chown -R plex: /opt/plexmedia

You can choose any location to store the media files, just make sure you set the correct permissions.
Now we can proceed with the server configuration. Open your browser, type-

 http://YOUR_SERVER_IP:32400/web 

and you will be presented with the following screen:

In order to use the Plex Media Server, you will need to create an account.

Press the Google, Facebook or Email button to create a free Plex account. If you want to access premium features you can purchase a Plex Pass plan.

Once you sign up you will be redirected to the page with information about how Plex works as shown below:

Click on the Got it button.

On the next screen enter your Plex server name, leave the Allow me to access my media outside my home box checked, and click Next.

The next step is to add a media library. Click on the Add Library button.

When the popup window shows, select movies as library type and click Next.

In the next step click on the Browse for media folder and add the path to the directory that will contain the Movies media files, in our case /opt/plexmedia/movies.

Click on the Add button and then on the Add Library.

You can add as many Libraries as you want.

Click Next, then Done and you will be redirected to the Plex web dashboard.

Now that you have completed the setup wizard, you can start exploring Plex options and all the things it can do.

Updating Plex Media Server

When a new version is released you can update the Plex Media Server package through your desktop standard Software Update tool or by running the following commands in your terminal:

sudo apt update
sudo apt upgrade

Src: https://linuxize.com/post/how-to-install-plex-media-server-on-ubuntu-18-04/

Application Configurations (Linux) PlexUbunt 18.04

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Myself…

Hi, I am Hasan T. Emdad Rumi, an IT Project Manager & Consultant, Virtualization & Cloud Savvyfrom Dhaka, Bangladesh. I have prior experience in managing numerous local and international projects in the area of Telco VAS & NMC, National Data Center & PKI Naitonal Root and CA Infrastructure. Also engaged with several Offshore Software Development Team.

Worked with Orascom Telecom-Banglalink, Network Elites as VAS partner, BTRC, BTT (Turkey) , Mango Teleservices Limited and Access to Informaiton (A2I-UNDP)

Currently working at Oracle Corporation as Principal Technology Solution and Cloud Architect.

You can reach me [h.t.emdad at gmail.com] and I will be delighted to exchange my views.

Tags

Apache Bind Cacti CentOS CentOS 6 CentOS 7 Debain Debian Debian 10 Debian 11 Debian 12 DKIM Docker endian icinga iptables Jitsi LAMP Letsencrypt Linux Munin MySQL Nagios Nextcloud NFS nginx pfsense php Postfix powerdns Proxmox RDP squid SSH SSL Ubuntu Ubuntu 16 Ubuntu 18 Ubuntu 20 Varnish virtualbox vpn Webmin XCP-NG zimbra

Topics

Recent Posts

  • Install Jitsi on Ubuntu 22.04 / 22.10 April 30, 2025
  • Key Lessons in life April 26, 2025
  • Create Proxmox Backup Server (PBS) on Debian 12 April 19, 2025
  • Add Physical Drive in Proxmox VM Guest April 19, 2025
  • Mount a drive permanently with fstab in Linux April 16, 2025
  • Proxmox 1:1 NAT routing March 30, 2025
  • Installation steps of WSL – Windows Subsystem for Linux March 8, 2025
  • Enabling Nested Virtualization In Proxmox March 8, 2025
  • How to Modify/Change console/SSH login banner for Proxmox Virtual Environment (Proxmox VE / PVE) March 3, 2025
  • Install Proxmox Backup Server on Debian 12 February 12, 2025

Archives

Top Posts & Pages

  • Install Jitsi on Ubuntu 22.04 / 22.10
©2025 Bots! | WordPress Theme by SuperbThemes