How to Deploy Plex Media Server with One-Click Apps

Updated , by Ben Bigger

Traducciones al Español
Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.
Try this guide to receive $100 at signup on a new account.

Plex One-Click App

Plex is a feature-rich streaming platform that allows you to organize and stream your own digital video and audio to your devices. This guide shows you how to deploy the Plex Media Server using Linode’s Plex One-Click App, upload media to your Plex Server, and connect to it from a Plex client application. Your Plex Media Server could benefit from large amounts of disk space, so consider using our Block Storage service with this app.

Why Use Plex Media Server

Owning a Plex Media Server enables you to maintain a personal media library in addition to accessing Plex’s own content, all available to stream to nearly any device. The ability to stream your own media is a unique advantage over other streaming services like Netflix, and comes only at the cost of your Linode services. Additional features, including local downloading, bandwidth limiting, and hardware transcoding are also available through the paid Plex Pass service.

Deploy a Plex One-Click App

Linode’s One-Click App Marketplace allow you to easily deploy software on a Linode using the Linode Cloud Manager. To access Linode’s One-Click App Marketplace:

  1. Log in to your Linode Cloud Manager account.

  2. From the Linode dashboard, click on the Marketplace button in the left-hand navigation menu.

  3. The Linode creation page will appear, with the One-Click and Marketplace tabs pre-selected.

  4. Under the Select App section, select the app you would like to deploy:

    Select a One-Click App to deploy

  5. Once you have selected the app, proceed to the app’s Options section and provide values for the required fields.

Plex One-Click App Options

The following configuration options create a secure Limited User to run your Plex Media Server.

Note
  • As a security measure, root login over SSH is disabled for this App. Use your Limited User credentials to access your Linode via SSH instead.
  • The Limited User configurations below are for your Linode’s Linux user, which is distinct from your Plex account user.
ConfigurationDescription
Limited User NameThe username for SSH access to your Linode. Required.

If the username root is specified, a limited user is not be created and extra security features are not configured. In this case, you can access your Plex Server and complete this guide as root using your Linode Options credentials.
Limited User PasswordThe user password for SSH access to your Linode. Required.
Limited User SSH KeyThe user public SSH key for SSH access to your Linode. Optional.

You can find instructions on generating an SSH key pair in our guide on Using Public Key Authentication with SSH. For an additional layer of security, you can require SSH key access by disabling password authentication.

Linode Options

The following configuration options are possible for your Linode server:

ConfigurationDescription
Select an ImageDebian 10 is currently the only image supported by the Plex One-Click App. Required.
RegionThe region where you would like your Linode to reside. In general, it’s best to choose a location that’s closest to you. For more information on choosing a data center, review the How to Choose a Data Center guide. You can also generate MTR reports for a deeper look at the network routes between you and each of our data centers. Required.
Linode PlanYour Linode’s hardware resources. Plex recommends 2GB of RAM to run Plex Media Server on its own, and more if you plan to run additional applications. If you decide that you need more or fewer hardware resources after you deploy your app, you can always resize your Linode to a different plan. Required.
Linode LabelThe name for your Linode, which must be unique between all of the Linodes on your account. This name is how you identify your server in the Cloud Manager’s Dashboard. Required.
Root PasswordThe primary administrative password for your Linode instance. This password must be provided when you access the root user. The password must meet complexity strength validation requirements for a strong password. Your root password can be used to perform any action on your server, so make it long, complex, and unique. Required.

When you have provided all required Linode Options, select on the Create button. Your Plex app will complete installation anywhere between 1-5 minutes after your Linode has finished provisioning.

Software Included

The Plex One-Click App installs the following required software on your Linode:

SoftwareDescription
Docker EngineDocker Engine is an open source containerization technology for building and containerizing your applications. This One-Click App deploys Plex Media Server as a Docker container.
Plex Media ServerThe Plex Media Server transmits locally-stored media files, enabling you to stream your personal media collection to any device that can support a Plex Client.
Note
Currently, Linode does not manage software and systems updates for One-Click Apps. It is up to the user to perform routine maintenance on software deployed in this fashion.

Getting Started After Deployment

After your Plex Server has been deployed, you can upload media and configure access to your Plex Server from Plex clients for your media devices.

Before you begin, ensure that you have signed up for a Plex account.

Initial Setup

Administration of your Plex Server is performed from its web interface. Before you can connect to the web interface from your workstation, you first need to create an SSH tunnel to your Linode.

Note

This guide occasionally directs you to substitute variables beginning with $ in certain commands.

An easy way to make these substitutions is to set the variables in your shell, then simply copy the commands as they are provided in this guide — your shell automatically substitutes the $ variables in those commands with the values you have set.

For example, you can set configure a substitution for $IP_ADDRESS like so:

IP_ADDRESS=192.0.2.0

Your shell then interprets $IP_ADDRESS as the value you have provided in following commands, for example:

echo $IP_ADDRESS
  192.0.2.0
  1. From your workstation terminal, enter the following the command, substituting $USERNAME with your Linux Limited User Name, and $IP_ADDRESS with the IP address of your Plex Server Linode:

    ssh [email protected]$IP_ADDRESS -L 8888:localhost:32400
    

    You now have an established SSH connection to your Plex Server Linode in your terminal, and can also access the Plex web interface from your workstation browser.

  2. Enter http://localhost:8888/web into your workstation browser to access the Plex Server setup web interface. Enter your Plex account username and password to proceed with the setup process.

    Plex Login Screen

  3. Give your Plex Server a name. Be sure to leave the Allow me to access my media outside my home box checked, and select NEXT.

    Plex Server Setup - Name

  4. Skip Media Library setup by selecting NEXT for now. You will Upload Media and Add Media Libraries in the sections below.

    Plex Server Setup - Skip Add Media Library

  5. Finish initial setup and reach the Plex home screen by selecting DONE.

    Plex Server Setup - Finish

  6. Click on the Settings icon in top-right corner of the Plex web interface.

    Plex Settings Icon

  7. On the left side bar, ensure that your new Plex Server is selected and select on Remote Access under the Settings section.

    Plex Server Remote Access Settings

  8. Click the check box next to Manually specify public port, keep the default value of 32400, and select RETRY or APPLY. You may need to select SHOW ADVANCED to see these settings.

    Enable Plex Server Remote Access

  9. Wait until you see a message stating that your Plex Server is Fully accessible outside your network.

    Plex Server Remote Access Successful

You can now access uploaded media and manage your Plex Server from any Plex Client, such as the Plex Web App. If you are unable to reach your Plex Server remotely, you can repeat the steps in this section to re-establish a direct connection for administrative purposes.

(Optional) Connect a Linode Block Storage Volume

If your media collection is larger than the space available from your Linode plan, Block Storage is a convenient solution. This section outlines the steps for creating and connecting a Block Storage Volume for use with your Plex Server.

Note
For future reference, you can find examples of the instructions provided in this section in Cloud Manager by navigating to Volumes, then selecting Show Configuration from the option menu for your Volume.
  1. Create a Block Storage Volume if you do not already have one prepared.

  2. Establish an SSH connection to your Plex Server Linode as your Limited User.

  3. On your Plex Server Linode, create a directory to your Volume’s mountpoint:

    mkdir ~/plex/media/linode-volume
    
  4. Mount your Volume path to the mountpoint you have created, substituting $FILE_SYSTEM_PATH with your Volume’s file system path (which is viewable from the Cloud Manager Volumes dashboard):

    sudo mount $FILE_SYSTEM_PATH ~/plex/media/linode-volume
    
  5. Check available disk space:

    df -BG
    
      Filesystem     1G-blocks  Used Available Use% Mounted on
    udev                  1G    0G        1G   0% /dev
    tmpfs                 1G    1G        1G  11% /run
    /dev/sda             49G    3G       45G   5% /
    tmpfs                 1G    0G        1G   0% /dev/shm
    tmpfs                 1G    0G        1G   0% /run/lock
    tmpfs                 1G    0G        1G   0% /sys/fs/cgroup
    tmpfs                 1G    0G        1G   0% /run/user/1000
    /dev/sdc             20G    1G       19G   1% /home/username/plex/media/linode-volume
    

    Notice that there is some overhead with the Volume due to the file system.

  6. To ensure that your Volume automatically mounts every time your Linode reboots, run the following command to modify your /etc/fstab file, substituting $FILE_SYSTEM_PATH with your Volume’s file system path (the $HOME environment variable should already be set as your user’s home directory):

    echo "$FILE_SYSTEM_PATH $HOME/plex/media/linode-volume ext4 defaults,noatime,nofail 0 2" | \
    sudo tee -a /etc/fstab
    
  7. Restart your Plex Server Docker container:

    docker restart plex
    

Media on your Volume is now accessible through the Plex web interface at the mounted directory on your Linode. Next, follow the instructions below on how to Upload Media to your Volume (use your Volume’s mountpoint instead of creating a new subdirectory), and Add Media Libraries to enable streaming media stored on your Volume.

Upload Media

Your Plex Server is set up to access media files in the ~/plex/media directory. You have many options for uploading or downloading media to your Plex Server. This section shows you how to organize and upload files to your Plex Server using the scp command.

Note
This section directs you to run commands either on your Plex Server Linode through an SSH connection as your Limited User, or from the workstation terminal where the media files you wish to upload are stored.
  1. On your Plex Server Linode, create a subdirectory within ~/plex/media to store your media files. Plex recommends organizing media by type, so pick a subdirectory name that matches the type of media you plan to upload. For example, to create a directory to store movie files, enter the following command:

    mkdir ~/plex/media/movies
    
  2. From your media workstation, use the scp command to move media to your Plex Server’s media subdirectory, substituting $USERNAME with your Linux Limited User Name, and $IP_ADDRESS with the IP address of your Plex Server Linode:

    scp example_video.mp4 [email protected]$IP_ADDRESS:~/plex/media/movies
    

    Depending on the file size(s), this may take a few minutes.

    Note
    There are other ways to upload files to your Plex Server Linode. See our section in Linux System Administration Basics for more information.

Add Media Libraries

  1. Log into a Plex Client, such as the Plex Web App, then select the MORE > link on the Plex side bar.

    Plex Home Side Bar — More

  2. Hover over your Plex Server’s name in the Plex side bar, then select the + icon.

    Add Media Library — Start

  3. Select your library type, set the name for your media library, select your language, then select the NEXT button.

    Set Media Library Type, Name, and Language

  4. Click BROWSE FOR MEDIA FOLDER, navigate to the directory within /media where your files are stored, then select the ADD button.

    Select Media Library Directory

  5. Once you are satisfied with your selection, select the ADD LIBRARY button.

    Add Media Library — Finish

  6. Pin your new media library to make it accessible from the Plex home screen.

    Pin Media Library

  7. Repeat the steps in this section to add additional media folders.

You now have all the tools you need to create an online media library and stream it to any device with Plex.

This page was originally published on


Your Feedback Is Important

Let us know if this guide helped you find the answer you were looking for.