Plex logo cloud illustration

Build Your Own Plex Cloud with a VPS and Plexdrive

Justin Tech Leave a Comment

This September, the makers of Plex — everyone’s favorite way to stream your own media to any device, anywhere — announced their decision to sunset Plex Cloud. For me personally, this was devastating news as I’d purchased a Plex Pass back in the “early days” of Plex Cloud. The idea of not needing a machine in my house on 24/7 to stream my movies and shows to my TV is very appealing: computers and NASes alike have a high upfront cost and a relatively high cost of maintenance (upgraded storage, anyone?), not to mention the cost of electricity to keep them running. Plus, if you ever want to share your media with friends and family you’re fully beholden to whatever meager bandwidth and upload speed allotment your ISP has bestowed upon you.

Then Plex Cloud came along and solved most of those problems by allowing users to stream media directly from their favorite cloud storage provider (Google Drive in my case), alleviating the need to run your own in-house server. But, Plex reportedly found the service untenable in the long-term considering their costs, and that’s what landed me on Amazon looking for Network Attached Storage boxes. What I discovered very quickly is that landing a NAS that will serve you well in the long run plus a couple hard drives to cover your storage needs will easily set you back a minimum of $400-$600.

What’s the solution? Let someone else run your server, in the cloud! Not all providers are created equally, and while I pay a monthly fee it’s considerably more fun and more manageable than the headaches associated with owning your hardware. So let’s dig in a talk about my setup.

Finding your VPS

This can take some trial and error — as it did in my case — because it depends on your personal media setup and usage, as well as the time you’re willing to invest. I first tried Google Cloud Platform and this (or AWS, or some other self-service cloud provider) is a totally viable option, however in my experience it has a higher initial setup time, requires more careful and continuous management, and isn’t as inexpensive as other options.

Skipping to the good stuff, I landed with Bytesized Hosting which specializes in hosting specifically designed for Plex. There are a lot of similar providers out there who deal in seedboxes, but for the type of storage and usage I need, Bytesized is a great deal and offers a number of valuable features for low overhead, way more fun management.

Setting up

Bytesized (and similar providers) offer essentially one-click setup, meaning you get going very quickly; they also offer one-click installs of a number of applications from Plex to ownCloud, an open-source app to host your own cloud storage provider. As of this writing the flavor I’m using has the following specs for about $17 a month:

  • 1 TB storage
  • 5 TB monthly bandwidth
  • 3 simultaneous Plex transcodes

Connecting to Google Drive

If you, like me, pay for additional space on Google Drive — and especially if you were a user of Plex Cloud — you’ll probably want to connect your box to Google Drive in one fashion or another. What I mean by that is that you have two options: you can use rclone to copy files from Google Drive (or any other cloud storage provider) to your new box, or you can mount your Google Drive as a disk on your box with Plexdrive.

Using rclone

On Bytesized, rclone comes preinstalled on boxes so the setup is super simple. First you need to create a new config file, which rclone guides you through. Once you’ve logged in to your box, start with the following command:
rclone config

You’re setting up a new cloud service config so, press n. You’ll then be guided through the rest of the process to choose which cloud provider you’d like to use, then authenticate with a token or key with said provider.

It’s that easy! Now you’re ready to copy files, where effectively all you need to do is specifically the source path and destination and rclone will do the rest.
rclone copy source:sourcepath dest:destpath

For Google Drive, the prefix will be drive:/ so your command will look something like below:
rclone copy drive:/Movies /media/Movies

(Don’t forget to escape spaces in your paths with \ like clone copy drive:/TV\ Shows /media/TV\ Shows.)

For additional help, check out the rclone documentation.

Using Plexdrive

Bytesized has a full explanation on how to use Plexdrive so I won’t go too deep into it, but the basic steps are as follows, again after logging into your box via SSH:

If you don’t already have an apps directory, create it.

mkdir ~/apps

Enter the directory and install the latest release of Plexdrive (right now it’s 5.0.0 but check for yourself and adjust path accordingly).
cd ~/apps && wget https://github.com/dweidenfeld/plexdrive/releases/download/5.0.0/plexdrive-linux-amd64

Then you need to move the app to the appropriate directory and give it the right permissions:
mv plexdrive-linux-amd64 plexdrive
chmod 755 ~/apps/plexdrive

Now, let’s mount Google Drive! This is the directory your Drive content will show in.
mkdir -p ~/mnt/plexdrive

To speed it up a bit, create a new screen session while Plexdrive is creating the cache.
screen -S plexdrive

Mount the drive.
~/apps/plexdrive mount -c ~/.plexdrive -o allow_other -v 4 --refresh-interval=1m ~/mnt/plexdrive

This step will ask for your client ID. If you haven’t generated one yet, follow the instructions in this doc.

After you enter your client ID, you’ll receive a link to paste in your browser, during which you’ll have to allow access to your Google account.

Once Plexdrive has scanned your Google Drive, you can close the session and go to your Plex server, then add a library for your files, the path of which will be something like /data/mnt/plexdrive/Movies.

That’s it! So for a small monthly fee you can still stream all your media wherever you are with no computers or servers sitting at home, plus you don’t have to worry about your home internet connection (except to stream said media from the cloud). If you’re feeling generous (or you want to split the cost of the server!) you can share your libraries with your friends and family via Plex! Happy streaming!