The Plex Media Server is a useful app for centralizing your media files, such as movies, music, TV shows, and photos, and sharing them with other users. The free version of the app provides basic functionality and should be enough for your regular streaming needs. But if you want extra features, you will need to subscribe to Plex Pass. Add Plex Media server repository. Yes, indeed you can directly visit the official website of Plex to. The Plex Media Server runs on a wide array of platforms that you might run on a stationary computer. The most obvious examples are Windows and Mac. Plex also supports Linux, FreeBSD, and even a. Plex Media Server isn’t just a great solution for organizing your movies and TV shows: it’s an all around personal media Swiss Army knife that includes solid support for storing and displaying your personal photos right alongside your other media.
I have been a user of Plex Media Server for the past 3 years and I haven’t looked back since. For those looking to get into hosting your own content at home, there is no better place to get started. Creating your own home media server is easy, fun, and a great learning exercise.
What You Need:
- . Internal or USB is fine.
If you are familiar with Plex, you can skip down below where we get started with the install. If you are new to home media servers, take a chance to see quickly why we are choosing Plex.
What is Plex?
Plex is not Netflix, but it’s pretty darn similar. Plex Media Server is a media organization and streaming server software you can install on any operating system. This incredibly easy to use software allows you to simply connect hard drives full of movies, tv shows, and music and then organize and display it in your web browser or from an app anywhere, including smart TVs. You can even share your content with as many people as you like, assuming your home server and bandwidth can handle it.
Why Plex?
There are a lot of alternative streaming servers out there you could choose besides Plex, you may even prefer them but I have found Plex to be the best overall, with the most features. You do need to spend $5 to access the Plex mobile app if you intend to watch from your phone or tablet (Unless you have Plex Pass), and Plex is not open-source.
Plex offers quite a bit out of the box completely for free and it continuously gets better over time, with many of the features that once required “Plex Pass” eventually making their way into the free version. I would make the argument that the premium version of Plex, Plex Pass, is generally not needed by the large majority of users.
But for the sake of argument and awareness, let’s take a quick look at Plex some modern alternatives you may want to consider.
Plex Alternatives:
1. Emby
The biggest competitor to Plex is also open source. Emby also has its own premium subscription that is on par price-wise as Plex. Though, some of the features such as access to podcasts or the ability to stream to a TV, are features that are free on Plex already.
2. Jellyfin
Being that Emby was one fully open source, some developers created a fork of Emby some time ago to include the premium features that were previously locked behind Emby’s premium service?♂️. Development is still active on this project and it offers features that the free versions of Emby and Plex do not offer, such as Live TV DVR. However, Jellyfin as well as Emby (which Jellyfin is based on) share a lot of common complaints with bugs in the app to plain sluggishness. Jellyfin is something I plan on testing soon however, and maybe you should too!
These are truly the only competition in existence. Some may try to honorable mention Kodi, but Kodi is not a media server. Kodi is a media center, just not a media server. Kodi works well to display local media but was not designed to allow you to watch that media anywhere. This might be ok for your living room couch, but you are going to go through the trouble anyway, why not get the ability to stream?
As mentioned in the title we are going to be using Docker as well as Docker compose on a Linux based server environment. This will allow us to run not only Plex, but most any software we want in an easily managed and scriptable environment. I will be using Ubuntu 18.04 as my base OS, you can use any OS you want although this tutorial will focus on Debian based OS.
1. Install the Operating System
Begin by installing your selected Linux OS to the machine. You can use a utility like Etcher to burn the ISO file to a flash drive as bootable media.
From there, once the Flash drive is loaded with Linux, load it into the server computer and boot while smashing the
F8
key. The BIOS interrupt is often F8
but may be different for your machine. Check the BIOS splash screen for on-screen directions to find the key you need to hit.Install your operating system to the correct drive. You should ideally have a separate storage device from your media content for the OS. In the video above we use a Solid State drive as our OS. You could even keep the OS on the flash drive if you have to, though this may affect performance.
2. Install Docker
For our Ubuntu installation for Docker Community Edition, we can follow the official Docker documentation for installing DockerCE. You can also follow along with our recording below, check it out you can actually copy and paste the commands from the video!
3. Install Docker-Compose
No video required, only a single line command is needed to install Docker-Compose.
And, just to be sure we have the proper executable permissions, we’ll explicitly set them.
5. How to mount your media drives
Where do you plan on keeping all those TV shows and movies? Not on the same drive as your operating system I hope?
We cover this well in our video above. To get started check for the drive you want to mount by using the
df
utility and the -h
human-readable flag.You can find your drive usually by the size given you don’t have two new similarly sized drives. You can see on the right if it is already mounted to a directory.
If not, you’ll need to create a directory and mount the drive to that directory.
1. Create a directory where you will access the data.
4. Write your Docker-Compose.yml file
We’ve already made a video and a blog post about the specifics of Docker-Compose if you are looking for an in-depth Docker-Compose tutorial.
However in this tutorial, we will only need the example already given to us by the docs for the Plex Docker image we are going to be using.
We will be using `linuxserver/plex` created by the fine people at linuxserver.io. The Docker image docs can be found on its DockerHub page here: https://hub.docker.com/r/linuxserver/plex/
Plex Docker-compose.yml:
Everything is good to go here as-is, except for the volumes (and possibly the PUID and PGID). The volumes you want to change the paths to the hard drives you have mounted.
The PUID and PGID settings allow you to change what user the container runs on under your system. The default is root. This might be an issue for some with more complex Docker setups but you should be fine here. If you run into issues you can find your user’s values by just running the
id
command as that user.Once finished, save this file to
docker-compose.yml
in a convenient location on your server.Start Plex!
You’re ready to rock with your own media server. It’s time to flip the switch. Run the following command in the same directory as your newly created
docker-compose.yml
file.This will start your Docker compose script as a detached daemon, meaning it will be safe for you to close the terminal when you are done and Plex will continue to run.
Once the Plex server is running you can continue the easy setup via the browser at:
Plex will bring you through a few simple walkthrough steps to sign you into your account on plex.tv and add your media libraries.
The setup wizard is fairly simple but you can follow Plex’s guide here for more pictures.
Now sit back and relax.
Once your Plex server is up and running you just need to fill up your drives with content. How you do that is up to you but however you do it, it’s probably illegal in one way or another.
Neither the Plex media server nor Ubuntu 20.04 LTS needs an introduction both are well-known software. Gamebox advance 2011. Yes, version of Ubuntu that is 20.04 focal fossa is new but its working not. Expressit by broderbund.
However, those don’t know about the Plex, it is free server software that one can install on various kind of operating systems such as Linux, Windows, FreeBSD, macOS including NAS OS and boxes. Whereas to stream media from its streaming server, it also provides client app with nice interface for Android, iOS, TV, Chrome, Roku and more…
Thus, here is the tutorial to know how to use both of them together to manage your media files for online streaming.
requirements
- Ubuntu 20.04 LTS installed Desktop or server
- A non-root user with
sudo
access to install packages - Internet connection
Steps to Install Plex Media Server on Ubuntu 20.04 LTS
Don’t know whether you are using the GUI desktop version or Server of Ubuntu 20.04 LTS thus, we will show the pure command-line way to install the Plex. Also, the tutorial and its steps are applicable to earlier Ubuntu OS versions such as 19.10/19.04/18.04/16.04… including Debian, Elementary OS, Deepin and Linux Mint as well.
Step 1. Add Plex Media server repository
Yes, indeed you can directly visit the official website of Plex to download its server packages for Linux. However, it would be hard for those are using the pure CLI server version. Yes, we can surf the website via command line but it will be cumbersome and messy, thus, it would be great if we first enable the Plex media repository on Ubuntu 20.04 and then download it purely with the command, to setup.
Here in the below command, we are adding the Debian repo of Plex TV in a separate file called plexmediserver.list under the sources.list.d. We haven’t added it in the main official repo list file of Ubuntu to make sure that it remains intact and would not get messy for future usage. Also, it will make us easy to remove the same in future.
Now, add public singing key for the same, this will ensure whatever the packages or updates we get will be from the official source and wouldn’t be altered.
Step 2: Update the System
Next thing is whatever we added above should be recognized by the system, thus to flush the cache and build again the repo list for the system, run an update command:
Step 3: Install Plex Media Server on Ubuntu 20.04 Focal fossa
Finally, everything we need is to get the packages of plex are at a place and its time to run a single command to install it.
The output for the above command:
Step 4: Check Plex Server status
We have successfully installed it, now its time check whether the Plex is up and running on our Ubuntu 20.04 server properly without any error.
In case, it yet hasn’t been started then run this command:
You will get something like shown below in the screenshot with Active status and green signal.
Step 5: Check ports opened for Plex on Ubuntu 20.04
The default port which Plex listen to after the installation is 32400, yet if you want you can see exactly what are the ports engaged with it. Run
netstat
command:The output will be like this:
In the above output or in the given screenshot you can see two ports are assigned to access the Plex media server on the Ubuntu 20.04, so of course, in the next step, we use one of them to access it.
Check ports used by Plex server
Step 6: Open Web management interface of the Plex server
We have two ports 32400 and 32401, you can use any of them to access the GUI web interface of Plex in our browser. Therefore, open your system browser or if you are using CLI server then use any other machine that has a browser installed, it could be windows, Android, Linux, macOS. And there in the URL bar, type your server IP address along with ports number 32400. If you don’t know your IP address then use the command
ifconfig
.For example, my IP address is 10.9.65.122, thus I enter it in the browser along with the port number and it will be like this
You can also use:
127.0.01:32400
Note 1: If you are using a server with firewall UFW enable then, you won’t be able to access Plex with any other computer available in the same network. Thus, you have to add or open the port 32400 in the Ubuntu 20.04 firewall. For that you can use the command:
Note 2: Second thing is if you want to access the Plex server setup page installed on remote Ubuntu 20.04 server, then it won’t be possible until and unless you access it locally but CLI server doesn’t have GUI browser. Therefore, we create an SSH tunnel from a GUI system (Windows, macOS, Linux, FreeBSD) to our server.
Here we are forwarding 8888 to server’s 32400, thus will be able to access remote server-ipaddress:32400 via localhost:8888 of the system you are using to access it. Open Command Prompt of Windows or Terminal on Linux/macOS and run the below command:
Replace Username and 10.9.65.122 address with your Plex server IP address and username.
After that, in the browser type:
http://127.0.0.1:8888
or http://127.0.0.1:8888/web/index.html#!/setup
Step 7: Sign up and set up Plex Web account
The first thing you will get once the Web interface gets opened is the Sign page. There are different ways available on the Plex page to log in Google account, Facebook, Apple and Email. Opt any of them and sign for Plex web. Once you did it, the setup will redirect you to Setup Web page of Plex server.
Sign-in Plex server
Step 8: Setup page of Plex Media Server
After successfully recognizing the installed server by Plex setup, it will give provide the initial setup wizard to add media files. So, on the first page, you can edit the server name (if you want) along with a default checked option “Allow me to access the media server outside my Home” this option let you stream media files via the internet. However, to successfully use, this, make sure you have forwarded the server IP in your router to access it from outside. If you are installing it on some hosting or cloud space then nothing needs to be forwarded.
Allow access me outside the home
The second page will let us add our media files. Click on Add Library button and then NEXT.
Select the type of library. I mean for adding music select that and in the same way for others.
Select your library type
Best Plex Media Server Build
Once you select any type of Library category, a page will come to browse the media files available on your server or storage devices such as NAS, Hard drive or USB drive accessible through your server.
In case your Plex server won’t be able to access external USB drives mount on the server, then follow this tutorial: {Will update soon}.
The mounted path can be seen on the screen to confirm its addition, click on the Add Library button.
Whatever category you have added, will show in this step, just move forward.
Library added successfully
If you want to get Plex apps for your different devices to stream the media files, go, you can get from here or directly through the official website.
Finally, our added music files can be seen on the Plex Dashboard, and the same you would be.
Plex Media Server Free
Dashboard Plex server on Ubuntu 20.04
Extra Tips
In case you have done something wrong in the initial setup you can simply remove the Preferences.xml file to again start the setup process. This will allow you to again claim your server.
Other Articles: