Skip to content

Cloud Based Plex/Torrent Server Setup Guide

Introduction

 

If you’re reading this article you’re probably already familiar with what Plex is and that’s why you’re here, but for those of you that aren’t aware of what Plex is it’s a piece of cross platform media server software that in my opinion is unrivaled currently. If you’re interested in what the UI looks like here’s a screenshot!

 

Plex_Web_Interface

 

This guide is going to walk you through setting up a cloud based solution to allow for you and your friends/family to torrent files safely and stream them to your device just like using Netflix or Youtube! This guide will assume that you have basic computer knowledge however if you’re finding some of the steps troubling feel free to ask for assistance in the comments and I’ll reply as soon as I can.

Requirements

  1. A Seedbox – I personally recommend Whatbox and I’ll go into that in a bit.
  2. A Debian/Ubuntu Based VPS – I personally recommend Digitalocean however feel free to use any VPS that has a good amount of processing power/ram.

What’s a Seedbox?

If you’re familiar with torrenting you may or may not have heard of Seedboxes. Seedboxes are high speed web servers that allow for fast uploading/downloading of torrent files, in our case we’re going to use our Seedbox as a cheap mass data storage server as well as a torrenting client. This is going to do 2 things for us, 1 it’s going to be a cheap place to host all of our files in the cloud and 2 it’s going to provide the anonymity that’s required for this type of server. Specifically I recommend buying your Seedbox from Whatbox. Whatbox is  reasonably priced and they have fantastic support as well as allowing for payment via Bitcoin in monthly increments! (Yay for being anonymous).

What’s a VPS?

A VPS or a Virtual Private Server is going to be your Plex server in the cloud, in this particular case I recommend using DigitalOcean as they’re easy to purchase and you can get your feet wet with this without any long term commitments. (If you really like this solution I recommend later looking for better dedicated hardware through someone like Kimsufi).

 

Setup Guide

Allright so I’m going to assume at this point you have purchased your VPS/Seedbox and you’re ready to get Plex up and running on the web. This process isn’t actually that involved but it can be a little hard if you don’t have much experience with Linux.

  • Download some data using your Seedbox’s torrenting client.

dWxtY

  • Login to your VPS/Droplet on DigitalOcean or your other VPS provider.

VPSLogin

  • If you’re using a Ubuntu/Debian based VPS then go to https://plex.tv/downloads and click on Plex Media Server for Linux and right click and copy the download link location of the current Plex Media Server Package.

plexpackage

  • Go back into your VPS and run the following command,
    wget “insert your link here”

wget

  • Now from the same directory run the following command,
    sudo dpkg -i “package you downloaded.deb”

dpkg

  • After the install for Plex finishes your VPS host should now be running Plex, before you set up Plex though lets go ahead and get our Seedbox’s data onto our Plex Server.
  • First we’re going to need to install SSHFS do so with the following command, sudo apt-get install sshfs

sshfs

  • Next we’re going to need to create a folder to hold all of our Seedboxes files create a folder with the following command, mkdir “nameoffolder”
  • Next you need to find out the full directory that you’re in to do this simply type pwd and note what the terminal says is your current directory.
  • Now we’re going to need to mount the Seedbox on our Plex Server do so with the following command, sshfs username@seedboxaddress:/path/to/files /path/to/folder

SSHFS

  • Now this should have mounted your Seedbox’s file directory on your VPS and we can go ahead and start getting Plex setup.
  • Due to the way that Plex was designed we’re going to need to SSH into the VPS box to set up Plex for the first time. If you’re running Linux/Mac OSX this is a pretty simple process just type the following into your Terminal ssh ip.address.of.vps -L 8888:localhost:32400
    ssh server
  • However if you’re running Windows it’s going to be a little more complex. You’re going to need to download Putty first and then follow this guide.
  • After you’ve setup either your Putty tunnel or your standard SSH tunnel on Linux/OSX you’re going to need to point your web browser at http://localhost:8888/web and configure Plex.

plex setup

  • Go ahead and complete the very simple plex install pointing it to the new directories that you mounted from your Seedbox.

library

  • Login to your Plex account so that your VPS is connected through Plex.tv

login

  • From now on you should be able to just go to http://www.plex.tv and login to access your server and stream any/all torrented data you have!

plextv

 

If you run into any troubles trying to follow this guide or have any questions regarding Plex/SSH/Torrenting etc please feel free to leave a comment and I’ll respond to it as soon as possible. This is my first guide of this length in a while so hopefully it’s easy to understand!

Advertisements
16 Comments Post a comment
  1. zhaiden #

    I followed your guide, it was very helpful! I got everything working except plex is not reading the files from whatbox. When i do ‘~/plexcontent ls’ all the files from what whatbox show up but when i look in ‘/plexcontent’ in plex nothing shows up. I am guessing som permission issues here. Any advice? I am losing my mind over this!

    January 18, 2016
    • So if Plex isn’t reading the files from Whatbox it can be a few things, you’re right that it’s probably a permissions issue so let’s start with that. Do an ls -a in the directory that holds your media and see what the permissions are. For this to work the user that your sshfs’ing as needs to be the user that has rights to the folder in question, alternatively you can do chmod 777 -R in the file directory (careful though that is not reccomended due to the security issues it poses), you might also have to do a chgrp or a chown -R for your user as well. After all that’s done go back and try to mount the SSHFS again, the other problem that can occur is that on the client (vps) you might not have the proper permissions over the folder you’re mounting into in which case yet again verify permissions and make sure that you’re creating it as the proper user (when it doubt chmod 777 just to test). If you need more troubleshooting help link the outputs of your ls -a’s in a pastebin and put them in a reply and I’ll take a look.

      January 20, 2016
  2. Sebastian Tomic #

    Great Tutorial!

    I’m stuck at ssh ip.address.of.vps -L 8888:localhost:32400.

    Error message in terminal:
    “channel_setup_fwd_listener: cannot listen to port: 8888
    Could not request local forwarding.”

    Is it because the port 8888 is already in use? I’ve tried google-ing but I’ve not found the solution to this.

    April 10, 2016
  3. Sebastian Tomic #

    Solution to my problem:

    Do not type in the command when logged in to root.

    Type exit so you’re logged out and then run the command:
    ssh root@ip.address.of.vps -L 8888:localhost:32400

    Then it works!

    Thank’s for a great tutorial!

    April 10, 2016
    • No problem, glad to see you were able to sort out your own issue and I hope your new setup works well for you!

      April 10, 2016
  4. Matt Reddick #

    wow, thanks for this… It was a struggle but I got all the way to setting up plex. Cannot find the folders I mounted! There is a root folder but no FILES folder.

    April 29, 2016
    • It’s most likely the permissions, make sure you modify the permissions of the folder that you’re mounting recursively. I.E. chmod +R 777 /files

      If that doesn’t work let me know.

      April 29, 2016
  5. nate #

    Needed steps which caused some frustration and my files not to show up in Plex.

    sudo nano /etc/default/plexmediaserver
    (change PLEX_MEDIA_SERVER_USER=plex to PLEX_MEDIA_SERVER_USER=root/ or something else)

    sudo service plexmediaserver restart

    For two weeks I couldn’t understand why my wouldn’t show up, this fixed that. Maybe there are other ways.

    May 24, 2016
  6. federicosanmartin #

    Hi, this a great article! Thank you very much! Would you care to share the VPS specs you used for this test on digital ocean? And also if you can share the specs I would need for let’s say 3 concurrent 720p streams? Thanks!

    May 27, 2016
    • Federico,

      You would probably need to setup a 20/month VPS on Digitalocean one of the dual core listings to get 720p trans-coded streams. If you have media that’s already in a container such as mp4 that can direct play through the browser then a single core cpu could probably do 3 – 6 streams, however for trans-coding you’ll need to have the dual core setup.

      On the Plex site they say a dual core 2.0 ghz for a single 720p trans-coded stream I believe the CPU’s at digital ocean are a little bit higher clocked then 2.0ghz probably 3.4ghz Xeon’s so by that right I would imagine the dual core setup would net you about 6.8ghz, or about 1.5ish 720p transcoded streams. If you want to scale this out farther you could do a few things. I would imagine you could probably launch a few 5/month droplets and mount the library for storage under them and use them individually for each client. Or you could opt for a different vps provider that has enough cpu horsepower to provide what you’re looking for. Basically what you’re going to need is 12GHZ total of processing power more or less to do 3 720p transcodes. This should easily be achieved by a quad core xeon at ~3GHZ so if you’re looking for specs try to find a provider that can provide a quad core at 3GHZ for somewhat cheaply.

      June 9, 2016
  7. Is Plesk support on demand music play?

    June 7, 2016
    • Do you mean on demand like Google Play Music or Spotify? If so then no. There may be a Plex plugin that supports functionality like this but by default Plex doesn’t have any sort of online library to pull from other then your own.

      June 9, 2016
  8. Great Tutorial! +1 for whatbox, great provider, if a little pricey. I prefer a small slot from kimsufi as you suggested.

    If you are interested in scaling this, the is a CLI for Amazon Cloud Drive on github. The exchange rate gets me with Whatbox.

    You could mount it on whatbox, move completed and cleaned downloads to it, and then mount it to your VPS for streaming.

    June 8, 2016
    • JJ,

      Yeah I used a large Kimsufi setup for multiple users for about 6 months the price finally got to me though and I bit the bullet and built a 32TB Freenas home setup to avoid shelling out 110USD a month. You could probably avoid the exchange rate with Whatbox by buying bitcoin in whatever manner you see fit then buying the Whatbox sub with bitcoin rather then currency but your mileage may vary with that. The CLI for Amazon Cloud Drive is actually a fantastic idea not something that I had thought of previously but for anybody reading this I would suggest checking that option out to provide more storage at a cheaper rate.

      June 9, 2016
  9. Jon #

    Hi Ian, Is it possible to add channels (IPTV) to the server. Guess specifically do you have access to the application support folder for Plex at Digital Ocean ?

    September 26, 2016
    • Yeah you do have access to the application support folder you have root access to the machine so anything you want to do you can. I’m not sure about IPTV if by that you mean Plex Channels and Unsupported Channels then yes that works too.

      September 27, 2016

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: