◆Smart Home Ideas Journal

Plex Media Server on Linux: A Comprehensive Guide

By

Embracing the world of home media servers? Plex is an exceptional choice, offering a sleek interface, remarkable features, and seamless cross-device compatibility. If you're a Linux user eager to set up your own Plex Media Server, you've come to the right place. This comprehensive guide will walk you through the installation, configuration, and optimization process. Let's dive in!

Before we proceed, ensure your Linux distribution is supported by Plex. At the time of writing, Ubuntu, CentOS, Fedora, and Arch Linux are prominently featured in Plex's official documentation. If you're unsure, a quick check on Plex's support page should provide clarity.

Installing Plex Media Server on Linux

Getting started is a breeze. We'll use the command line for this process, so fire up your terminal and let's roll!

How to Install Plex Media Server on Linux: A Tutorial for Newbie
How to Install Plex Media Server on Linux: A Tutorial for Newbie
Manually update your Plex Media Server on Freenas - Quick & Simple
Manually update your Plex Media Server on Freenas - Quick & Simple
How To Set-Up Plex PVR?
How To Set-Up Plex PVR?

First, download the Plex install script using the following command:

curl -xO https://downloads.plex.tv/plex-mediaserver-new/plexmediaserver.sh

7 Hidden Plex Settings You Should Be Using
7 Hidden Plex Settings You Should Be Using
The 8 Best Media Server Software Options for Linux
The 8 Best Media Server Software Options for Linux
a flat screen tv sitting on top of a white table next to a lamp and chair
a flat screen tv sitting on top of a white table next to a lamp and chair

Confirm the Download

Before proceeding, let's verify the download using `sha1sum` and `wget` to fetch the checksum file:

wget https://downloads.plex.tv/plex-mediaserver-new/plexmediaserver_sha1.txt

Now, compare the output of `sha1sum plexmediaserver.sh` with the contents of `plexmediaserver_sha1.txt`. If they match, you're good to go.

How to Change Plex Library Location
How to Change Plex Library Location
How to Set Up a Plex Server on MacOS - Make Tech Easier
How to Set Up a Plex Server on MacOS - Make Tech Easier
Mastering Plex Media: The 25+ Best Tips, Tricks, Tutorials, and Guides
Mastering Plex Media: The 25+ Best Tips, Tricks, Tutorials, and Guides
Starting a Plex Media Server - Everything you need to know
Starting a Plex Media Server - Everything you need to know
a book with the title plex a manual for your media, with style
a book with the title plex a manual for your media, with style
I Wish I'd Known These 5 Tips Before I Started Using Plex
I Wish I'd Known These 5 Tips Before I Started Using Plex

Install Plex Media Server

With the download confirmed, give the installation script execute permissions and run it:

chmod +x plexmediaserver.sh
sudo ./plexmediaserver.sh

The script will guide you through a series of prompts. Accept the default options, and you'll have Plex installed in no time. Once complete, you can manage Plex services using the standard Linux commands:

Plex Announces New Desktop App, Leaves HTPCs Behind
Plex Announces New Desktop App, Leaves HTPCs Behind
I ditched my Plex subscription for this self-hosted media server and never looked back
I ditched my Plex subscription for this self-hosted media server and never looked back
How to use Plex to create your own private Netflix or Spotify
How to use Plex to create your own private Netflix or Spotify
How To Build A 23TB Plex Server With Docker
How To Build A 23TB Plex Server With Docker
the plex app on an iphone with movies and other things to watch in it
the plex app on an iphone with movies and other things to watch in it
Monitor your Plex Server with the Tautulli Docker Container
Monitor your Plex Server with the Tautulli Docker Container
How-to: Setting up a Plex Environment - Engadget
How-to: Setting up a Plex Environment - Engadget
Tutorial: Mediencenter Plex auf Low-Cost-Hardware
Tutorial: Mediencenter Plex auf Low-Cost-Hardware
Plex Live TV & DVR: An Imperfect But Essential Tool for Cord Cutters
Plex Live TV & DVR: An Imperfect But Essential Tool for Cord Cutters
Guide to Building Your Own PLEX Media Server - Cheap and Easy
Guide to Building Your Own PLEX Media Server - Cheap and Easy
Running the Plex Media Server in a Docker Container
Running the Plex Media Server in a Docker Container
  • sudo systemctl start plexmediaserver to start the service
  • sudo systemctl stop plexmediaserver to stop the service
  • sudo systemctl status plexmediaserver to check the service status

Configuring Plex Media Server on Linux

With the installation out of the way, let's configure your Plex Media Server for optimal results. We'll focus on setting up your media folders and optimizing performance.

The primary Plex configuration file is found at /etc/default/plexmediaserver. Here, you can adjust the settings for the Plex user, plexmediaserver log, and Python virtual environment. Don't forget to restart the server to apply changes.

Setting Up Your Media Folders

Plex permits multiple libraries for organizing your content. To add a new library:

  1. Navigate to https://<your_server_ip>:33400/web in your browser
  2. Sign in using your Plex account credentials
  3. Click on ' Manage Library' and select the type of content (Movies, TV Shows, etc.)
  4. Follow the prompts to set up your library, choosing the appropriate media folders

Optimizing Performance

Plex recommends dedicating a disk with at least 50% free space for your media libraries to ensure optimal performance. Additionally, consider adjusting the Rewrite Disk Paths setting in your configuration file to streamline file permissions and improve snippetation.

Managing Plex Media Server Remotely

Accessing your Plex Media Server remotely is a breeze with Port Forwarding and Dynamic DNS. Here's a simplified walkthrough:

Port Forwarding:

  • Navigate to your router's configuration panel
  • Locate the Port Forwarding or Virtual Services section
  • Create a new rule forwarding port 32400 (TCP) and port 32401 (UDP) to your server's local IP

Dynamic DNS:

  • Sign up for a Dynamic DNS service like No-Ip, DuckDNS, or Dyn
  • Configure your router or use the service's web interface to update your hostname
  • Update your Plex client's connection settings with your new Dynamic DNS hostname

With these steps complete, you can access your Plex Media Server from anywhere in the world – streamlining entertainment for you and your friends.

Setting up a Plex Media Server on Linux isn't just about software installation; it's about creating a seamless, personalized entertainment hub for you and your loved ones. With these configurations in place, you're ready to unlock a world of media enjoyment. Happy streaming!