Monthly Archives: February 2016

Installing Plex on a VPS

Plex is a great piece of software, if you’ve never heard it before think of it as an easy to use service that runs on a computer at home that streams just about any format of audio/video to a smart TV, Apple TV, Roku, or modern console. You can even easily configure it so that your iOS device can stream content from your media server across the Internet. Perfect!

However, maybe your home Internet upload speed is not very good. Or you have a data cap. Or you are trying to upload a massive amount of data to Amazon or Backblaze for backups and you don’t need to make that process even slower by using precious upload bandwidth for Plex. This site is hosted on a VPS instance with way more disk space than I need for a small blog, so I’ve plenty of disk space and bandwidth to stream my music from that instead of my from my home computer.

First of all, it’s as simple as downloading the .deb file from Plex’s site and following the simple install instructions to get the service installed. Really the one and only hiccup I ran into (and the reason I decided to write this blog post about it) is that once you’ve installed the service it is expecting you to configure it by visiting http://localhost:32400/web. However it’s a command line only Linux environment and Lynx doesn’t get the job done (I tried).

After much Googling, all I could find was references to using ssh to setup a tunnel and changing your browser’s proxy setting so that the Plex service thought you were accessing it from the local machine. That was, in my experience, a bunch of crap and never worked. Eventually I found a forum post that simply said to edit the Plex config file that restricted the initial setup to only happen from the local host. A quick trip to https://www.whatismyip.com and a quick edit in vi, and I was in business.

Here’s all you have to do:

  • Change into /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/
  • Edit the Preferences.xml file
  • There should be two lines, the second line is very long. It starts with Preferences in brackets.
    • After that tag, add the following:
      • allowedNetworks=”your.ip.address.here/your.subnet.mask.here”
  • For example, you’d put allowedNetworks=”1.2.3.4/255.255.255.255″
  • Save the file, restart the Plex service, and POOF! You can now login and configure the server via http://server-ip-address:32400/web

After you configure the service, be sure you remove the “allowedNetworks” tag from the XML file and restart the service.