How to install Plex media server on Ubuntu 20.04?

Overview

Plex media server helps in managing movie, music, and photo libraries and stream content to your TV, computer, phone, tablet, or TV at any time and from any location. This tutorial outlines the installation process for Plex Media Server on Ubuntu 20.04.

Prerequisites

There are certain prerequisites that need to be met before you begin.

  • A server running Ubuntu 22.04

  • Non-root sudo user privileges

Get Started

Step 1 - Installation of Plex Media Server on Ubuntu 20.04

  • Import the GPG key for the Plex APT repository and add it to your system:

curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo deb https://downloads.plex.tv/repo/deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
  • Update the apt package list.

sudo apt update
  • Now, install the most recent server version of plex media server after the repository has been enabled:

sudo apt install plexmediaserver
  • Check the status of the service to ensure that the Plex is active:

sudo systemctl status plexmediaserver

Congratulations! You now have a Plex media server set up on your Ubuntu computer.

Step 2 - Firewall Modifications

  • Make sure the server firewall is set up to permit traffic on the Plex-specific ports after Plex has been installed and is active on your server.

sudo nano /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
  • Update the profiles list and save the file:

sudo ufw app update plexmediaserver
  • Implement the updated firewall guidelines:

sudo ufw allow plexmediaserver-all

Step 3 - Setting up Plex Media Server

  • For launching the Plex setup wizard, first construct the directories that will store the Plex media files:

sudo mkdir -p /opt/plexmedia/{movies,series}
  • The Plex Media Server runs as user plex, hence the user must be granted read and execute access to the media files. Enter the following command to set the privileges:

sudo chown -R plex: /opt/plexmedia
  • Now you may start configuring the server. Enter http://your_server_IP:32400/web in your browser to access the Plex media server web interface.

http://23.29.XXX.XX:32400/web

Conclusion

We have successfully demonstrated how to install Plex Media Server on Ubuntu 20.04.

Last updated