Install Plex Debrid on Raspberry Pi 4/3 (Visual Guide)

Divitia
5 min readJun 28, 2023

--

In the era of digital content streaming, the combination of Plex and Real Debrid offers a unique and powerful solution. This tutorial will provide a step-by-step guide to setting up Plex Debrid on a Raspberry Pi 4, based on the plex_debrid GitHub repository instructions.

Plex Debrid: The Streaming Revolution

Plex Debrid enables you to stream content from various torrent sources using Debrid services, including Real Debrid. It works in harmony with your personal media server (like Plex) and utilizes services such as Plex Discover, Trakt, and Overseerr. This lets you add your favorite movies and shows to your watchlist, making them instantly available for streaming.

A Plex Debrid setup comprises three main components:

  1. Rclone (or rclone_rd): This software makes your operating system believe that files from your Debrid service are stored locally. However, in reality, they’re streamed as you open them. This is why the content becomes available almost immediately, and it feels like you have unlimited storage.
  2. A personal media server like Plex: This allows you to watch these files from any location on any device at https://www.plex.tv/media-server-downloads/
  3. Real Debrid API Key: Sign up at https://real-debrid.com/.
  4. The plex_debrid script: This integrates everything and provides a straightforward way to add media content to your debrid service.

Preparation

Launch a Linux terminal on your Raspberry Pi 4 and enter the following commands:

sudo apt update
sudo apt install screen git python3 python3-p
sudo apt update

Mounting Real Debrid:

Please note that most Debrid services don’t let you access their service from multiple IP addresses simultaneously. This isn’t a problem with a running Plex server as all Plex streams are routed through your server’s IP address.

To mount Real Debrid, execute these commands in your Linux terminal:

wget https://github.com/itsToggle/rclone_RD/releases/download/v1.58.1-rd.2.2/rclone-linux-arm64
sudo chmod u+x ./rclone-linux-arm64
sudo ./rclone-linux-arm64 config
wget https://github.com/itsToggle/rclone_RD/releases/download/v1.58.1-rd.2.2/rclone-linux-arm64
chmod u+x ./rclone-linux-arm64
./rclone-linux-arm64 config

In the rclone config menu, follow these steps:

  • Type ’n’ to create a new rclone remote
  • Name your new remote “realdebrid”
  • Choose the remote type “47) realdebrid” by entering 47
47) realdebrid
Real Debrid API key
  • Choose “no” when asked for advanced settings
  • Continue through the rest of the prompted instructions.
Continue through the rest of the prompted instructions.
  • Type ‘q’ to exit the rclone config menu

Next, create a directory and start a new screen session:

sudo mkdir torrents
screen -S rclone
mkdir torrents
screen -S rclone

Now, mount your remote in the new screen session:

sudo ./rclone-linux-arm64 mount realdebrid: torrents --dir-cache-time 10s --allow-other

You should see something like this which is completely normal.

mount your remote

Press Ctrl + a, then d to detach from the screen session. To verify that you've successfully mounted Real Debrid, use ls torrents. If you see the folders "default", "movies", and "shows", you've done it right!

folders “default”, “movies”, and “shows”

Setting Up Plex:

Once your Plex server is up and running, and you have claimed it with your Plex account, follow these steps:

Open a terminal and run the command sudo chown -R plex:plex torrents

chown -R plex:plex torrents

In the Plex webUI, create a new Plex library for movies and shows, adding the folders “/torrents/default” and “/torrents/movies” to Movies library and “/torrents/default” and “/torrents/shows” to the Shows library.

“/torrents/movies” to Movies library

Setting Up Plex Debrid:

In your Linux terminal, clone the Plex Debrid repository and install its requirements:

git clone https://github.com/itsToggle/plex_debrid
clone the Plex Debrid repository
pip install -r./plex_debrid/requirements.txt
install its requirements

Next, initiate a new screen session and run the Plex Debrid main script:

screen -S plex_debrid
python ./plex_debrid/main.py
Follow the setup instructions that appear

Follow the setup instructions that appear.

Select Plex
username

To get the user token go to https://plex.tv/, Sign In and then in the same tab go to https://plex.tv/devices.xml

How to get the Plex token

Keep following the instructions and choose all the default values. To start the download automation, choose option “1) Run”.

Voila! You’ve successfully set up Plex with Real Debrid on your Raspberry Pi 4. This setup provides a robust streaming solution, maximizing the advantages of both platforms. Although the initial setup may seem a bit technical, the remarkable improvements in your streaming experience and content availability make it worth the effort. Enjoy your upgraded streaming experience!

--

--

Divitia

Helped hundreds achieve financial freedom. With 12 years of experience, I try to share proven strategies for building wealth & achieving financial independence