Step 1: Update Your System
Before installing Plex, it’s important to update your package list and upgrade your existing packages to the latest versions. Open your terminal and run the following commands:
sudo apt update
sudo apt upgrade
Step 2: Install Plex Media Server
Download the latest version of the Plex Media Server package. You can find the latest .deb package on the Plex website. Alternatively, you can use the following command to download it directly:
wget https://downloads.plex.tv/plex-media-server-new/1.x.y.z/debian/plexmediaserver_1.x.y.z_amd64.deb
Replace 1.x.y.z
with the actual version number of the latest release.
Once the download is complete, install the package using:
sudo dpkg -i plexmediaserver_1.x.y.z_amd64.deb
Step 3: Start and Enable Plex Media Server
After installation, start the Plex Media Server service and enable it to start on boot:
sudo systemctl start plexmediaserver
sudo systemctl enable plexmediaserver
Step 4: Configure Plex Media Server
Open a web browser and navigate to http://localhost:32400/web to access the Plex web interface. If you are accessing the server remotely, replace localhost
with your server’s IP address.
Follow the on-screen instructions to complete the initial setup and sign in to your Plex account.
Step 5: Add Media Libraries
Once you have signed in, you can start adding media libraries. Click on the Add Library button, choose the type of media (Movies, TV Shows, Music, etc.), and specify the folder where your media files are stored.
Plex will scan the specified folders and organize your media library.
Step 6: Configure Firewall (Optional)
If you have a firewall enabled, you’ll need to allow Plex to communicate through it. Run the following commands to open the necessary ports:
sudo ufw allow 32400/tcp
sudo ufw reload
Step 7: Access Your Plex Server Remotely (Optional)
To access your Plex server remotely, you’ll need to configure port forwarding on your router. Forward port 32400
to the IP address of your Plex server. Refer to your router’s manual for specific instructions on how to set up port forwarding.
Conclusion
Congratulations! You have successfully set up a Plex Media Server on your Linux machine. You can now stream your media content to any device with the Plex app installed. Enjoy your media!