Choose a different version or distribution
Before we begin talking about how to install Plex on Ubuntu 22.04, let's briefly understand - What is Plex?
Plex is a versatile media server and streaming platform that brings all your favorite movies, TV shows, music, and photos together in one place. With Plex, you can organize your media collection, access it from any device with an internet connection, and enjoy a seamless streaming experience.
It supports a wide range of formats and allows you to customize your media library with beautiful posters and detailed metadata. Whether you're at home or on the go, Plex ensures your entertainment is always at your fingertips.
In this tutorial, you will install Plex on Ubuntu 22.04. We will also address a few FAQs on how to install Plex on Ubuntu 22.04.
Advantages of Plex
- Organize: Plex helps you efficiently manage your media library, ensuring easy access and a clutter-free experience.
- Stream Anywhere: Enjoy your favorite media on any device, whether you're at home or on the go.
- Personalize: Customize your library with artwork and metadata for a visually appealing and informative collection.
- Versatile Format Support: Plex supports a wide range of media formats, ensuring compatibility with your entire library.
- Seamless Streaming: Experience smooth playback and minimal buffering, delivering a high-quality streaming experience every time.
Install Plex Media Server on Ubuntu
Plex is proprietary software and is not available in the Ubuntu media repositories.
Plex installation is quite straightforward and doesn't require any technical know-how. It will hardly take 20 minutes to install and configure the media server. You will have to enable the Plex official repository and install the package with apt
.
Step 1 - Firstly, you need to enable the repository, update the apt package list and install the latest server version:
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
Step 2 - Now that the repository is enabled, you need to update the apt package list and install the latest server version:
sudo apt update
sudo apt install plexmediaserver
Step 3 - To check the service status, verify if Plex is running:
sudo systemctl status plexmediaserver
Output
● plexmediaserver.service - Plex Media Server
Loaded: loaded (/lib/systemd/system/plexmediaserver.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2021-11-26 13:36:33 UTC; 23min ago\
The plex media server is successfully installed on your Ubuntu machine.
Adjust the Firewall
Now, you will have to configure the firewall to allow traffic on the Plex-specific ports.
1) Create a UFW application profile if you are using UFW to manage your firewall:
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
2) Save the file and update the profile list:
sudo ufw app update plexmediaserver
3) Apply the new firewall rules:
sudo ufw allow plexmediaserver-all
4) Now, confirm if the new firewall rules are applied successfully:
sudo ufw status verbose
5) You will get an output like the below:
Output
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
1) Firstly, you need to create a directory that will store the media files of Plex:
sudo mkdir -p /opt/plexmedia/{movies,series}
2) Plex runs as the user plex
, it must have the read and execute permissions to the media files and directories. Enter the following command to set the correct ownership:
sudo chown -R plex: /opt/plexmedia
3) Now, type http://YOUR_SERVER_IP:32400/web
in your browser, it will redirect you to the Plex website. You can proceed with the server configurations.
4) Now, create an account on Plex to explore the features.
5) You can create a free account on Plex by pressing Google, Facebook, Apple, or the Email button. To access the premium features, purchase a Plex Pass plan.
6) After that, you will be redirected to the page with information about the working of Plex.
7) Click on Got it
button.
8) Now, enter the Plex server name, and don't uncheck the Allow me to access my media outside my home
and click Next
.
9) After that, add the media library by clicking on the Add Library
button.
10) Select movies as library type and click Next
.
11) Now, go to the folder which has movies and select the movies, press Add
the button, and then to Add Library
. You can add multiple libraries based on your choice.
12) After that, click Next
and then Done
, you will be redirected to the Plex web dashboard.
13) Now that the setup is complete, you can begin exploring the features of Plex.
Update Plex Media Server
1) Run the following command to update to the new version of Plex:
sudo apt update
sudo apt install --only-upgrade plexmediaserver
2) The official Plex repository can be disabled during the installation process. To enable it, open the plexmediaserver.list
and uncomment the line starting with deb
:
sudo nano /etc/apt/sources.list.d/plexmediaserver.list
FAQs to Install Plex on Ubuntu 22.04
Does Plex require any additional dependencies on Ubuntu 22.04?
Plex has some dependencies, but they are automatically installed during the installation process, so you don't need to worry about them.
Can I access my Plex server remotely after installation?
Yes, you can access your Plex server remotely by signing in to your Plex account and configuring remote access settings.
How do I update Plex on Ubuntu 22.04?
Plex can be easily updated on Ubuntu 22.04 by running the command sudo apt update
followed by sudo apt upgrade
in the terminal.
Where are the configuration files located for Plex on Ubuntu 22.04?
The configuration files for Plex are typically stored in the /var/lib/plexmediaserver
directory on Ubuntu 22.04.
Can I use Plex to stream media to my Smart TV?
Yes, Plex supports streaming media to a wide range of devices, including Smart TVs.
Is Plex free to use on Ubuntu 22.04?
Plex offers both free and premium subscription options. The basic features are free, but a premium subscription unlocks additional advanced features.
Conclusion
We hope this detailed tutorial helped you understand how to install Plex on Ubuntu 22.04. Check out the official Plex Quick-Start guide and Plex Documentation page for more details.
If you have any queries, please leave a comment below, and we’ll be happy to respond to them for sure.