How To Install Plex Media Server on Ubuntu 24.04 LTS
In today’s digital landscape, managing and streaming media content has become an essential part of our daily lives. One of the leading solutions for media management is Plex Media Server, which allows users to organize, stream, and share their personal media libraries seamlessly. With its user-friendly interface and powerful features, Plex makes it easy to access your favorite movies, TV shows, music, and more from various devices. For those using Ubuntu 24.04, setting up Plex Media Server can be a straightforward process that enhances your home entertainment system significantly. This article will guide you through the steps of installing Plex Media Server on Ubuntu 24.04, ensuring a smooth setup experience. From prerequisites to detailed installation instructions and troubleshooting tips, this comprehensive guide covers everything you need to know to harness the power of Plex.
Prerequisites
Before diving into the installation process, it’s crucial to ensure that your system meets the necessary requirements and that you have the right tools at your disposal. This preparation will help streamline the installation and minimize potential issues.
System Requirements
To successfully install and run Plex Media Server on Ubuntu 24.04, your system should meet the following criteria:
- Ubuntu 24.04 LTS installed and up to date
- A stable internet connection for downloading packages and updates
- Sufficient storage space for your media files and the Plex application
- A user account with sudo privileges for administrative tasks
It’s worth noting that while Plex can run on modest hardware, the performance and number of simultaneous streams it can handle depending on your system’s specifications. For optimal performance, consider using a dedicated machine with a multi-core processor and ample RAM.
Tools Needed
To complete the installation, you’ll need:
- Terminal access: Ubuntu’s built-in terminal application will be your primary tool for executing commands
- Basic knowledge of Linux commands: Familiarity with common terminal commands will be helpful throughout the process
With these prerequisites in place, you’re ready to begin the installation process. Ubuntu 24.04 offers two primary methods for installing Plex Media Server: via Snap and via APT. We’ll explore both options to help you choose the most suitable method for your needs.
Method 1: Installing Plex via Snap
Snap is a universal package management system developed by Canonical, the company behind Ubuntu. It offers several advantages, including automatic updates and simplified dependency management. Installing Plex via Snap is often the quickest and easiest method for Ubuntu users.
Step 1: Open Terminal
To begin, open the terminal on your Ubuntu 24.04 system. You can do this by pressing Ctrl + Alt + T
on your keyboard or by searching for “Terminal” in the Applications menu.
Step 2: Install Plex
With the terminal open, enter the following command to install Plex Media Server using Snap:
sudo snap install plexmediaserver
This command uses sudo to run with administrative privileges, ensuring that Snap has the necessary permissions to install the package. The system will prompt you for your password; enter it to proceed.
The installation process will begin automatically, downloading and setting up Plex Media Server on your system. Snap will handle all dependencies, making this a hassle-free installation method.
Step 3: Configure Firewall
To ensure that Plex can communicate properly with your network and devices, you need to configure your firewall to allow traffic on the default Plex port. Execute the following command:
sudo ufw allow 32400
This command opens port 32400, which is the default port used by Plex for communication. If you’ve customized your Plex configuration to use a different port, replace 32400 with your chosen port number.
With these steps completed, Plex Media Server should now be installed and ready to use on your Ubuntu 24.04 system. The Snap installation method ensures that you’ll receive automatic updates, keeping your Plex server secure and up-to-date with the latest features.
Method 2: Installing Plex via APT
While Snap offers convenience, some users prefer the traditional APT (Advanced Package Tool) method for installing software on Ubuntu. This method gives you more control over the installation process and allows for manual updates.
Step 1: Update System
Before installing any new software, it’s crucial to ensure your system is up to date. Open your terminal and run the following commands:
sudo apt update && sudo apt upgrade -y
This command updates your package lists and upgrades all installed packages to their latest versions. The -y
flag automatically answers “yes” to any prompts during the upgrade process.
Step 2: Install Prerequisite Packages
Next, install the necessary tools for adding the Plex repository:
sudo apt install apt-transport-https curl
These packages ensure secure communication when downloading packages and provide tools for transferring data using various protocols.
Step 3: Add Plex Repository
To install Plex using APT, you need to add the official Plex repository to your system. Execute the following commands:
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
These commands add the Plex GPG key to your system and create a new source list file for the Plex repository.
Step 4: Install Plex
With the repository added, update your package lists again and install Plex Media Server:
sudo apt update
sudo apt install plexmediaserver
During the installation, you may be prompted to confirm the installation. Type ‘Y’ and press Enter to proceed.
Step 5: Start and Enable Plex Service
After installation, start the Plex Media Server service and enable it to run at system startup:
sudo systemctl start plexmediaserver
sudo systemctl enable plexmediaserver
These commands ensure that Plex starts immediately and will automatically launch whenever you reboot your system.
Accessing Plex Media Server
Now that Plex Media Server is installed on your Ubuntu 24.04 system, it’s time to access and configure it. Plex offers both local and remote access options, allowing you to manage your media library from anywhere.
Local Access
To access Plex locally, open your web browser and navigate to:
http://localhost:32400/web
This URL connects you to the Plex web interface running on your local machine. If you’re using the computer where Plex is installed, this method provides the quickest access to your server.
Remote Access
For remote access, you have several options:
1. Plex.tv: Sign in to your Plex account at https://app.plex.tv/ to access your server from anywhere with an internet connection.
2. Port Forwarding: Configure your router to forward port 32400 to your Plex server’s local IP address. This allows direct access to your server from outside your network.
3. SSH Tunneling: For a secure remote connection without port forwarding, use SSH tunneling:
ssh user@server-ip -L 8888:localhost:32400
Replace user
with your Ubuntu username and server-ip
with your server’s IP address. After establishing the SSH connection, access Plex by navigating to http://localhost:8888/web
in your browser.
Setting Up Plex Media Server
With Plex Media Server installed and accessible, it’s time to set up your media library and configure your server for optimal performance.
Account Setup
1. When you first access the Plex web interface, you’ll be prompted to create a Plex account or sign in to an existing one.
2. Follow the on-screen instructions to complete the account setup process.
3. Choose a friendly name for your server to easily identify it in your Plex ecosystem.
Library Configuration
1. Click on the “+” icon next to “Libraries” in the left sidebar to add a new media library.
2. Choose the type of content (Movies, TV Shows, Music, Photos, etc.) for the library.
3. Select the folders on your Ubuntu system where your media files are stored.
4. Customize library settings such as language preferences and metadata agents.
5. Repeat this process for each type of media you want to add to your Plex server.
Optimizing Your Plex Server
To ensure the best performance from your Plex Media Server on Ubuntu 24.04:
1. Organize your media: Follow Plex’s naming conventions for files and folders to improve metadata matching.
2. Adjust transcoding settings: If your server has limited resources, consider lowering the default transcoding quality to reduce CPU usage.
3. Schedule library updates: Set up automatic scanning of your media folders to keep your library up to date.
4. Enable hardware acceleration: If your Ubuntu system has a compatible GPU, enable hardware acceleration in Plex settings to offload transcoding tasks.
Troubleshooting and Maintenance
Even with a smooth installation, you may encounter issues or need to perform maintenance tasks on your Plex Media Server. Here are some common scenarios and their solutions:
Common Issues
1. Plex server not starting: Check the Plex service status using sudo systemctl status plexmediaserver
. If it’s not running, try restarting the service with sudo systemctl restart plexmediaserver
.
2. Media not appearing in libraries: Ensure your files follow Plex naming conventions and that Plex has read permissions for your media folders.
3. Remote access not working: Verify that port 32400 is open on your firewall and properly forwarded on your router. Check the Plex dashboard for any reported issues with remote access.
Updating Plex
Keeping your Plex Media Server updated is crucial for security and accessing new features. The update process depends on your installation method:
For Snap installations:
Snap packages update automatically. To manually check for updates, run:
sudo snap refresh plexmediaserver
For APT installations:
Update Plex along with your system packages:
sudo apt update
sudo apt upgrade
Backing Up Plex
Regularly backing up your Plex configuration ensures you can quickly recover in case of system issues:
1. Stop the Plex service: sudo systemctl stop plexmediaserver
2. Backup the Plex data directory: sudo cp -R /var/lib/plexmediaserver /path/to/backup/location
3. Restart Plex: sudo systemctl start plexmediaserver
Congratulations! You have successfully installed Plex. Thanks for using this tutorial for installing the Plex Media Server on Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Plex website.