The original source for the following tutorial on how to setup a Plex Media Server with GSuite has gone offline, this is a re-post it so it's not lost.
Everything below is simply lifted from their website (with minor tweaks) (Tech Perplexed / We will not provide support for this.

You made it up to here, you finished Part 4 - Setting up Rclone and/or Plexdrive and are still with it, congratulations! The hardest parts are done, it'll be downhill from now on. Promise! We now need to mount our drive so that Plex can access it as if it is just one giant external drive.

Mounting the Google drive (Rclone)

You are probably still logged in with your plexuser account, which is exactly what we want.

Let's create the required folders first:

mkdir -p /home/plexuser/logs
mkdir -p /home/plexuser/uploads

Creating the mount script:

sudo nano /etc/systemd/system/rclone.service

Then paste (right click):

Description=Mount and cache Google drive to /media/Plex
ExecStartPre=/bin/mkdir -p ${MOUNTTO}
ExecStartPre=/bin/mkdir -p ${LOGS}
ExecStartPre=/bin/mkdir -p ${UPLOADS}
ExecStart=/usr/bin/rclone mount \
  --rc \
  --log-file ${LOGS}/rclone.log \
  --log-level INFO \
  --umask 022 \
  --allow-non-empty \
  --allow-other \
  --fuse-flag sync_read \
  --tpslimit 10 \
  --tpslimit-burst 10 \
  --dir-cache-time=160h \
  --buffer-size=64M \
  --attr-timeout=1s \
  --vfs-read-chunk-size=2M \
  --vfs-read-chunk-size-limit=2G \
  --vfs-cache-max-age=5m \
  --vfs-cache-mode=writes \
  --cache-dir ${UPLOADS} \
  --config ${RCLONEHOME}/rclone.conf \
  Gdrive: ${MOUNTTO}
ExecStop=/bin/fusermount -u -z ${MOUNTTO}
ExecStop=/bin/rmdir ${MOUNTTO}

Of course you will need to replace all instances of plexuser with your own username.

When you are done, save the file by typing Ctrl-O, Enter to save, then Ctrl-X to exit.

You will need to enable the service. Type

sudo systemctl enable rclone.service

Reload the service so it'll work:

sudo systemctl daemon-reload

You will need to reboot your server now. Type

sudo reboot

You may need to wait a few seconds for the server to be back online again... just enough time to grab another cup of coffee. You deserve a break.

Click away the PuTTY session (it has become unresponsive anyway). You are done now and you can proceed to Part 6 - Making it all come together.


Post a comment

Fields marked with an * (asterisk) are required

Recent Posts

Umbraco Medium Security Vulnerability - 21st Ma...

Security patch now availabl...

Umbraco V14 - Why we won't be offering builds,...

We explain why we will not...

Tips & Tricks
How to use Cloudflare Workers and Transform Rul...

This post explains how to m...

UmbHost Limited is now a Silver Umbraco Partner

We are now officially a Sil...

How to pass a Content Security Nonce (CSP) to G...

How to use a CSP nonce with...

Browse Umbraco Hosting

Umbraco Hosting Starting At $26/month