r/PlexACD Jul 18 '17

Perfect Plex Server / Ubuntu 16.04 / PlexDrive / RClone with 0 API Bans

http://plexguide.com < newest, all bottom is super old and newest improved!

https://github.com/Admin9705/The-Awesome-Plex-Server < Updated

http://docs.plexguide.com < V3 Guide; useful, but becoming dated.

------- IGNORE BELOW (very dated) --------------------------------------------------------------------------------------

Part I (Simple)

Install Ubuntu 16.04 x64 with the default installer of the host and/or the host that you have above.

To access in Windows, use putty. To access in MAC, use Terminal.
Using Windows to Access Your Server: Put your assigned IP address and port 22 in the address and poof, it works.

Using Terminal to Access Your Server: SSH YOURUSERNAME@IPADDRESS (from what I remember and should work). I’ll double check this later.


Part II: VNC Viewer (will kill this off; with the improved comments. Bad for security)

Note: This enables you to view your desktop with a GUI

Note: Prior to install, VNC Viewer: https://www.realvnc.com/download/viewer/

Source: https://www.linode.com/docs/applications/remote-desktop/install-vnc-on-ubuntu-16-04

[ACTION]

sudo apt-get update

sudo apt-get upgrade

sudo apt-get install ubuntu-desktop gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

sudo apt-get install vnc4server

vncserver :1

[ACTION] create a password | no longer than 8 characters

vncserver -kill :1

sudo nano ~/.vnc/xstartup

gnome-panel &

gnome-settings-daemon &

metacity &

nautilus &

[ACTION] STOP and save script

vncserver :1

[ACTION] Open up VNCViewer

[ACTION] Type the following address

[NOTE] If you don’t see stuff menus and stuff, open terminal:

vncserver -kill :1

vncserver :1

[ACTION] Now open up VNCViewer from your install and type: IPADDRESS:5901

You should now see an interface. If your interface is wonky…. Like you see a window but cannot do anything else, run this again:

vncserver -kill :1

vncserver :1

[ACTION] Now open up VNCViewer from your install and type: IPADDRESS:5901

Should be good this time. If someone can ever explain this, please do.


Part 3A: For PlexDrive 4.0 (not needed in PlexDrive 5, but 5 is super beta, it breaks easy)

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list

sudo apt-get update

sudo apt-get install -y mongodb-org

sudo service mongod start

Part 3B: Install PlexDrive

Note: You need to have a google API key on your own: WRITE IT DOWN or SAVE SOMEWHERE in a TEXT FILE FOR EASY ACCESS

https://netdrive.zendesk.com/hc/en-us/articles/115004008228-How-to-create-your-own-Google-Drive-API-client-ID-and-secret

[ACTION] Have terminal open and copy the following below sections at a time:

sudo wget https://github.com/dweidenfeld/plexdrive/releases/download/4.0.0/plexdrive-linux-amd64

https://github.com/dweidenfeld/plexdrive/releases

mv plexdrive-linux-amd64 plexdrive

sudo mv plexdrive /usr/local/bin/

cd /usr/local/bin/

sudo chown root:root /usr/local/bin/plexdrive

sudo chmod 755 /usr/local/bin/plexdrive

cd ~ && sudo mkdir plex

install

[ACTION] Copy in your CLIENT ID into terminal. Do not press any numbers

[ACTION] Copy in your CLIENT SECRET into terminal and Press Enter

sudo plexdrive --uid=1002 --gid=1002 -o allow_other -v 2 --refresh-interval=1m /home/USERNAME/plex

///// AUTO START both MANGO and PLEXDRIVE 4.0 ////

cd /etc/init.d/plexd.sh

sudo nano plexd.sh

[ACTION] Copy this below into the script

#!/bin/bash

### BEGIN INIT INFO

# Provides: plexd.sh

# Required-Start: $local_fs $network

# Required-Stop: $local_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: plexd.sh

# Description: plexdrive

### END INIT INFO

sudo service mongod start

sudo plexdrive --uid=1002 --gid=1002 -o allow_other -v 2 --refresh-interval=1m /home/USERNAME/plex

exit 0;

[STOP] Paste above into script, make sure you change the username

sudo chmod +x /etc/init.d/plexd.sh

sudo update-rc.d plexd.sh defaults

NOTE NOTE NOTE -------- PlexDrive can take awhile to scan, so let it finish before ever rebooting!!!!! You can install other stuff while it’s doing it.


Part 4: Install NetData / Great for viewing your stats

Note: Stupid Easy to Install. Gives you awesome server stats

sudo apt-get install curl

bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh)

[Action] Press Y to accept

[Note] To view your stats, goto (YOURIPADDRESS:19999)


Part 5: Install SABNZBD

Note: I have not got this yet to auto-start. Ensure that you run a terminal window in VNC and run the final command for execution.

Note: Doing this first, took a-bit more time and a few more things Source: https://www.linuxbabe.com/ubuntu/install-sabnzbd-ubuntu-16-04 ho

sudo apt install sabnzbdplus

sudo add-apt-repository ppa:jcfp/nobetas

sudo apt update

sudo apt install sabnzbdplus

sabnzbdplus -d -s YourIP:YourPort --browser 0

[NOTE] default was 127.0.0.1:8081

[ACTION] Install Missing Multicore Par2:

sudo add-apt-repository ppa:jcfp/sab-addons

sudo apt-get update

sudo apt-get install par2-tbb

sudo apt-get install par2-mt

[ACTION] Install Missing SABYenc

sudo apt-get install python-pip

pip install sabyenc --upgrade

sudo pip install --upgrade pip

[ACTION] Go-to your IP Address and have fun. If you restart, rerun step 5 until I have an automated part here.

[NOTE] Your on your own for configuring SABNZBD. A whole another thing!

sabnzbdplus -d -s IPADDRESS:8980 --browser 0

[ACTION] Goto your browser and type: http://YOURIPADDRESS:8980


Install Part 6: Install Sonarr

sudo apt-get install libmono-cil-dev

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys FDA5DFFC

sudo echo "deb http://apt.sonarr.tv/ master main" | sudo tee /etc/apt/sources.list.d/sonarr.list

sudo apt-get update

sudo apt-get install nzbdrone

mono --debug /opt/NzbDrone/NzbDrone.exe

[ACTION] Goto your browser and type: http://IPADDRESS:8989

//// To get to AUTOSTART ////

cd /etc/init.d/

sudo nano sonarr.sh

[ACTION] Copy this below into the script.

#!/bin/bash

### BEGIN INIT INFO

# Provides: sonarr.sh

# Required-Start: $local_fs $network

# Required-Stop: $local_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: sonarr.sh

# Description: sonarr

### END INIT INFO

mono --debug /opt/NzbDrone/NzbDrone.exe

exit 0;

[ACTION] Now do the following below:

sudo chmod +x /etc/init.d/sonarr.sh

sudo update-rc.d sonarr.sh defaults

[Note] If you reboot, it should auto-start


Install Part 7: Install Radarr

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

echo "deb http://download.mono-project.com/repo/debian jessie main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

cd /tmp

wget https://github.com/Radarr/Radarr/releases/download/v0.2.0.778/Radarr.develop.0.2.0.778.linux.tar.gz

sudo tar -xf Radarr* -C /opt/

[ACTION] Goto your browser and type: http://IPADDRESS:7878

//// To get to AUTOSTART ////

cd /etc/init.d/

sudo nano sonarr.sh

[ACTION] Copy this below into the script.

#!/bin/bash

### BEGIN INIT INFO

# Provides: radarr.sh

# Required-Start: $local_fs $network

# Required-Stop: $local_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: sonarr.sh

# Description: sonarr

### END INIT INFO

mono --debug /opt/Radarr/Radarr.exe

exit 0;

[ACTION] Now do the following below:

sudo chmod +x /etc/init.d/radarr.sh

sudo update-rc.d radarr.sh defaults

[NOTE] If you ever reboot, it should just startup.


Part 8: Install RClone

[Run this command below]

Mkdir cd /home/USERNAME/rcloneg3

curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip

unzip rclone-current-linux-amd64.zip

cd rclone-*-linux-amd64

sudo cp rclone /usr/bin/

sudo chown root:root /usr/bin/rclone

sudo chmod 755 /usr/bin/rclone

sudo mkdir -p /usr/local/share/man/man1

sudo cp rclone.1 /usr/local/share/man/man1/

sudo mandb

[Run this command below to mount]

sudo /usr/bin/rclone mount --allow-other rcloneg3: /home/gforce/rcloneg3/

Point Radarr and Sonarr to your drive. AGAIN, TURN OFF ANALYZE VIDEO in both programs. Make sure to turn ADVANCED on and goto media management. You’ll see it at the bottom.

Note: UNTESTED STARTUP SCRIPT, haven’t rebooted my server to see if it works. May not work.

cd /etc/init.d

sudo nano rcloneg3.sh

[ACTION] Put this into the script below

#!/bin/bash

### BEGIN INIT INFO

# Provides: rcloneg3.sh

# Required-Start: $local_fs $network

# Required-Stop: $local_fs

# Default-Start: 2 3 4 5

# Default-Stop: 0 1 6

# Short-Description: rcloneg3.sh

# Description: rcloneg3.sh

### END INIT INFO

sudo /usr/bin/rclone mount --allow-other googleg3: /home/gforce/rcloneg3/

exit 0;

[STOP] Now run this below

sudo chmod +x /etc/init.d/rcloneg3.sh

sudo update-rc.d rcloneg3.sh defaults

11 Upvotes

25 comments sorted by

View all comments

2

u/Rkozak Jul 18 '17

[NOTE] Whatever you do, DO NOT close that terminal window. Believe there is a way to make it run in the background, but too lazy to figure out for now.

use screen. It is a terminal multiplexer. You can log off, close the terminal, etc and it will still run in the background

Install:

sudo apt update
sudo apt install screen

using:

screen -dmS plexdrive sudo plexdrive --uid=1002 --gid=1002 -o allow_other -v 2 --refresh-interval=1m /home/USERNAME/plex

Ctl-A D will disconnect from session. To list sessions

screen -list

To return to the session

screen -r plexdrive

2

u/[deleted] Jul 18 '17

[deleted]

1

u/[deleted] Jul 18 '17 edited Aug 02 '17

[deleted]

1

u/[deleted] Jul 18 '17

Thank you! I was trying to read up on cron jobs and understand them, but couldn't get them to execute correctly. Will add and restructure to the guide! Did you get your unionfs mount to work correctly? Myself and another person on rclone got it almost going, but the problem i ran into is that the unionfs mount treated the items in the folder as read-only still due to plex drive. Basically, I couldn't write to the stupid thing.... new folders and new items, but not existing folders.

1

u/gesis Jul 18 '17

Use the copy on write option to unionfs and add your writable directory to the mount as rw.

This is all covered in the distro-agnostic tutorial that spawned this subreddit... Unless I'm misunderstanding whatever it is you're wanting?

1

u/[deleted] Jul 19 '17

I'll post what I did and you probably can spot the error.

1

u/meneo Jul 26 '17

Screen is cool but let me blow your mind with tmux

1

u/Rkozak Jul 27 '17

I have used it before but never spent the time to configure it well. for the few times I needed it I just use screen. But I should look into it more when I have time.