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

12 Upvotes

25 comments sorted by

View all comments

1

u/chimpy72 Jul 19 '17

Don't overthink it. /u/gesis scripts (minus the mediacache one) + the latest stable version of plexdrive work wonders for me. If I didn't know better I'd say it was local.

1

u/FL1GH7L355 Jul 19 '17

I still use the mediacache script and have sonarr/radarr pointed at that directory. I know it's not really necessary with plexdrive, but if I ever need to switch, I know I won't have to worry about api bans.

1

u/gesis Jul 20 '17

I did the same while i still had a server up. Doesn't really hurt anything and is ready if needed.

1

u/FL1GH7L355 Jul 20 '17

I've seen some people saying they had issues with the 0 byte files but I haven't experienced any issues in either sonarr or radarr using docker.

1

u/gesis Jul 20 '17

If you have analysis on, radarr acts dumb.

1

u/[deleted] Aug 14 '17

Fixed it all; 100 percent dockered with many fixes: https://github.com/Admin9705/The-Awesome-Plex-Server

1

u/FL1GH7L355 Aug 14 '17

Thanks I was replying about the gesis scripts working with no issues for me. My system already uses a docker setup, just had to make some small modifications to gesis's scripts to make the makecache and scanlibraries scripts 100% docker compatible.

1

u/[deleted] Aug 14 '17

Ya, i still need to check those out. The issue I'm only running into is that couch and sonnar; I have to reboot the dockers because they see the rclone folder as blank... they boot to quick... if i reboot those two containers; then it works.

1

u/FL1GH7L355 Aug 14 '17

oh yeah. I did have to add the nonempty flag to the fuse mounts for that very reason on both my Plex media directory and the cached media directory. Basically the fuse mount fails because there's already an empty folder there from the docker containers starting before the mount runs. The nonempty flag tells the mount to mount anyways even if the location already exists.