In this article, we are going to shows how to install Plex Media Server on Ubuntu 20.04 | 18.04. If you are interested to install Plex Media Server on your Ubuntu server then this post is ideal for you.
Plex Media Server is a streaming media service and a client–server media player platform that allows you to organize all your video, music and photo collections from your media collections and stream them to your mobile devices, TV and computer from anywhere.
It is based on the client-server model, so it has two main components:
For more details about Plex, please check its official page.
Simply follow below steps to install Plex Media Server on Ubuntu:
To install Plex, first update the default package index list in your system by running commands below:
sudo apt update
sudo apt upgrade
Plex is not available in the Ubuntu default repositories, so you will need to manually add its repository. To do that, run the commands below:
wget -q https://downloads.plex.tv/plex-keys/PlexSign.key -O - | sudo apt-key add -
sudo sh -c 'echo "deb https://downloads.plex.tv/repo/deb/ public main $(lsb_release -sc) contrib" >> /etc/apt/sources.list.d/plexmediaserver.list'
The commands above will add Plex APT repository and import the GPG key for the repository.
Next, run the commands below to install Plax Media Server:
sudo apt update
sudo apt install plexmediaserver
To verify the installation of Plex, run the command below:
sudo systemctl status plexmediaserver
You can use the commands below to stop, start and enable Plex media server:
sudo systemctl stop plexmediaserver
sudo systemctl start plexmediaserver
sudo systemctl enable plexmediaserer
If you are using UFW
to manage your firewall then you will need configure UFW firewall to allow traffic to Plex server. To do that, create a new UFW Plex media server profile by running the commands below :
sudo nano /etc/ufw/applications.d/plexmediaserver
After that, paste the below lines into the UFW Plex media server profile file:
[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 exit.
Next, run the commands below to update profiles list and apply the new firewall rules:
sudo ufw app update plexmediaserver
sudo ufw allow plexmediaserver-all
To check the new firewall rules are applied or not, run the command below:
sudo ufw status verbose
Output
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
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
Create the Plex catalog directory that will store its media files by running command below:
sudo mkdir -p /opt/plexmedia/{movies,series}
Now, set the correct permission for the Plex user named plex to access the directory:
sudo chown -R plex: /opt/plexmedia
At this point, Plex is installed and ready to use. To launch it, open your web browser and browse the below address:
http://YOUR_SERVER_IP:32400/web
The above link open its portal page similar to below:
Create an account to use plex media server. You can use Google, Facebook, Apple and Email authentication methods to create Plex account.
After create account, it will be redirected to you a new page that contains information about how Plex works:
Click on the GOT IT!
button and Continue with the setup wizard.
During the Plex setup, do not forget to check the box to Allow me to access my media outside my home
and on the browse for media folder, select the path of directory created in above steps: /opt/plexmedia/movies.
Run the commands below to update Plex Media Server:
sudo apt update
sudo apt install --only-upgrade plexmediaserver
If our article helps you, please consider buying us a coffee
Thank you for your support.
The post How to Install Plex Media Server on Ubuntu 20.04 | 18.04 appeared first on Linux Tutorial Hub.
Welcome to the Ubuntu Weekly Newsletter, Issue 866 for the week of November 10 –…
Debian and Ubuntu are two popular Linux distributions. In this deep dive we will guide…
In this article, we will see how to Install Google Cloud BigQuery Python client library…
Nov 15,2024 Wallpaper Contest for Xfce 4.20 open for voting The submission phase for the…
MicroCloud 2.1.0 LTS is now available, expanding the number of Canonical infrastructure solutions with a…
Canonical is thrilled to be joining forces with Dell Technologies at the upcoming Dell Technologies…