To start off, this guide is written for Ubuntu 14.04 LTS or later. So I’m assuming you’ve already got a server set up with a fresh installation of Ubuntu. If you’re not quite there yet, you’ll find plenty of guides across the internet.When you’re ready, go ahead and read on!
Let’s get logged in to your server via SSH as root. If you’re using a VPS, your provider should’ve emailed you a root password. If you’re using a physical server, you should already know your root password, so go ahead and open a terminal.
Step 1 – Create a Plex User Account
Create a password for the account (preferably different than your root password), and go ahead and leave the other options blank.
You’ll want to add the new plex user to the sudo group to avoid having to switch users constantly to install and update software and change files:
usermod -aG sudo plex
Now that your plex user is all set up, let’s switch over to that account:
Step 2 – Download/Install Plex
Next, we’ll download the latest PMS installer. In a regular browser, head to plex.tv and log in. Find the “Downloads” link on the menu and click on the “Download” button underneath Plex Media Server.Choose “Linux” from the drop-down menu, click the “Download” button, then right-click the Ubuntu 64-bit option, and copy the URL. Head back over to your terminal session, and let’s create a folder to place the PMS download files in:
cd ~ mkdir Downloads mkdir Downloads/PMS
Navigate to the PMS directory you created, and paste your link in the “wget” command like so:
cd Downloads/PMS wget <PMS download URL>
After the installer is downloaded, we’ll install it:
sudo dpkg -i plex*.deb
Sign Into PMS and Claim the Server
Now that Plex Media Server is installed, we need to sign in and claim the server. The first thing we need to do is open port 32400 in Ubuntu’s firewall so Plex can be accessed from outside your network. You can skip this if you don’t plan on sharing your server with friends/family or accessing your media away from home.
sudo ufw allow 32400
If you have a browser available on the same local network as the Plex server, open it and go to “<PMS IP>:32400/web” and sign into your server. If your server is on a remote network, you’ll have to open an SSH tunnel. If the other computer you’re using is a Mac/Linux, just use the following command:
ssh <PMS IP> -L 8888:localhost:32400
If you’re on a Windows computer, download Putty and open it. In the “Hostname” field, type the external IP address of your server:
Then expand the “SSH” node under “Connection” in the left pane, and click the “Tunneling” option. Enter your PMS external IP address with a port of 32400 in the “Destination” field, and “8888” in the “Source port” field, then click “Add”:
After everything is filled in, click “Open” and then enter “plex” as the username and then the password you created for the account. You can minimize this terminal window for the time being, then open a browser and type “localhost:8888/web” in the address bar. Hit enter and sign into your new PMS instance.
Enable Remote Access
Click on the settings icon in the top right corner of the web portal, and then click “Server” at the top of the settings window. In the list that appears on the left side, choose “Remote Access” and click “Enable Remote Access.” You should then see the following:
Step 3 – Add a Library
Click the “Add Library” button on the left menu pane of the Plex web portal, and then choose a library type and name:
Next, click the “Add folders” option and browse to the directory containing the media for that library. After that, I would highly suggest clicking “Advanced” and unchecking the “Enable video preview thumbnails” option. If enabled, this option will save thumbnails for every few seconds of every video in your library, which can cause your PMS data to reach sizes of 100GB and over in a few weeks depending on how many items there are in your libraries.
And that’s it! Plex will begin scanning your directories, adding media, and downloading metadata and trailers. You can now begin inviting friends to share your media, allowing them to stream your library items.
So now you’ve got yourself a fully-functional Plex Media Server. If you’d like to break the limits of your local storage and upgrade your PMS to an unlimited server with endless storage, check out the next guide in this series, Using Amazon Cloud Drive with Plex Media Server on Ubuntu… And Encrypting It! I’ll be adding more guides in the following days which will cover automating tasks like updating PMS, and others which will cover total automation of movie and TV show downloading using tools like CouchPotato and Sonarr. You can even set up Plex Requests to allow your family and friends to request movies and shows, and have them download automatically without any manual input. Keep an eye out for these upcoming guides! And as always, if you have any questions at all, you can leave a comment here or hit me up on Reddit. Feel free to move on to the next guide: