How To Install Plex Media Server on Linux Mint 22
Plex Media Server is a powerful tool for managing and streaming your personal media collection. With its user-friendly interface and robust features, it allows you to organize your movies, TV shows, music, and photos, making them accessible from various devices. This article provides a comprehensive guide on how to install Plex Media Server on Linux Mint 22, ensuring you have a seamless experience setting up your media server.
1. Prerequisites for Installation
Before diving into the installation process, it’s essential to ensure that your system meets the necessary prerequisites:
- System Requirements: Ensure your Linux Mint 22 system has at least 2 GB of RAM and sufficient storage space for your media files.
- Internet Connection: A stable internet connection is required for downloading the Plex package and updates.
- Basic Command Line Knowledge: Familiarity with terminal commands will be beneficial during the installation process.
2. Preparing Your System
2.1 Update Linux Mint
Start by updating your Linux Mint system to ensure all existing packages are up to date. Open the terminal and run the following command:
sudo apt update && sudo apt upgrade -y
2.2 Install Required Packages
Plex Media Server requires certain packages to function correctly. Install these dependencies by executing the following command:
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
This command installs essential tools that will help in managing repositories and secure communications.
3. Downloading Plex Media Server
3.1 Accessing the Official Plex Website
To download Plex Media Server, navigate to the official Plex website. Select the download section for Linux and choose the appropriate version for your system (typically Ubuntu).
3.2 Downloading the Installation Package
You can download the .deb
package directly via terminal using the following command:
wget https://downloads.plex.tv/plex-media-server-new/1.24.0.5085-7c9c5e9e8/debian/plexmediaserver_1.24.0.5085-7c9c5e9e8_amd64.deb
This command fetches the latest version of Plex Media Server for Debian-based systems, including Linux Mint.
4. Installing Plex Media Server
4.1 Using Terminal for Installation
Once the download is complete, you can install Plex Media Server using the following command:
sudo dpkg -i plexmediaserver_1.24.0.5085-7c9c5e9e8_amd64.deb
If you encounter any dependency issues during installation, resolve them using:
sudo apt --fix-broken install
4.2 Verifying Installation
After installation, check if Plex Media Server is running by executing:
systemctl status plexmediaserver
If it’s not active, start it with:
sudo systemctl start plexmediaserver
You may also want to enable it to start automatically on boot:
sudo systemctl enable plexmediaserver
5. Configuring Plex Media Server
5.1 Initial Setup via Web Interface
Plex Media Server does not have a graphical user interface (GUI); instead, it is managed through a web interface. Open a web browser and go to:
http://127.0.0.1:32400/web
The first time you access this page, you will be prompted to sign in or create a new account.
5.2 Setting Up Media Libraries
The setup wizard will guide you through configuring your server settings and adding media libraries:
- Name your server.
- Select whether to allow remote access.
- Add libraries by choosing their type (Movies, TV Shows, Music, etc.) and specifying their respective folders.
A well-organized folder structure is crucial for optimal performance; consider using directories like:
/Media/Movies
/Media/TV Shows
/Media/Music
/Media/Photos
6. Configuring Firewall and Network Settings
6.1 Configuring UFW Firewall for Plex
If you have UFW (Uncomplicated Firewall) enabled on your system, allow traffic on the default Plex port (32400) with these commands:
sudo ufw allow 32400/tcp
sudo ufw reload
6.2 Remote Access Configuration
Plex allows you to access your media server remotely. To enable this feature:
- Navigating back to the web interface under Settings > Remote Access.
- Select “Enable Remote Access”. If prompted, configure port forwarding on your router for port 32400.
- You can check if remote access is successful directly from this menu.
7. Managing Plex Media Server
7.1 Updating Plex Media Server
Keeps your server updated by periodically checking for updates using the following commands:
sudo apt update
sudo apt upgrade plexmediaserver -y
7.2 Troubleshooting Common Issues
If you encounter issues such as media not appearing or playback problems, consider these troubleshooting steps:
- Plex User Permissions: Ensure that the user running Plex has read permissions on your media directories.
- Plex Service Status: Verify that the service is active using
systemctl status plexmediaserver
. - Plex Logs: Check logs located at
/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/
. - If issues persist, consult the official Plex support forums for additional help.
8. Advanced Configuration Options
8.1 Setting Up a Reverse Proxy with Nginx (Optional)
If you want to enhance security or use a custom domain name for accessing your Plex server externally, consider setting up Nginx as a reverse proxy.
-
- Nginx Installation:
sudo apt install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
-
- Nginx Configuration:
Edit Nginx configuration file at /etc/nginx/sites-available/default
. Add a server block similar to this example:
server {
listen 80;
server_name plex.example.com; # Replace with your domain
location / {
proxy_pass http://127.0.0.1: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;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
-
- Troubleshooting Nginx Configuration:
# Test Nginx configuration
sudo nginx -t
# Reload Nginx if successful
sudo systemctl reload nginx
-
- Securitizing with SSL (Optional):
You can secure your connection using Let’s Encrypt SSL certificates by installing Certbot and configuring SSL certificates for Nginx.
Congratulations! You have successfully installed Plex. Thanks for using this tutorial for installing the latest version of Plex Media Server on the Linux Mint 22 system. For additional help or useful information, we recommend you check the official Plex website.