How To Build The Ultimate PLEX VPS Using Google Drive

It’s no surprise that so many people use PLEX these days.  The one challenge I have had thus far is providing a decent server that my friends can access without the limitations of my upstream bandwidth.  While PLEX Pass gets you a Plex Cloud server, to be honest, the implementation has been less that stellar since its release.  I set out to build something myself on a Virtual Private Server (VPS) and decided to document the build after a couple tries that landed me on something that worked well.  I decided to use Google Drive for my media library storage so once it all was uploaded initially and setup to sync twice daily from my master library on premises this build process could start.  You really can’t start the VPS build until you get your media uploaded which is the longest part to wait for.  I’ve done this so many times and had so many notes it was high time to consolidate them.

Ultimate Plex VPS Step 1:  Choosing a Provider (UPDATED)

This is probably the worst part.  There is literally hundreds of options out there.  The problem is cost for what you get.  I personally tried about 5-6 different ones and the real problem is finding one at a decent price that also includes Unlimited Bandwidth.  The reason for this is when you connect to Google Drive your data will use double bandwidth for the pull from Google Drive and the push to the client, passing through the PLEX Server as a proxy.

NOTE:  As of July I have since dropped the original provider.  While they stated unmetered bandwidth they constantly traffic shaped my systems down to 15Mbit/s with no explanation.  They also would not bump it back up.  I have moved over to try another provider to see how they go called Direct Space who has KVM SSD options.  Their speed is not quite the same and they say it’s a fair share access port.  They also have a vCloud option that does not list the fair share use on the port I may test out as well.

Ultimate Plex VPS Step 2:  Choosing a Linux Distro

I have these both on Ubuntu and CentOS.  What I found I also liked about all providers is that they offer an ISO library that not only included both, but specifically CentOS 7 Minimal which I am personally a fan of to keep the installation as light as possible.  You can elect to spin up and install from the ISO yourself and that is what I did and the rest of this post will cover the steps to configure the PLEX VPS under CentOS 7 Minimal.

Configuring Plex VPS Step 1:  Install Dependencies

Based on the fact this is a minimal installation there is some packages you will want/need for some basic toolsets.  I will get into some of these later, but here is the list I compiled as I went through the installs.

#Install Core Packages
yum install -y python nano wget sudo zip git unzip fuse net-tools firewalld

#Install EPEL Repo
yum install epel-release -y

#Install ncdu from EPEL (Useful for finding large files)
yum -y install ncdu

#Install PIP from EPEL
yum -y install python-pip
pip install --upgrade pip

#Install Speedtest-CLI
pip install speedtest-cli

#Install OpenSSL for PlexPY
pip install pyopenssl

Next you will want to add a new user for plex and add it to the wheel group

adduser plex
usermod -aG wheel plex

Configuring Plex VPS Step 2:  Configure FirewallD

Most VPS installs I have found vary in what is allowed in the internal firewall.  CentOS now uses firewalld instead of iptables so here is the restricted settings I found worked well.  Port 8181 will be used later for the Tautulli application (Old PlexPY)

systemctl enable firewalld
systemctl start firewalld
firewall-cmd --zone=public --add-port=32400/tcp --permanent
firewall-cmd --zone=public --add-port=8181/tcp --permanent
firewall-cmd --zone=public --add-icmp-block=echo-reply --permanent
firewall-cmd --zone=public --add-icmp-block={echo-request,echo-reply,timestamp-reply,timestamp-request} --permanent
firewall-cmd --reload

Configuring Plex VPS Step 3:  Install and Configure PlexDrive

