How to Install Plex Media Server on Ubuntu?

How to Install Plex Media Server on Ubuntu?

With its seamless ability to catalog, stream, and share an array of media content, Plex transcends the boundaries of conventional entertainment systems. For Ubuntu enthusiasts, harnessing the power of Plex on the robust Ubuntu operating system offers an exceptional gateway to transforming a personal device into a media powerhouse.

In this comprehensive guide, we embark on a journey through the intricacies of installing Plex Media Server on Ubuntu, unlocking a world where movies, music, photos, and more seamlessly integrate into a unified digital library.

As we delve into the installation process step by step, you’ll witness the fusion of open-source elegance and innovative media management, culminating in a harmonious symphony of technology and entertainment.

Whether you’re a cinephile, a music aficionado, or simply seeking a streamlined approach to enjoying your digital media, this guide equips you with the knowledge to embark on an exciting adventure – transforming your Ubuntu system into a personal media haven with Plex Media Server at its heart.

What Is Ubuntu?

Ubuntu finds its roots in Southern Africa, where it has been a part of the Bantu languages for centuries. Derived from the Nguni term “Ubuntu” or “botho”, it can be roughly translated as “humanity towards others” or “I am because we are” [1]. This encapsulates the fundamental notion that our individual well-being and identity are intertwined with the well-being and identity of others. Archbishop Desmond Tutu eloquently summed it up by saying, “My humanity is bound up in yours, for we can only be human together”.

What Is Ubuntu?

Ubuntu in African Philosophy

Ubuntu extends beyond linguistic origins and permeates African philosophical thought. It is a guiding principle that emphasizes communal harmony, compassion, and mutual support. In African societies, ubuntu shapes the way people interact, solve conflicts, and live in harmony with their surroundings. It’s not merely a set of guidelines; it’s a way of life that emphasizes the importance of relationships, community, and shared experiences.

Ubuntu in the Digital Age

While Ubuntu’s cultural significance remains steadfast, the concept has also found resonance in the world of technology. Ubuntu, the open-source operating system, embodies the essence of its namesake philosophy. Just as individuals in a community contribute their unique skills and perspectives for the collective benefit, open-source software thrives on collaboration, shared knowledge, and community-driven development. Ubuntu Linux, the embodiment of this philosophy, offers a platform that empowers users to take control of their digital lives while fostering a global community of contributors.

Key Tenets of Ubuntu:

  • Interconnectedness: At its core, ubuntu reminds us that we are all connected. Our actions have ripple effects that extend beyond ourselves, impacting the lives of those around us. This awareness encourages empathy and responsible decision-making;
  • Compassion: Ubuntu calls us to recognize the humanity in others and treat them with kindness and understanding. It challenges us to step into someone else’s shoes and see the world from their perspective;
  • Collective Well-Being: Just as a healthy ecosystem depends on the well-being of each species, ubuntu teaches us that our collective well-being is intricately linked to the well-being of each individual. Supporting and uplifting others contributes to the flourishing of society as a whole;
  • Shared Wisdom: In ubuntu’s embrace, knowledge is seen as a communal resource to be shared and nurtured. Just as elders pass down wisdom to younger generations, open-source communities pool their knowledge for the betterment of all [2];

Living Ubuntu Daily:

Incorporating Ubuntu into our lives can lead to a more harmonious and compassionate world. We can strive to practice Ubuntu by:

  • Cultivating Empathy: Actively listening to others, seeking to understand their perspectives, and responding with empathy can foster deeper connections;
  • Promoting Inclusivity: Embracing diversity and creating spaces where all voices are heard and valued fosters a sense of belonging and shared purpose;
  • Acts of Kindness: Engaging in acts of kindness, whether small or grand, reinforces the idea that we are interconnected and that our actions can make a positive impact;
  • Supporting Open Source: Contributing to open-source projects or using open-source software aligns with Ubuntu’s spirit of collaboration and shared knowledge;

In a world often marked by division and individualism, Ubuntu beckons us to pause and reflect on our interconnectedness. It reminds us that we are not isolated islands but threads woven into the rich tapestry of humanity.

Living Ubuntu Daily:

What Is A Plex Media Server?

Unveiling the Plex Media Server:

At its core, a Plex Media Server is a software application that centralizes and manages your media collection. It acts as a hub that organizes, streams, and shares your media content across various devices, both at home and remotely. With Plex, your personal movies, TV shows, music, photos, and even home videos are transformed into a beautifully organized digital library.

Key Features and Functionalities:

  • Media Organization: Plex automatically fetches metadata for your media, including cover art, descriptions, and ratings, turning your collection into a visually appealing library akin to a professional streaming service;
  • Cross-Platform Streaming: Plex supports a wide range of devices and platforms, from smartphones and tablets to smart TVs, streaming devices, and gaming consoles. This allows you to access your media from virtually anywhere, making it ideal for users on the go;
  • Remote Access: Beyond your local network, Plex enables remote access to your media. This means you can stream your content while traveling or share your library with friends and family, even if they’re in different parts of the world;
  • User Management: Plex allows you to create user profiles with customizable access levels. This is particularly handy for families or households, enabling each member to have their own media preferences and watch history;
  • Server-Side Processing: The Plex Media Server can transcode media files in real-time to ensure compatibility with various devices and network conditions. This ensures a smooth streaming experience, even if the original file format isn’t supported on a particular device;
  • Offline Syncing: With Plex Pass (a premium subscription service), you can sync media to your mobile devices for offline viewing. This is perfect for long flights or areas with limited connectivity
  • Live TV and DVR: Plex offers integration with digital TV tuners, enabling you to watch and record live TV content. This feature, coupled with the ability to skip commercials, adds a DVR-like experience to your media setup [3];

Setting Up a Plex Media Server

Getting started with Plex is relatively straightforward:

  • Install the Server: Download and install the Plex Media Server software on your preferred device (such as a computer or network-attached storage);
  • Add Media Libraries: Point Plex to your media folders. It will automatically scan and organize your content, fetching relevant metadata;
  • Install Plex Apps: Install the Plex app on your various devices, such as smartphones, tablets, smart TVs, or streaming devices;
  • Sign In and Enjoy: Sign in to your Plex account on each device, and voilà! Your media library is available for streaming and enjoying;

Setting Up a Plex Media Server

The Future of Media Consumption:

The Plex Media Server has revolutionized how we interact with our media collections. It bridges the gap between our ever-growing digital content and the devices we use to consume it. By providing a user-friendly interface, seamless remote access, and robust media organization, Plex has become an indispensable tool for those who value the flexibility and convenience of having their media at their fingertips.

As the world of media continues to evolve, the Plex Media Server remains a steadfast companion, ensuring that your cherished movies, TV shows, music, and memories are always within reach, no matter where life takes you.

Whether you’re a cinephile, a music enthusiast, or a photography aficionado, Plex transforms the way you engage with your media, making the journey of entertainment an even more enjoyable and personalized experience.

Installing Plex Media Server on Ubuntu:

Method 1: Install Plex on Ubuntu 22.04 by Adding the Plex Repository

This method involves adding the official Plex repository to your Ubuntu system. Doing so ensures you have access to the latest Plex updates and features. Here’s a step-by-step guide to get you up and running:

Step 1: Open a Terminal

To start, launch a terminal on your Ubuntu system. You can do this by pressing Ctrl + Alt + T simultaneously or by searching for “Terminal” in the applications menu.

Step 2: Add the Plex Repository

Enter the following commands one by one in the terminal:

echo deb public main | sudo tee /etc/apt/sources.list.d/plexmediaserver.list

Step 3: Import Plex’s GPG Key

Run the following command to import Plex’s GPG key:

curl | sudo apt-key add –

Step 4: Update and Install Plex

Update your package list and install Plex using the following commands:

sudo apt update
sudo apt install plexmediaserver

Installing Plex Media Server on Ubuntu:

Step 5: Start and Enable Plex

Start the Plex service and enable it to start on boot:

sudo systemctl start plexmediaserver
sudo systemctl enable plexmediaserver

Step 6: Access Plex Web Interface

Open a web browser and navigate to http://localhost:32400/web to access the Plex web interface. Follow the on-screen instructions to set up your Plex server, add media libraries, and enjoy your content [4].

Method 2: Install Plex on Ubuntu 22.04 Using Snap

Snap is a containerized software packaging format that makes software installation and management a breeze. Follow these steps to install Plex via Snap:

Step 1: Open a Terminal

Launch a terminal on your Ubuntu system.

Step 2: Install Plex via Snap

Enter the following command to install Plex using Snap:

sudo snap install plexmediaserver

Step 3: Configure Plex

After the installation is complete, Plex will automatically start. Open a web browser and go to http://localhost:32400/web to access the Plex web interface and proceed with the setup.

How To Install Plex Media Server on Ubuntu (22.04 LTS): Tutorial & Tips

Step 1: Update APT Cache

Before we begin, let’s ensure your package lists are up to date by updating the APT cache. Open your terminal and enter the following command:

sudo apt update

How To Install Plex Media Server on Ubuntu (22.04 LTS): Tutorial & Tips

Step 2: Add Plex Media Server Repository on Ubuntu 22.04

To install Plex on Ubuntu, we need to add the official Plex repository. This ensures that you have access to the latest Plex updates and features. Enter the following commands in your terminal:

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

Step 3: Command to Install Plex for Ubuntu 22.04 Server

With the Plex repository added, it’s time to install Plex. Execute the following command:

sudo apt install plexmediaserver

This command installs the Plex Media Server package on your Ubuntu system.

Step 4: Check Plex Service Status

After the installation, you can verify the status of the Plex service:

sudo systemctl status plexmediaserver

This command will show whether the service is active and running [5].

Step 5: Access Plex Media Settings Web Page

To configure Plex, open your web browser and go to http://localhost:32400/web. This is where you’ll access the Plex web interface and perform the initial setup.

Step 6: Register Media Server

Upon accessing the Plex web interface, you’ll be prompted to create a Plex account or log in if you already have one. Follow the on-screen instructions to register your media server.

Step 7: Plex Pass on Ubuntu 22.04

Plex Pass is a premium subscription service that unlocks additional features and benefits, such as offline access, early access to new features, and more. You can choose to subscribe to Plex Pass during the setup process or at any time later.

How To Install Plex Media Server on Ubuntu (22.04 LTS): Tutorial & Tips

Step 8: Server Setup

Once logged in, Plex will guide you through the server setup process. This includes naming your server, adding media libraries, and specifying the type of content you want to manage. Plex will automatically fetch metadata, cover art, and other details to create an organized and visually appealing library.

Step 9: Add Media Library

To add your media libraries, click on the “+ Add Library” option in the Plex interface. You can create separate libraries for movies, TV shows, music, photos, and other types of content. Point Plex to the appropriate folders where your media files are stored.

Step 10: Plex Media Web Client

With your media libraries set up, you can now start enjoying your content. The Plex web interface provides an intuitive and user-friendly experience, allowing you to browse and play your media on various devices connected to your Plex server.

Step 11: Nginx as Reverse Proxy for Plex Media Server

For enhanced security and customization, you can set up Nginx as a reverse proxy for your Plex Media Server. A reverse proxy acts as an intermediary between clients and servers, providing additional layers of control and flexibility.

Install Nginx:

sudo apt install nginx

Create a Plex Configuration File:

Create a new configuration file for Plex:

sudo nano /etc/nginx/sites-available/plex

Add the following configuration, adjusting the domain and ports as needed:

server {
listen 80;

location / {
proxy_pass http://localhost:32400;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

Enable the Configuration:

Create a symbolic link to enable the configuration:

sudo ln -s /etc/nginx/sites-available/plex /etc/nginx/sites-enabled/

Test and Reload Nginx:

Test the Nginx configuration and reload the service:

sudo nginx -t
sudo systemctl reload nginx

Now, you have Nginx acting as a reverse proxy for your Plex Media Server, providing an extra layer of security and control [6].

How To Install Plex Media Server on Ubuntu (22.04 LTS): Tutorial & Tips

Update Plex Media Server – Ubuntu 22.04

Step 1: Access Your Ubuntu System

Begin by accessing your Ubuntu 22.04 system. You can log in remotely via SSH or directly on the machine if you have physical access.

Step 2: Open a Terminal

Launch a terminal on your Ubuntu system. You can do this by pressing Ctrl + Alt + T simultaneously or by searching for “Terminal” in the applications menu.

Step 3: Update APT Cache

Before updating Plex, it’s a good practice to ensure that your package lists are up to date. Run the following command to update the APT cache:

sudo apt update

Step 4: Update Plex Media Server

To update Plex Media Server, execute the following commands:

sudo apt upgrade plexmediaserver

This command checks for updates specifically for the Plex package and upgrades it if a new version is available.

Step 5: Verify Plex Update

After the update process is complete, it’s a good idea to verify that Plex has been successfully updated. You can do this by checking the Plex Media Server’s status:

sudo systemctl status plexmediaserver

If Plex is active and running, you’ll see an indication of its status.

Step 6: Access Plex Web Interface

Open your web browser and navigate to http://localhost:32400/web to access the Plex web interface. This is where you can explore the updated features and functionalities that the new version has to offer.

Update Plex Media Server – Ubuntu 22.04

Step 7: Enjoy the Updates

With your Plex Media Server successfully updated, you’re now ready to explore and enjoy the latest enhancements. Whether it’s improved media organization, new playback options, or additional settings, staying up to date ensures you’re making the most of your Plex experience.

Tips for a Smooth Update:

  • Backup Your Configuration: Before performing any updates, it’s a good practice to create a backup of your Plex configuration and settings. This ensures that you can easily restore your setup in case of any issues during the update process;
  • Check Release Notes: Before updating, consider checking the release notes for the latest version of Plex. This can provide insights into new features, bug fixes, and any potential compatibility issues;
  • Update Regularly: Make it a habit to check for Plex updates periodically. Staying current not only ensures access to the latest features but also helps in maintaining the security and stability of your media server;
  • Consider Automating Updates: For added convenience, you might explore automating Plex updates using tools like cron jobs or other automation scripts. This way, you can ensure that your Plex Media Server is always running the latest version without manual intervention;

Uninstall or Remove Plex

Step 1: Access Your System

Begin by accessing the system where Plex is currently installed. Make sure you have administrative privileges or access to the root account.

Step 2: Open a Terminal

Launch a terminal on your system. You can do this by pressing Ctrl + Alt + T simultaneously or by searching for “Terminal” in the applications menu.

Step 3: Stop Plex Media Server

Before proceeding with the uninstallation, it’s important to stop the Plex Media Server service. Use the following command to stop the service:

sudo systemctl stop plexmediaserver

Step 4: Uninstall Plex Media Server

To uninstall Plex Media Server from your system, enter the following command:

sudo apt remove plexmediaserver

This command will remove the Plex Media Server package from your system [7].

Step 5: Remove Plex Configuration Files

Uninstalling the Plex package won’t remove its configuration files. If you want to completely remove Plex, including its configuration files, run the following command:

sudo apt purge plexmediaserver

Step 6: Clean Up Dependencies

After removing Plex, you can also clean up any unnecessary dependencies that were installed along with it. Run the following command to do so:

sudo apt autoremove

Step 7: Verify Removal

To verify that Plex has been successfully removed, you can check the status of the Plex Media Server service:

sudo systemctl status plexmediaserver

If Plex is not installed, you’ll see an indication that the service is not found.

Step 8: Optional – Delete Plex Data

If you want to delete the data associated with your Plex Media Server (such as media libraries, metadata, and settings), you can do so manually. Be cautious when performing this step, as it will permanently delete your Plex data.

The Plex data is typically stored in the ~/.plex directory. You can remove this directory using the following command:

rm -r ~/.plex


1. How to Launch Plex on Ubuntu 22.04:

  • Ensure that Plex Media Server is installed on your Ubuntu 22.04 system;
  • Open a web browser;
  • In the address bar, type http://localhost:32400/web;
  • Press Enter;
  • This will launch the Plex web interface, allowing you to access and manage your media content;

2. How to Remove Plex from Ubuntu 22.04?

  • Open a terminal;
  • Stop the Plex Media Server service with: sudo systemctl stop plexmediaserver;
  • Remove Plex with: sudo apt remove plexmediaserver;
  • Optionally, remove configuration files with: sudo apt purge plexmediaserver;
  • Clean up dependencies with: sudo apt autoremove [8];

3. How to Remove Plex from Ubuntu Using Snap:

Open a terminal.
Uninstall Plex via Snap: sudo snap remove plexmediaserver

4. Does Plex Server Work on Ubuntu?

Yes, Plex Media Server is compatible with Ubuntu and can be installed and used on Ubuntu systems.

5. Can You Use Ubuntu as a Server?

Yes, Ubuntu is commonly used as a server operating system due to its stability, security features, and robust package management.

6. Does Ubuntu Server Have a GUI?

By default, Ubuntu Server does not come with a graphical user interface (GUI) to conserve system resources. However, you can install a GUI if needed.

7. Where Is Plex Media Server Stored on Linux?

Plex Media Server binaries and related files are typically stored in the /usr/lib/plexmediaserver directory.

8. Where Is Plex Database on Ubuntu?

The Plex Media Server database on Ubuntu is usually located in the /var/lib/plexmediaserver/Library/Application Support/Plex Media Server directory.

9. How to Find Your Local IP for Plex:

  • Open a terminal;
  • Enter: ip a or ifconfig;
  • Look for the network interface you’re connected to (such as eth0 or wlan0);
  • Find the inet or inet addr value under that interface. This is your local IP address;

10. Where is the location of the Plex Media Server log?

The Plex Media Server log is typically located at /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs [9].

11. Is Plex a web server?

Plex functions as a media server rather than a traditional web server. It serves media content to various client devices using a web-based interface.

12. How to install Ubuntu 22.04 on the server:

  • Download the Ubuntu 22.04 ISO from the official website;
  • Create a bootable USB drive or burn the ISO to a DVD;
  • Boot the server from the USB drive or DVD;
  • Follow the on-screen instructions to install Ubuntu Server;

13. How to auto-install the Ubuntu server?

Ubuntu Server does not have an automatic installation feature. You need to follow the installation process manually.

14. How to connect to a server using the terminal of Ubuntu?

Use the ssh command to connect to a remote server: ssh username@server_ip

15. Should you install gui Ubuntu Server?

Whether to install a GUI on an Ubuntu Server depends on your use case. A GUI can be useful for management but may consume more resources.

16. Does Ubuntu 20.04 Server have a GUI?

No, Ubuntu 20.04 Server does not come with a GUI by default, but you can install one if needed.

17. How much RAM does the Ubuntu Server need?

The amount of RAM needed for an Ubuntu Server depends on the intended use. A minimal installation may require as little as 512MB, while more complex services could need several gigabytes.

18. Is Ubuntu Server better than Windows Server?

The choice between Ubuntu Server and Windows Server depends on factors like your familiarity, the specific services you need, and compatibility with your environment.

19. How to install DLNA in Ubuntu?

You can install DLNA support by setting up a DLNA server like MiniDLNA or Plex Media Server. Install using apt and configure as needed.

20. Is Ubuntu Server free for personal use?

Yes, Ubuntu Server is free for personal use and can be freely downloaded, installed, and used without licensing fees.

21. Is Ubuntu free to use?

Yes, Ubuntu is free to download, use, and distribute. It is released under an open-source license, which allows users to access, modify, and share the software without any licensing fees.

22. What are the different flavors of Ubuntu?

In addition to the standard Ubuntu Desktop and Server editions, there are various official Ubuntu flavors tailored for specific use cases. These include Kubuntu (with the KDE Plasma desktop), Xubuntu (with the Xfce desktop), Lubuntu (with the LXQt desktop), and more.

23. Can I run Ubuntu alongside my existing operating system?

Yes, Ubuntu supports dual-boot installations, allowing you to run Ubuntu alongside other operating systems like Windows. During installation, you can choose the option to install Ubuntu alongside your existing OS.

24. How do I install software on Ubuntu?

You can use the Ubuntu Software Center or the command-line package manager, APT, to install the software. The Software Center provides a graphical interface, while APT allows you to install packages using terminal commands.

25. Is Ubuntu secure?

Ubuntu is known for its security features and frequent updates. Its open-source nature allows for rapid vulnerability identification and patching. Additionally, Ubuntu offers security-focused editions such as Ubuntu Server and Ubuntu Core for IoT devices.

26. Can I customize the Ubuntu interface?

Yes, Ubuntu allows for customization of the desktop environment. You can change themes, and icons, and even switch to different desktop environments like GNOME, KDE Plasma, or Xfce to suit your preferences.

27. How do I update Ubuntu?

You can update Ubuntu using the Software Updater tool or the command line. To update packages and the system, run sudo apt update followed by sudo apt upgrade in the terminal.

28. What is the Long-Term Support (LTS) version of Ubuntu?

LTS versions of Ubuntu are released every two years and receive extended support, including security updates and bug fixes, for five years. They are ideal for stable and long-term deployments.

29. Can I run Ubuntu on older hardware?

Yes, Ubuntu offers lightweight flavors like Xubuntu and Lubuntu that are optimized for older or less powerful hardware. These flavors provide a smooth experience on systems with limited resources.

30. How do I get community support for Ubuntu?

Ubuntu has a thriving community of users and developers who provide assistance through forums, mailing lists, and community websites. The official Ubuntu Forums and Ask Ubuntu are popular platforms for seeking help.

31. Can I use Ubuntu for server purposes?

Ubuntu Server is a powerful and scalable option for various server applications, from web hosting and database management to cloud computing and virtualization.

Ubuntu’s user-friendly nature, extensive documentation, and diverse community make it a versatile and accessible operating system suitable for both beginners and experienced users.

Useful Video: Plex Media Server | Install on Ubuntu 22.04 LTS