[BETA] Mostly automated ACD, Rclone, crypt, Plex, nzbget, PP Scripts


#1

Hi everyone,

I recently finished my Plex web install and since I enjoy automating things I thought I’d script the entire process.

It’s still a work in progress, but for now it will Use rclone crypt to mount and encrypt/decrypt your (unlimited) Amazon Drive storage on the fly.

It’s written in bash and heavily commented in order to make the scripts usable and relatively easy to understand.

These scripts will install and configure:

  • Plex
    • IP:32400/web
  • PlexPy
    • localhost:8181
  • PlexRequests
    • localhost:3000
  • NZBget
    • localhost:6789
  • SickRage
    • localhost:8081
  • CouchPotato
    • localhost:5050
  • Mylar
    • localhost:8090
  • nzbToMedia Post-Processing
  • rclone + crypt + Amazon Drive

UPDATE
I just wanted to say that I just completed the wiki and this project is now in what I’d call a working beta state!

I’ve tested all of the scripts and wiki guides on a brand new Linode Ubuntu 16.04 without error. I’d love for others to do the same.

Now that the basic documentation is done I’ll start looking at adding additional software options and trying to automate even more of the process.

If anyone ever has any suggestions or recommendations I’d be happy to hear them either here, via email, or on github.

HUGE thanks to @ncw for all the hard work on rclone!


#2

:grinning:
I was just trying to collect all the info from different forums, before going ahead but this script sounds fantastic to me.
I’m just interested in the 3 first scripts (using google drive instead of ACD), as i’m not using this machine to download anything, at least at this moment.
Thanks!!


#3

Cool!

The documentation is still much more sparse that I’d like so if you come across something that needs more info feel free to let me know.


#4

Awesome job mate! On my side I added ruTorrent, HeadPhones, Jackett and Emby/SubSonic. rClone + ACD is really a must!


#5

Yeah, rutorrent and headphones are on my ToDo list.

Eventually I’d love to add things like Sonarr, Jackett, Emby, Kodi, etc. So that people can just run the scripts for the software they want and it’ll all be configured to work together.


#6

great job with the scripts.


#7

Hey Chris,
I just wanted to say “thanks” for taking the time to post your scripts.
A lot of us folks arent savvy to the various ins and outs. Myself, I finally got my setup working through trial and error over a month.
I would have loved these scripts like 2 months ago.
Thanks a lot for sharing and building the community.
Wish there were more ppl like you, keep it up.


#8

Thanks!

I do this sort of stuff for a living, but I’m relying on open source tools created by others - all I’m doing is documenting the stringing together. (Seriously, without Rclone, this wouldn’t exist). Glad to help though!


#9

Chris,
Apologies in advance for these basic questions.
As I mentioned my setup is already up and running… but as we all know, there’s always some crash or disaster or VPS migration… so a set of scripts such as yours that can stream line the entire “reset” process is AWESOME.
Anyhow I thought I would load a blank VPS and see how they roll… now on to cringe-worthy basic questions.

  • I extracted your scripts… then I chmod +x to allow them to be executed…
  • you said that they need to be run under root… instead of the normal ‘sudo’ stuff… so i googled how to open a root account as they are closed by default near as I can tell under 16.04 desktop. And set up root access… then SU to root… everything is good so far. :wink: I edited the “vars-example” file to reflect most of my settings. then I copied that file over to the /var directory.
  1. was I supposed to rename vars.example to maybe “vars”
  2. was the above file vars or vars.example supposed to be just dumped into the /var directory? not a subdirectory or anything in there?
  3. inside the vars.example file, it asks for a user name and password. Is that my ‘root’ information it is looking for? or my normal sudo user “plex”?
  4. at some point, it will get to a point where it will say… “did you upload your SSH keys to the remote server”… forgive my ignorance… but can you advise of the steps to do so?
  5. looking inside the 00-setup.sh file itself line 3 (i think) reads “source vars” … is that a configurable section that is asking for the directory path to the vars-example file ie: /var/vars.example ?

I’m sure there will be more questions :slight_smile: thanks for helping me play around with your scripts


#10

Hi,
That’s exactly my reasoning here. My old local NAS setup recently died and I couldn’t remember how I originally set it up years ago.

  1. just rename vars.example to vars
  2. don’t move it to another directory
  3. for now the scripts use a single user for all applications. This may change in the future but I was going for quick and easy first. Whatever username you list in vars will be created and all services installed by these scripts will be run by that user at boot.
  4. The text echoed by the script tells you a command to run from your local machine to do this. I’m on my phone now or I’d provide better details, sorry.
  5. sure, you could point it to any file, I just keep everything in the repo by default.

#11

Well, i have been playing with your scripts with 2 systems, one local, one remote.
I have one question in setup.h script, the lines bellow:

Allow SSH

ufw allow ssh
ufw default allow outgoing
ufw default deny incoming

Enable Firewall

ufw --force enable

after forcing firewall, no more access to SSH. :frowning: so, probably i have to reboot the VPS to begin again the installation… because there is no other way to connect to it.

What is the purpose of this?
Is it unsafe if i don’t use this part of the script and keep SSH as it is?


#12

I’ve been working on the Wiki and have the first section done, hopefully it explains everything better.


#13

Ok.
Now i’m having issues with auto mount rclone.

If i run the generated script rcloneMount.sh manually it runs and works OK.
But when trying to start with:

systemctl start rcloneMount.service it fails.

“Job for rcloneMount.service failed because the control process exited with error code. See “systemctl status rcloneMount.service” and “journalctl -xe” for details.”

I guess it is something related to permissions.
I have copied my rclone.conf from other machine, that’s the only difference from your procedure.
Can you help on this?


#14

I copy my config file around too so that’s not it.

Typically it’s a mount issue, try running:
sudo umount ALL
sudo umount AMZe
sudo systemctl stop rcloneMount
sudo systemctl start rcloneMount


#15

For the rclone one, to use it with google drive, it would just be a case of changing the values before you run it?


#16

I haven’t used rclone with anything other than ACD so I don’t know for sure, but I imagine it should work fine if you use your Google Drive remotes (and make sure any of the flags used are available for both ACD and Google Drive).


#17

I’m just trying to get it to mount on boot, and having problems getting it to work.


#18

My problems came because network was not available. I solved introducing “sleep 20s” in my script just before mounting and now everything works!


#19

That’s good to know, thanks.


#20

Hey Chris,
Just firing a quick question at you regarding 00-setup.sh
I just picked a new dedicated machine from JoesDataCenter and there is apparently no ‘panel’ like I had on ChicagoVPS where i could manually reboot, install new OSs etc etc. So when I would break something on ChicagoVPS I could easily just reinstall Ubuntu… now with my new VPS I’ll be stuck with Issue Tickets to tech support if I lock myself out.

On to my question…

On a brand new ‘headless’ VPS if I run your 00-setup.sh like as the 1st thing on the headless VPS… everything should go fine til I get to the SSH part. (I was looking at the code tis all). Now this is the section that is a bit concerning as it states that once I reboot, I won’t be able to login as root anymore.

Can I assume that I can still SU root as needed?

Assuming that is yes… there is a section of code that asks if you have pushed your ssh keys and it will likely display
“ssh-copy-id $username@$ipaddr”

Can I assume that the script stops at this point… and you want the user to crack a new Terminal open and copy/paste the above into the new terminal … and that will ‘push’ the keys where ever they need to go? :slight_smile:

Yes I know this seems basic heh… I’m just not looking forward to enabling the firewall, then removing external root access, then pulling my ssh access, and then clicking ‘reboot’ on a headless VPS… as staring at a blank screen is less entertaining then watching Plex.

Thanks for entertaining my basic tier inquiry.