My Plex Setup with Amazon Cloud Drive

Hi All

Now that I’ve finally got my setup stable and the way I want it, I thought I might post a little write-up about it.

Previously, I ran Plex, Sonarr, CouchPotato, and SABnzbd from a VM on my desktop at home. This was great and didn’t really require an interaction from me, except for buying more storage constantly. Which as we all know is expensive and annoying. So once the unlimited Amazon Cloud Drive offer came around, and the tools matured some I knew what the best solution would be.

I’ve gone through 3 of the usual seedbox providers and had nothing but problems, especially with peering (Online.net, OVH, and I forget the third, but it wasn’t good either). So I had this grand idea to look at low cost, US based VPS providers. I know for most this might not be an option, but I’m a Usenet downloader, so no torrents here.

I’ve ended up with 2 virtual servers from 2 providers hosting all of my streaming services. The first is an OpenVZ machine with 4TB of transfer per month, for a whopping $36/year. This server mounts an encryped drive through Rclone and takes care of all playback for the 3 family members I’m doing it for. The second machine is a $4/month box with an umetered 100mb/s connection running Quickbox to handle all the media acquisition duties. As files are dowloaded they’re run through sickbeard_mp4_automator prior to upload so Plex doesn’t need to transcode. After conversion, the files are uploaded to ACD by a script running hourly. Plex then picks them up and everything is just works.

I’m happy to answer any questions about my setup, so far there have only been a few minor hiccups with rclone dropping it’s mount. Otherwise it’s been a set and forget system.

Special thanks to the Quickbox team for making everything so easy to get running!

2 Likes

I’m interested in knowing what VPS provider you went with.

It’s actually 2 deals I found on Low End Box. Wishosting and Woot Hosting. Neither is torrent friendly, so if that’s how you get content, don’t bother with them.

On Reddit someone mentioned an OVH VPS to be a good option as well.

How does your start-up script look?

I don’t have a start-up script per se. Just one that runs 2 rclone move commands, one for TV and one for Movies. The rclone mount is started by rc.local, and union-fs is in my fstab.

I see. I want to make sure the mount/unmount is automated and have it do a check every x hour.

for my systemd I’ve come up with:

[Unit]
Description=rclonemount
Wants=network-online.target
After=network-online.target
 
[Service]
Type=simple
ExecStart=/home/bt/rcmount.sh
ExecStop=/home/bt/rcunmount.sh
Restart=on-abort
 
[Install]
WantedBy=multi-user.target

But I need some of the more experienced linux users for some input on how to handle the mount check.
If my server reboots unexpected the unmount needs to run first then the mount.

This is mine, I adapted one that someone used on Reddit for acd_cli.

[Unit]
Description=user Amazon Cloud Drive FUSE mount
Documentation=https://acd-cli.readthedocs.org/en/latest/
After=network-online.target

[Service]
Type=forking
User=root
ExecStart=/bin/sh /root/mount.sh
ExecStop=/bin/sh umount /home/.....

[Install]
WantedBy=default.target`Preformatted text`

If your server where to reboot then it would be unmounted anyway. You don’t need to check if you mount is active.

I adapted this from another script I found on Reddit to monitor and remount if necessary. I just run it with cron at the top of each hour.

#!/bin/bash
#Check for ACD Mount
if [ $(ls -l /mnt/acde-media | grep -v '^total' | wc -l) -ge 2 ]
then
echo "Rclone Mounted -- No action taken"
        else
        echo "Rclone Mount problem"
        echo "ERROR<<----{{ Rclone Mount not connected $(date)"
        echo "Trying to remount Rclone now"
        #unmount first
        echo "Verifying Unmount"
        sudo umount -l /mnt/acde-media
        #run mountscript
        echo "$(date) Mounting Rclone"
        /usr/sbin/rclone mount acde:media /mnt/acde-media --allow-other &
        sleep 5
        #Check again for mount
        if [ $(ls -l /mnt/acde-media | grep -v '^total' | wc -l) -ge 2 ]; then
                echo "Everything Looks ok after unmounting and remounting corrective actions for Rclone"
                echo "Rclone is mounted <<----{{ $(date)"
        fi
fi
exit 0

I do something similar and its actually caught it broken and fixed it:

#!/bin/bash
if [[ -d "/home/user/cloud/gdrive/media/" ]]; then
   echo "$(date) INFO: Check successful,drive mounted" >> "/var/log/rclone-check.log"
else
   echo "$(date) ERROR: Drive not mounted remount in progress" >> "/var/log/rclone-check.log"
   sudo systemctl stop rclonemount.service
   sleep 5
   sudo systemctl start rclonemount.service
   sleep 10
   if [[ -d "/home/user/cloud/gdrive/media/" ]]; then
      echo "$(date) INFO: Remount successful" | tee -a "/var/log/rclone-check.log"
   else
      echo "$(date) CRITICAL: Remount failed." | tee -a "/var/log/rclone-check.log"
   fi
fi
exit

Hello! Love the idea of your setup… but I’m assuming you went Google now instead of Amazon? Why not download, transcode, and upload to unlimited storage on your home PC and then stream from the VPS? Just curious. :slight_smile:

You must have some good internet at your house :stuck_out_tongue: I have 60Mb/s down and 5Mb/s up. Not quite enough to upload anything to any cloud drive in a reasonable amount of time. Hence, the cheap unmetered 100Mb/s VPS.

I’ve switched over to using Google and Plex Cloud, so I really only have to mange the 1 VPS. Outside of Plex Cloud not having Channels, I still don’t have any complaints.

You don’t have gig up and down like I do? I only pay $65/month… Yeah, I’m bullshitting you. I’ve got the same 60/5 you do. Who do you use for the VPS? And don’t they scream bloody murder when you convert the items before putting it up to Google Drive? I’m using a dedi from soyoustart atm.

Also, can you please post your setup for the rdrive/plexdrive? :slight_smile: Thanks!

I use the “KVM HDD Limited” plan from Wishosting. I don’t use torrents, so if you’re planning on doing that I wouldn’t use them, they aren’t friendly to it. Now that everything is loaded and I’m just maintaining my shows, I’ve never had any complaints about usage. I did once run over their fair use policy. But to be fair, I was using essentially 100Meg in both directions for about a week straight :smiling_imp:

My setup has become even more convoluted than before, I’ll probably make a new post out of it here before long. I think it would be helpful to a few people.

Nope! I’ve got UseNetHosting. The KVM HDD Limited… as in:
1 vCPU core Xeon E5-1620 v2
Unlimited CPU core 3.7GHz
2GB ECC RAM
200GB HDD RAID-5
Linux/Windows OS
Unmetered 250Mbps bandwidth
1 IPv4
DDoS protection
Control Panel - OpenNebula
Location - France (OVH)
Price - $3.99/mo
Link - https://www.wishosting.com/order/config/index/VPS/?group_id=2&pricing_id=29

Okay, you NEED to get this info up, cause if if that’s it I’m so in. :slight_smile: Thanks!!

Misury

Yep, that’s the one. I’m working on getting everything together to post. I didn’t realize just how much I had added until I started looking at it.

LOL! No worries my friend. I’ll watch for your new guide. I’m excited to get some guidance on how you make the magic happen! Thank you.