How to install a Plex Media Server

With Plex, you can organize and stream your video and audio files from anywhere in the world. This guide will show you how to deploy your own Plex Media Server running on an Ubuntu instance located on the Fuga Cloud.

Prerequisites

For this tutorial you’ll need the following:

  1. A Fuga Cloud account
  2. An instance already running Ubuntu 16.04 where an ssh connection is possible.
  3. Ensure that your Ubuntu instance is up to date: sudo apt-get update && sudo apt-get upgrade
  4. Plex requires an account in order to make use of the service. Click here to create a Plex account.

In case you don’t have a running instance on Fuga Cloud yet, please follow and complete our Getting Started series.

Step 1 - Installing Plex

  1. Open the terminal and make an ssh connection with the Ubuntu instance.

  2. Copy the Ubuntu installation link from the Plex download page. Use the wget command to download the .deb file:

    wget <link to the .deb here>

    Example:

    wget https://downloads.plex.tv/plex-media-server/1.12.0.4829-6de959918/plexmediaserver_1.12.0.4829-6de959918_amd64.deb
  3. Install the .deb file you just downloaded with the following command (please make sure you choose the .deb file with the correct version number):

    sudo dpkg -i plexmediaserver_1.12.0.4829-6de959918_amd64.deb
  4. If the system asks

    File also in package provided by package maintainer. What would you like to do about it?

    type Y and press enter.

  5. Create the directories that will store your media. In this example we’ll create the directories “series” and “movies”:

    mkdir media && cd media && mkdir movies && mkdir series

Step 2 - Configuring Plex

In order to perform administration of your Plex server, access to the web interface is required. To get access to the web interface, open a new terminal and run the following command:

OS X or Linux

If you’re using an imported key pair:

ssh -i .ssh/id_rsa  ubuntu@FLOATING_IP -L 8888:localhost:32400

If you’re using a generated key pair:

ssh -i KEYPAIR.pem  ubuntu@FLOATING_IP -L 8888:localhost:32400

Windows

Use the following information for setting up the Putty/SSH connection:

  • Gateway: FLOATING_IP
  • Source Port: 8888
  • Destination: localhost:32400

Enter the following link into your web browser to view the interface:

http://localhost:8888/web

Now, follow the steps below:

  1. Sign in with your username and password.

  2. Give your Plex Media Server a name and leave the ‘Allow me to access my media outside my home’ box checked. Afterward, click Next.

  3. Add the libraries by selecting the directories that you just made in a previous step.

    (Optional) Continue adding additional libraries by clicking the + symbol next to the Libraries list located on the Plex sidebar.

  4. To access the Plex Media server from outside your home, you need to open a specified port. Open the Horizon dashboard and go to Access & Security.

  5. Click the Manage Rules button that belongs to the default security group.

  6. Click the Add Rule button.

  7. Add the port 32400 in the port input field without changing the default values inside the other fields, then click Add.

  8. Return to the Plex dashboard and go to Settings → Server → Remote Access.

  9. Activate Enable Remote Access if this option isn’t already activated and use the custom port 32400. If you have trouble enabling remote access, try restarting your instance and wait a few minutes.

Step 3 - Connecting to Plex

  1. Download the Plex application to your device. Click here for a list of supported devices.

  2. Sign in to the application using your Plex account.

  3. Select your Plex server from the dropdown menu in the upper left corner of the screen.

Congratulations! You’re Plex Media Server is ready for use. You’re now free to add your own media to the specified directories.

Conclusion

In this tutorial, you’ve installed a Plex Media Server on an Ubuntu-based OpenStack instance. You configured your Plex Media Server and enabled remote access. In the last step, you connected to the Plex Media Server which is now ready for usage.