There are a number of ways to connect to Google Drive using fuse, but the easiest I have found is what id called PlexDrive.  It’s pretty well documented and easy to install.  For the purposes of this installation I will give you the required steps.  Before you can do this you do need to enable the Google Drive API.  In the computer with the web browser, create an OAuth2 application and credentials.  The following steps are what I did, based on my notes:

  1. Sign in to your Google account and create a project:
  2. Click “API Manager” then “Library” in the left-hand pane (will take you to Click on “Drive API”, then “ENABLE API”.
  3. Click “Credentials” in the left hand pane, then click on the button “Create Credentials” (OAuth client ID)
    • Choose “Other”
    • Choose any product name, e.g “PlexDrive”
    • Click “Create”. You will get a Client ID, a Client Secret
cd ~
mv plexdrive-linux-amd64 plexdrive
mv plexdrive /usr/bin/
cd /usr/bin/
sudo chown root:root /usr/bin/plexdrive
sudo chmod 755 /usr/bin/plexdrive
mkdir /mnt/gdrive

#Run manually to setup connections to follow the prompts
plexdrive mount -c /root/.plexdrive -o allow_other /mnt/gdrive

#Once the credentials are saved you can CTL ^C out

Next you will want to create this as a service

nano /lib/systemd/system/plexdrive.service

#Edit the file and insert the following

ExecStart=/usr/bin/plexdrive -o allow_other -v 2 --max-chunks=50 mount /mnt/gdrive/
ExecStop=/bin/fusermount -uz /mnt/gdrive


#Enable and start service
systemctl daemon-reload
systemctl start plexdrive.service
systemctl enable plexdrive.service

Configuring Plex VPS Step 4:  Install and Configure PLEX

There is an interesting note that the PLEX installation does add a repo for updates, but you do need to install manually first then update the repo the installer creates so you can easily update later without the manual hassle.  This is pretty straight forward, but the trick is connecting to it to set it up.

#Install from RPM then update repo
su plex
cd ~
wget [download-link]
sudo yum install plexmediaserver-xxx-Latest.rpm

#Edit the Repo
nano /etc/yum.repos.d/plex.repo

#change line 4 from enabled=0 to enabled=1. It should look like this:

In order to access the server to add it to your account you will need to create a secure connection for access via localhost.  Since this is a remote server you need to create the connection.  I use a mac and found that the application Secure Pipes is the easiest way.  Below is the configuration you will need to access http://localhost:32400/web

Once you complete the setup to your existing account you can disconnect Secure Pipes and finish the setup from the regular page and the new server should be connected.  You will need to enable remote access of course but if you setup the firewall settings above it should connect just fine.  At this point depending on the time it takes for PlexDrive to cache your Google Drive, you can then add libraries and access them in by browsing to /mnt/gdrive/[DIRECTORY].  At that point the PLEX server will start building the library.  You can also migrate library meta data using the process already documented by PLEX which take a little more work.

Configuring Plex VPS Step 5:  Install and Configure Tautulli (PlexPY)

This is an extra step but well worth it if you want to be able to see more detail on the streams happening and also see some analytics data and even get alerts via notifications.  I use this a lot to troubleshoot or get notified about upgrades as well.  You can find out more from the Tautulli Page here.  The setup is pretty easy though.

#Add User for Service
adduser --system --no-create-home tautulli

#Install From Git
cd /opt
git clone
chown tautulli:nobody -R /opt/Tautulli
cp /opt/Tautulli/init-scripts/init.systemd /lib/systemd/system/tautulli.service

#Edit the GROUP to "nobody"  Other docs say nogroup which is not in CentOS
nano /lib/systemd/system/tautulli.service

Description=Tautulli - Stats for Plex Media Server usage

ExecStart=/opt/Tautulli/ --quiet --daemon --nolaunch --config /opt/Tautulli/config.ini --datadir /opt/Tautulli


systemctl daemon-reload
systemctl enable tautulli.service
systemctl start tautulli.service

You can now point a browser to http://SERVERIP:8181 and you will see the setup screen for the application and you can go from there with the well documented information.


  1. This is a great walkthrough, but I’m curious when you did this and if you’ve made any changes or have any follow-up since then?

    • did it the day it was posted about, and no changes since. I made a couple syntax tweaks in the lines for the commands as I noticed a few errors and changed the order.

  2. Thank you for this recent post. I may need to do this as I have family all over the US that connect and it kills my home network when I start getting 2-4 people on at a time.

    I have 3.5tb of data at the moment and Google jumps from [email protected]$20 to [email protected]$100. Do you know of a cheaper solution to run more like 4 or 5TB for storage?

  3. Great tutorial. I am having an issue starting Tautulli. This happens on Centos and Ubuntu. Any ideas?

    Traceback (most recent call last):
    File “./”, line 35, in
    import plexpy
    File “/opt/Tautulli/plexpy/”, line 37, in
    import activity_handler
    File “/opt/Tautulli/plexpy/”, line 24, in
    import activity_processor
    File “/opt/Tautulli/plexpy/”, line 21, in
    import database
    File “/opt/Tautulli/plexpy/”, line 24, in
    import logger
    File “/opt/Tautulli/plexpy/”, line 30, in
    import helpers
    File “/opt/Tautulli/plexpy/”, line 48, in
    from plexpy.api2 import API2
    File “/opt/Tautulli/plexpy/”, line 39, in
    import notification_handler
    File “/opt/Tautulli/plexpy/”, line 43, in
    from newsletter_handler import notify as notify_newsletter
    File “/opt/Tautulli/plexpy/”, line 29, in
    NEWSLETTER_SCHED = BackgroundScheduler()
    File “/opt/Tautulli/lib/apscheduler/schedulers/”, line 82, in __init__
    self.configure(gconfig, **options)
    File “/opt/Tautulli/lib/apscheduler/schedulers/”, line 121, in configure
    File “/opt/Tautulli/lib/apscheduler/schedulers/”, line 29, in _configure
    super(BackgroundScheduler, self)._configure(config)
    File “/opt/Tautulli/lib/apscheduler/schedulers/”, line 689, in _configure
    self.timezone = astimezone(config.pop(‘timezone’, None)) or get_localzone()
    File “/opt/Tautulli/lib/tzlocal/”, line 108, in get_localzone
    _cache_tz = _get_localzone()
    File “/opt/Tautulli/lib/tzlocal/”, line 61, in _get_localzone
    return pytz.timezone(etctz.replace(‘ ‘, ‘_’))
    File “/opt/Tautulli/lib/pytz/”, line 181, in timezone
    raise UnknownTimeZoneError(zone)
    pytz.exceptions.UnknownTimeZoneError: ”

    • I am not running it on the Linux box anymore I deployed it using Docker. There may be some people on the GitHub for it or there is support for Tautulli on Discord as well that is very helpful.

  4. Chris, why do you suggest KVM vs OpenVZ if ou’re using Linux as your OS?
    From my understanding, OpenVZ uses less resources and is generally cheaper for the same hardware than KVM access. I know it is limited to only using the base OS – i.e. Linux – but that is your OS of choice anyway.

    I do recall that root access is (typically? always?) not provided through OpenVZ, so that may be an issue, and I’m not sure if you are limited in which Linux distro you can use, which could be an issue depending on your familiarity.

    • OpenVZ usually requires the host to enable FUSE for the drive mounts to work KVM is a little easier as it does not require their intervention. I have found pure KVM seems to run a little better than OpenVZ as well. It’s more of a preference not a hard and fast rule. Both work OpenVZ just has extra steps specifically for FUSE.

  5. I’m trying this on their “cloud” (vCloud) server as you mentioned above. Using the VC4G version – 80GB SSD, 4GB RAM, 8 core proc, unmetered transfer.
    I initially started using the on Ubuntu. Got through a working system with TV and movies pulling from GDrive. However – it was unbearably slow, whether direct streaming or transcoding. The same files from the same GDrive location played almost instantly using Plex’s native cloud server.

    So, I am trying your setup to perhaps provide an apples to apples comparison. I’ll let you know how it performs.
    I note that you don’t list the specs on the service you’re using (unless I missed it) so I’m not sure if the service level I am using is comparable.

  6. I think I am using the $10/month ones for now.

Leave a Reply

Your email address will not be published. Required fields are marked *


Scroll To Top
%d bloggers like this: