Install Plex Media Server on Ubuntu 18.04
Updated by Linode Written by Nick Brewer
Dedicated CPU instances are available!Linode's Dedicated CPU instances are ideal for CPU-intensive workloads like those discussed in this guide. To learn more about Dedicated CPU, read our blog post. To upgrade an existing Linode to a Dedicated CPU instance, review the Resizing a Linode guide.
Plex is a feature-rich media library platform that allows you to organize and stream your digital video and audio from anywhere. This guide will show you how to set up the Plex Media Server on your Linode running Ubuntu 18.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.
NoteThis guide is written for a non-root user. Commands that require elevated privileges are prefixed withsudo
. If you’re not familiar with thesudo
command, 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
sudo
privileges.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.
Install Plex
Head to the Plex Downloads page and copy the installation link for Ubuntu. Use
wget
to download the installer via the copied link:wget https://downloads.plex.tv/plex-media-server/1.14.1.5488-cc260c476/plexmediaserver_1.14.1.5488-cc260c476_amd64.deb
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.
Use
dpkg
to 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
Configure Plex
This section will show you how to complete your server setup and start adding media libraries.
Initial Setup
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
user
with thesudo
user on your Linode, and192.0.2.1
with the IP address of the Plex server. Perform this step on your workstation:ssh user@192.0.2.1 -L 8888:localhost:32400
Enter
http://localhost:8888/web
into 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. This step is performed on your Linode. In this example we’ll create library directories for
movies
andtelevision
within aplex-media
directory. These will be located within your user’s/home
: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, (
/home/username/plex-media/movies
) 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:
More Information
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.
Join our Community
Find answers, ask questions, and help others.
This guide is published under a CC BY-ND 4.0 license.