Install Plex Media Server on Ubuntu 16.04
Updated by Nick Brewer
Plex is a feature-rich media library platform that allows you to organize and stream your digital video and audio from virtually anywhere. This guide will show you how to set up the Plex Media Server on your Linode running Ubuntu 16.04 LTS, as well as how to connect to your media server from a Plex client application. A Plex media server could benefit from large amounts of disk space, so consider using our Block Storage service with this setup.
This guide is written for a non-root user. Commands that require elevated privileges are prefixed with
sudo. If you’re not familiar with the
sudocommand, see the Users and Groups guide.
Before you Begin
Familiarize yourself with our Getting Started guide and complete the steps for setting your Linode’s hostname and timezone.
Complete the sections of our Securing Your Server to create a standard user account with
Ensure that your system is up to date:
sudo apt-get update && sudo apt-get upgrade
Plex requires that you create an account to make use of the service, and provides additional features such as DVR capability and offline viewing if you pay for their premium Plex Pass offering. To complete this guide, you will need a Plex account.
Head to the Plex Downloads page and copy the installation link for Ubuntu. Use
wgetto download the installer via the copied link:
This example uses the current link for Ubuntu, at the time of writing. Be sure to use the up-to-date version supplied on the Plex website.
dpkgto install the Plex server:
sudo dpkg -i plexmediaserver*.deb
Enable Plex Media Server to start on reboot, and then start the server:
sudo systemctl enable plexmediaserver.service sudo systemctl start plexmediaserver.service
This section will show you how to complete your server setup and start adding media libraries.
Administration of the Plex server is performed via its web interface. Before you can connect to the web interface from your workstation, you will first need to create an SSH tunnel to your Linode. Substitute
sudouser on your Linode, and
192.0.2.1with the IP address of the Plex server:
ssh email@example.com -L 8888:localhost:32400
http://localhost:8888/webinto your browser to view the Plex web interface, as shown below. Input your Plex account username and password to proceed with the setup process:
Give your Plex server a name. Be sure to leave the Allow me to access my media outside my home box checked, and click Next:
Finally, you’ll create the directories that will store your Plex media. In this example we’ll create library directories for
plex-mediadirectory. These will be located within your user’s
cd ~/ mkdir -p plex-media/movies && mkdir plex-media/television
Add and Organize Media
Now that you’ve signed into Plex, you should see the following page. Click the Add Library button to start setting up your media libraries:
Select your library type, and click Next:
Navigate to the corresponding media directory that you created previously, then click Add:
You can add additional libraries by clicking the + symbol next to the Libraries list on the Plex side bar:
Add your media to the appropriate directories. Be sure to review Plex’s naming conventions for media files, to ensure that your files are identified correctly.
Disable DLNA (Recommended)
DLNA is a protocol that incorporates Universal Plug and Play (or UPnP) standards for digital media sharing across devices. If you do not wish to make use of it, it’s recommended that you disable this feature, as it is openly connectable on port
1900. From the Plex web interface, click the wrench icon in the upper right corner, select Server, and navigate to the DLNA section. Uncheck Enable the DLNA server, and click Save Changes:
Connect to your Plex Server
Now that your server is set up, you’re ready to connect to it from your Plex client application. Plex is supported by a number of different platforms, and you can find a full list of client applications here.
The examples provided here will use Plex Media Player for MacOS.
Download the appropriate media player application, or install it via your device’s application store.
Sign in to the Plex client application using the same Plex account as your server.
Your Plex client will have a drop down menu where you can select your server. Once it’s selected, you can navigate to the library with the content that you wish to view:
You may wish to consult the following resources for additional information on this topic. While these are provided in the hope that they will be useful, please note that we cannot vouch for the accuracy or timeliness of externally hosted materials.
This guide is published under a CC BY-ND 4.0 license.