Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Setup Guides

itsToggle edited this page Apr 17, 2023 · 15 revisions

Linux ARM64 Server Setup

This setup guide will follow the readme closely, but will go into more detail in some areas. This setup will utilize "screens", which are virtual Linux terminals.

0) Preperation:

  1. open a linux terminal
  2. run apt install screen
  3. run apt install git
  4. install python 3.XX if not present
  5. install pip if not present

1) Mounting realdebrid:

Please keep in mind that most debrid services dont allow you to access their service from multiple IP addresses in parallel. This is not an issue if you have a Plex server running, since everything you stream through plex (from any location, no matter how many in parallel) is routed through your servers IP address. While you have your plex server running though, you should not download from your debrid service in any other way than through plex.

  1. open a linux terminal
  2. run wget https://github.com/itsToggle/rclone_RD/releases/download/v1.58.1-rd.2.2/rclone-linux-arm64
  3. run chmod u+x ./rclone-linux-arm64
  4. run ./rclone-linux-arm64 config
  5. type n to create a new rclone remote
  6. type realdebrid to name your new remote "realdebrid"
  7. type 47 to choose the remote type "47) realdebrid"
  8. enter your realdebrid API key (https://real-debrid.com/apitoken)
  9. choose "no" when asked for advanced settings
  10. continue through the rest of the prompted instructions.
  11. type q to quit the rclone config menu.
  12. run mkdir torrents to create a directory named "torrents"
  13. run screen -S rclone to create a new virtual terminal named "rclone"
  14. press enter. You are now in the virtual terminal.
  15. run ./rclone-linux-arm64 mount realdebrid: torrents --dir-cache-time 10s --allow-other
  16. you should see the message "The service rclone has been started"
  17. press ctrl + a and then press d to exit out of the virtual terminal.
  18. run ls torrents to confirm that you can now see the 3 folders "default", "movies" and "shows". If you don't see anything or you get errors, run screen -r rclone to return to your virtual rclone terminal and investigate any errors.
  19. you have successfully mounted realdebrid. You can return to your virtual rclone terminal any time by running screen -r rclone.

2) Setup Plex:

follow any number of online guides on how to install and start your Plex server. Once the server is running and you have claimed it with your Plex account, follow these steps:

  1. open a linux terminal
  2. run chown -R plex:plex torrents
  3. open the Plex webUI
  4. create a new Plex library for movies, add the folders "/torrents/default" and "/torrents/movies"
  5. create a new Plex library for shows, add the folders "/torrents/default" and "/torrents/shows"
  6. Recommendation: disable 'video preview thumbnails', disable the scheduled task 'perfom extensive media analysis' to reduce the download traffic
  7. Disable the libary setting "Empty trash after every scan", to make sure that no content is removed accidentaly

3) Setup plex_debrid:

  1. open a linux terminal
  2. run git clone https://github.com/itsToggle/plex_debrid
  3. run pip install -r ./plex_debrid/requirements.txt
  4. run screen -S plex_debrid to create a new virtual terminal named "plex_debrid"
  5. press enter. You are now in the virtual terminal.
  6. run python ./plex_debrid/main.py
  7. follow the setup instructions
  8. choose option "1) Run" to run the download automation
  9. press ctrl + a and then press d to exit out of the virtual terminal. You can return to the terminal any time by running screen -r plex_debrid

Linux Server Setup

This setup guide will follow the readme closely, but will go into more detail in some areas. This setup will utilize "screens", which are virtual Linux terminals.

0) Preperation:

  1. open a linux terminal
  2. run apt install screen
  3. run apt install git
  4. install python 3.XX if not present
  5. install pip if not present

1) Mounting realdebrid:

Please keep in mind that most debrid services dont allow you to access their service from multiple IP addresses in parallel. This is not an issue if you have a Plex server running, since everything you stream through plex (from any location, no matter how many in parallel) is routed through your servers IP address. While you have your plex server running though, you should not download from your debrid service in any other way than through plex.

  1. open a linux terminal
  2. run wget https://github.com/itsToggle/rclone_RD/releases/download/v1.58.1-rd.2.2/rclone-linux
  3. run chmod u+x ./rclone-linux
  4. run ./rclone-linux config
  5. type n to create a new rclone remote
  6. type realdebrid to name your new remote "realdebrid"
  7. type 47 to choose the remote type "47) realdebrid"
  8. enter your realdebrid API key (https://real-debrid.com/apitoken)
  9. choose "no" when asked for advanced settings
  10. continue through the rest of the prompted instructions.
  11. type q to quit the rclone config menu.
  12. run mkdir torrents to create a directory named "torrents"
  13. run screen -S rclone to create a new virtual terminal named "rclone"
  14. press enter. You are now in the virtual terminal.
  15. run ./rclone-linux mount realdebrid: torrents --dir-cache-time 10s --allow-other
  16. you should see the message "The service rclone has been started"
  17. press ctrl + a and then press d to exit out of the virtual terminal.
  18. run ls torrents to confirm that you can now see the 3 folders "default", "movies" and "shows". If you don't see anything or you get errors, run screen -r rclone to return to your virtual rclone terminal and investigate any errors.
  19. you have successfully mounted realdebrid. You can return to your virtual rclone terminal any time by running screen -r rclone.

2) Setup Plex:

follow any number of online guides on how to install and start your Plex server. Once the server is running and you have claimed it with your Plex account, follow these steps:

  1. open a linux terminal
  2. run chown -R plex:plex torrents
  3. open the Plex webUI
  4. create a new Plex library for movies, add the folders "/torrents/default" and "/torrents/movies"
  5. create a new Plex library for shows, add the folders "/torrents/default" and "/torrents/shows"
  6. Recommendation: disable 'video preview thumbnails', disable the scheduled task 'perfom extensive media analysis' to reduce the download traffic
  7. Disable the libary setting "Empty trash after every scan", to make sure that no content is removed accidentaly

3) Setup plex_debrid:

  1. open a linux terminal
  2. run git clone https://github.com/itsToggle/plex_debrid
  3. run pip install -r ./plex_debrid/requirements.txt
  4. run screen -S plex_debrid to create a new virtual terminal named "plex_debrid"
  5. press enter. You are now in the virtual terminal.
  6. run python ./plex_debrid/main.py
  7. follow the setup instructions
  8. choose option "1) Run" to run the download automation
  9. press ctrl + a and then press d to exit out of the virtual terminal. You can return to the terminal any time by running screen -r plex_debrid

Windows Setup

This setup guide will follow the readme closely, but will go into more detail in some areas.

0) Preperation:

  1. install python 3.XX
  2. install pip (https://pypi.org/project/pip/)
  3. install winfsp (https://winfsp.dev/)

1) Mounting realdebrid:

Please keep in mind that most debrid services dont allow you to access their service from multiple IP addresses in parallel. This is not an issue if you have a Plex server running, since everything you stream through plex (from any location, no matter how many in parallel) is routed through your servers IP address. While you have your plex server running though, you should not download from your debrid service in any other way than through plex.

  1. download the latest 'rclone.exe' file from here: https://github.com/itsToggle/rclone_RD/releases
  2. create a folder on your desktop named "rclone" and open it
  3. copy the downloaded "rclone.exe" file to that folder.
  4. windows 10: in the opened windows explorer, click on the "file" ribbon and then click on "open PowerShell here" to open a terminal windows 11: right-click on the "rclone" folder on your desktop. Press and hold the shift key on your keyboard and click on "show more options". Select "Open PowerShell here". A terminal opens.
  5. inside the terminal, write the command ./rclone.exe config and press enter
  6. type n to create a new rclone remote
  7. enter realdebrid as the name of the remote
  8. enter 47 to choose the "realdebrid" remote type
  9. enter your realdebrid API key (https://real-debrid.com/apitoken)
  10. choose no when asked to edit the advanced configuration
  11. follow the rest of the prompted instructions
  12. enter q to quit out of the rclone config menu
  13. enter ./rclone.exe cmount realdebrid: X: --dir-cache-time 10s to mount realdebrid. A new virtual computer drive with the letter X named realdebrid should show up on your computer. You should find 3 folders inside it, "movies", "shows" and "default".
  14. keep the terminal opened in order to keep rclone running. If everything works and you want to run rclone in the background, you can close the terminal and open it again like described in step 4. Now run the command ./rclone.exe cmount realdebrid: X: --dir-cache-time 10s --no-console. The console should close and rclone should run in the background. For an autostart routine for both rclone and plex_debrid check out: https://discord.com/channels/1021692389368283158/1021692389812871169/1072245007723020348

2) Setup Plex:

  1. follow any number of online guides on how to install and start your Plex server. Once the server is running and you have claimed it with your Plex account, follow these steps:

  2. open the Plex webUI

  3. create a new Plex library for movies, add the folders "X:/default" and "X:/movies"

  4. create a new Plex library for shows, add the folders "X:/default" and "X:/shows"

  5. Recommendation: disable 'video preview thumbnails', disable the scheduled task 'perfom extensive media analysis' to reduce the download traffic

  6. Disable the libary setting "Empty trash after every scan", to make sure that no content is removed accidentaly

3) Setup plex_debrid:

  1. open https://GitHub.com/itsToggle/plex_debrid click on "code" (top right) and then "download zip". Extract the downloaded zip to your desktop, which should create a "plex_debrid" folder. In this folder you should find multiple files.
  2. windows 10: open the "plex_debrid" folder. in the opened windows explorer, click on the "file" ribbon and then click on "open PowerShell here" to open a terminal windows 11: right-click on the "plex_debrid" folder on your desktop. Press and hold the shift key on your keyboard and click on "show more options". Select "Open PowerShell here". A terminal opens.
  3. inside the terminal, enter the command pip install -r requirements.txt and press enter
  4. start the script inside this terminal by running the command python ./main.py
  5. follow the prompted instructions and the main readme from here.
  6. For an autostart routine for both rclone and plex_debrid check out: https://discord.com/channels/1021692389368283158/1021692389812871169/1072245007723020348

Docker Setup

This setup guide will follow the readme closely, but will go into more detail in some areas.

0) Preperation:

  1. install docker

1) Mounting realdebrid:

Please keep in mind that most debrid services dont allow you to access their service from multiple IP addresses in parallel. This is not an issue if you have a Plex server running, since everything you stream through plex (from any location, no matter how many in parallel) is routed through your servers IP address. While you have your plex server running though, you should not download from your debrid service in any other way than through plex.

  1. run sudo mkdir -p ~/rclone/config
  2. run sudo mkdir -p ~/rclone/cache
  3. determine your systems architecture (amd64 or arm64). If you are using a PI or oracle, your architecture is arm64. If you are using a desktop PC, your architecture is amd64.
  4. run docker plugin install itstoggle/docker-volume-rclone_rd:amd64 args="-v" --alias rclone --grant-all-permissions config=~/rclone/config cache=~/rclone/cache (here amd64 architecture was used - replace amd64 with arm64 in the command if needed)
  5. run docker volume create realdebrid -d rclone -o type=realdebrid -o realdebrid-api_key=your-api-key-here -o allow-other=true -o dir-cache-time=10s (replace your-api-key-here with your realdebrid api key which you can find on https://real-debrid.com/apitoken)
  6. to check if the volume has been created successfully, run docker run --rm -i -v=realdebrid:/tmp/myvolume busybox find /tmp/myvolume - you should see your torrent files from realdebrid.com/torrents being printed.
  7. you have successfully created a realdebrid docker volume. You can now mount this volume into any docker container.

2) Setup Plex:

follow any number of online guides on how to install and start your Plex server docker container. Once the server is running and you have claimed it with your Plex account, follow these steps:

  1. attach the realdebrid volume to your plex docker container using the flag -v=realdebrid:/torrents in your plex containers "run" command. If you are using compose for your plex container, add the realdebrid volume similar to this:
version: '3'
services:
    pms-docker:
        image: plexinc/pms-docker:plexpass
        container_name: plex
        ports:
            - ...
        volumes:
            - ...
            - realdebrid:/torrents        

volumes:
    realdebrid:
        external: true
  1. start your plex container
  2. open the Plex webUI
  3. create a new Plex library for movies, add the folders "/torrents/default" and "/torrents/movies"
  4. create a new Plex library for shows, add the folders "/torrents/default" and "/torrents/shows"
  5. Recommendation: disable 'video preview thumbnails', disable the scheduled task 'perfom extensive media analysis' to reduce the download traffic
  6. Disable the libary setting "Empty trash after every scan", to make sure that no content is removed accidentaly

3) Setup plex_debrid:

  1. run docker pull itstoggle/plex_debrid
  2. run docker run -v /path/to/config:/config --net host -ti itstoggle/plex_debrid . Where /path/to/config is the directory path where you want to save your plex_debrid config data
  3. follow the setup instructions
  4. choose option "1) Run" to run the download automation

Android (Nvidia Shield) Setup

provided by discord user @bunny, huge shout-out to him!

Please note that this readme only includes some setup assistance for Nvidia Shield TV Pro. Check the main branch for a more detailed readme regarding the actual plex_debrid usage!

If you have any troubles with any part of this project, please come join us on the Plex_Debrid discord and we are more than happy to help you out!

Prerequisites

The next few steps assume you have a rooted Nvidia Shield TV Pro.

If your Shield is not yet rooted, please check out the guides provided by the geniuses over at the XDA forums: https://forum.xda-developers.com/t/patched-boot-imgs-achieve-root-on-stock-firmware-and-keep-ai-upscaling.4524873/.

This guide assumes basic knowledge of Magisk, ADB and other Android tools. If your device is not yet rooted, you will learn all about these as you go through the process. If you rooted your device a while ago, and may be a bit rusty, head over to https://forum.xda-developers.com/c/nvidia-shield-tv-shield-tv-pro-2019.9577/.

You may want a mouse and keyboard plugged into your shield for this. Alternately, the Shield App has good trackpad and typing functionaliyt.

Instructions

Step 1: Downloads

On your PC download the following:

On your Shield install File XPlore from the Google Play Store (This is what we will use to install all the above)

Step 2: Prepare your rclone file

Note, we haven't managed to get itsToggle's rclone fork working just yet, so are using original rclone and webdav.

First things first, let’s get you prepared to mount your debrid service. Do this by getting your rclone config file ready to go.

On your shield:

  1. Create a folder anywhere you like called /.rclone/
  2. Install rclone on your computer and run the config, then grab the config file from C:\Users\you\AppData\Roaming\rclone and save it into your new /.rclone/ folder (this step is necessary because the config encrypts your password)

Tip: You can run the config through a WebGUI if you're more comfortable with that.

Step 3: Load your software onto the Shield

I found the easiest way to load items onto the shield was with the inbuilt ‘network haring’ functionality.

To do this, using your shield navigate to the settings menu and then to 'sharing'. Enable 'network sharing'. Clicking into here will show you credentials you can use to access the Shield from your file explorer on your PC.

Put the files you downloaded before onto your Shield:

  • Magisk (.apk)
  • Rclone Magisk Module (.zip)
  • Termux (.apk)
  • Safetynet Fix (.zip)

Put your /.rclone/ folder containing your conf file on the root folder.

4) Install Magisk

Using File Xplore, install the Magisk apk file. This will walk you through steps for installation.

4) Install Magisk Modles

Using Magisk, install your Rclone and Safetynet modules.

When installing Rclone you should get a message saying the drive has been mounted successfully.

If you got an error that your config file could not be loaded, please double check that all the details are correct. You can try running rclone config through Termux and see how you go, but run pkg update and termux-setup-storage beforehand.

3) Set up Plex

On shield

  1. Set up Plex for the first time on your Shield

On your PC: 3) Create a plex 'movie' library of the mounted virtual drive or add the virtual drive to an existing 'movie' library. (/mnt/cloud/your-remote) 4) Create a plex 'shows' library of the mounted virtual drive or add the virtual drive to an existing 'shows' library. (/mnt/cloud/your-remote)

Recommendation: disable 'video preview thumbnails', disable the scheduled task 'perfom extensive media analysis' to reduce the download traffic

4) Set up plex_debrid

On Shield, using Termux

  1. run command 'apt update && pkg update'
  2. run command 'pkg install python'
  3. run command 'pkg install git'
  4. run command 'termux-setup-storage', allow the permission
  5. run command 'git clone https://github.com/itsToggle/plex_debrid'
  6. run command 'pip install -r plex_debrid/requirements.txt'
  7. run command 'python plex_debrid/main.py'
  8. The script will guide you through the initial setup.
  9. Choose option '1' to run the download automation. Choose option '2' to explore or edit the Settings.

You're done! Read the rest of the main README for more detailed settings and info.