Plex Media Server is a back-end application that you have running all the time at home on various platforms such as Windows, Mac OSX and Linux. The Plex Media Center is actually a fork of the open-source project, XBMC, but particularly the Plex Media Server is closed-code and actively developed by the Plex team. Plex is like mission control for your content. With our easy-to-install Plex Media Server software and Plex apps on the devices of your choosing, you can stream your video, music, and photo collections any time, anywhere, to whatever you want. Quick Start Video. 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. Plex Media Server is a digital media center and a media player that lets you access the videos, pictures, and music stored on one of your computers with any other computer, smartphone, or compatible device.
Neither the Plex media server nor Ubuntu 20.04 LTS needs an introduction both are well-known software. Yes, version of Ubuntu that is 20.04 focal fossa is new but its working not.
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
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
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
Plex Media Server Download
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.
Dashboard Plex server on Ubuntu 20.04
Plex Media Server Review
Extra Tips
Plex Media Server For Mac
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: