Looking to set up a media server for your large collection of music, movies, pictures and TV shows? If so, you should consider Plex. It’s the most popular media server solution not just on Linux, but Windows, Mac and even Free BSD.
Plex is a great tool and has a ton of great features like downloading metadata, resuming playback from multiple devices, on-the-fly encoding and so much more. Here’s how to get it installed and running on Linux.
Downloading the server
Plex media server needs to be downloaded in package format. The server is available for Ubuntu, Fedora and CentOS officially on the Plex website (and others unofficially). This guide will cover setup on Ubuntu, but the instructions are similar for any Linux distribution.
Head over to this page here and download the package file (to your Downloads folder) that you’ll need for installation later.
Installing the server package
Once you have the package file downloaded, open a terminal window. Enter these commands to install the Plex Server file to the system (assuming that the downloaded file is in the “Downloads” folder).
When these commands have finished, Ubuntu will have added Plex Media server to your system.
Now that the package file has been installed to Ubuntu, it’s time to enable the server via systemd:
sudo systemctl enable plexmediaserver.service
After the service has been enabled, start the service with systemd.
sudo systemctl start plexmediaserver.service
Now that the software component is on the system, it’s time to configure the server. Add this address in your web browser: http://127.0.0.1:32400/web. It’s also possible to set up the server from another machine on the network. Just try http://ip.address.of.plex.server:32400/web instead.
There are a few things that need configured inside Plex. Before we get to any of that, though, you’ll need to create a Plex account. With an account, it’ll be easier for devices to discover the Plex server present on your network.
After your account has been created, sign in and click on the gear in the left hand bar to get to the settings area.
Give your server a friendly name. This name will be used as a way to better identify your server when trying to find it on your network. It’s not required but is probably a good idea.
In the Settings window on the sidebar, click the “Library” option. Check the “update my library automatically” and “run a partial scan when changes are detected” boxes. If you also have music on your Plex server, you may want to check the “include music library in automatic updates” box.
With these settings checked, the Plex server will sort through media much better.
Believe it or not, Plex has a preferred way to do things. You’ll need to go through all of your media and name the files in a way that the server software can recognize it.
Each media type has its own naming convention. Let’s start with TV shows: according to the Plex documentation, TV show media files should be named and organized like this.
Grey's Anatomy - s01e01.avi
Grey's Anatomy - s01e02 - The First Cut is the Deepest.avi
Grey's Anatomy - s01e03.mp4
Grey's Anatomy - s02e01.avi
Grey's Anatomy - s02e02.mkv
Grey's Anatomy - s02e03.m4v
Movies and music have a similar folder and naming conventions.
/Pink Floyd - Wish You Were Here
01 - Shine On You Crazy Diamond (Parts I-V).m4a
02 - Welcome to the Machine.mp3
03 - Have a Cigar.mp3
/Foo Fighters - One By One
/Foo Fighters - There is Nothing Left to Lose
/U2 - Joshua Tree
Sort all of your media in the conventions listed above, and your Plex media server will operate a lot more efficiently. Not to mention, organization is just a good thing to do.
Adding Media to Plex
Media can be added fairily easily. In the Web interface for your server, look to the sidebar for a + sign and click it. Once clicked, a screen will come up asking to verify which media will be added.
Click the option that corresponds with the content you’re adding and then the next button. After that, click the “Browse for media folder” button and point the server to where your media files reside.
When the media files are added to Plex, the server will detect them and go through the process of adding them. Be patient, as this may take a bit of time.
Plex can be used on a variety of platforms. In fact, it’s probably the most popular home-spun media solution out there. Since it is so popular, you can watch it on just about anything.
Officially, the Plex media server supports Android, iOS, Xbox, PlayStation, Chromecast, Amazon FireTV, Apple TV, Roku, Android TV and various types of smart TVs as well as the Web interface.
Despite the rise in streaming services like Netflix, Hulu, Amazon Prime and others, local media playback is still a thing. It is because of this fact that Plex exists. If you’re looking to take control of your large collection of local media, try out Plex. It’s a great choice.