Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[GUIDE] Setup Real-Debrid for Plex Using CLI_Debrid, Rclone, and Zurg

Featured Replies

This guide is meant for the typical unRAID user who is somewhat aware what Debrid is. In a nutshell, Debrid allows you to build an unlimited size media library that is stored in a "cloud". It will stream from the cloud - behind the scenes, it uses torrent technology. You can consume this media using your Plex docker. Movies and Shows will show up as expected in the UI as recently added items in your library. I believe people  out there have a completely remote libraries - with nothing stored locally.

 

PLEASE CHECK BACK OFTEN FOR CLARIFICATIONS, TIPS, AND UPDATED INFO

I will add notes right below when something is added.

 

🤩 EDIT 3/25/25:

I keep having conversations with avid users of this Debrid method and it is a VERY powerful thing. Below you will hear me mentioning about only wanting 1080p content. If you have a good internet connection, and the proper TV, you could be watching media at 4K Blue-ray Remux DV quality where the media files can be anywhere between 60GB and 120GB+. I tested last night and w/ my 1GB internet, and a 60GB file played smoothly. The beauty of this is that no files are stored in your system. It is not uncommon for folks to have libraries with over 10,000 items. See further explanation in the Tips section of this guide.

 

😁 EDIT 3/31/25: Versions / Quality

More on Version and Qualities in Tips section below.

 

 

 

==============================================================================================================

 

Those on Kodi, may be more familiar with the use of Debrid and add-ons like Fen, Seren, The Crew, Umbrella, etc. The best part of this is that you can simply search for what you want to watch, and then you select the quality and away it goes. There are also curated lists, and lists of most recent, popular, trending, award winners, etc. For this method, one has to add the desired media, and it will add it. Much like it's done with Radarr/Sonarr. Unfortunately, Plex does not have something similar.... enter this guide.

 

IMPORTANT:

I am NOT an expert on this. It is a very complex system with many parts working together. One small mistake and it will not work. It has taken me about two weeks to put together. My success is all thanks to godver3, who is the author of the amazing package "CLI_Debrid".  Thanks also to @mash2k3 for creating the docker template and for his help on the Zurg and Rclone scripts. This guide is meant to be followed to the letter. Currently there is no comprehensive guide out there to implement. I am NOT going to explain what all the pieces are, as I am NOT an expert. I simply managed to get it all done. I am likely not able to help much if you run into issues. Hopefully others can chime in. You can always go to CLI_Debrid's Discord channel for help.

 

I am sure I have have not done things 100% correctly. But it works. Again, I am not an expert.

 

I have created a package in my Github of files needed for this. You need to be able to be comfortable with the command line, and have more than passing knowledge working in unRAID.

 

Things you need:

  • An installed and functioning Plex Media Server docker from lsio.
  • Install the rclone plugin obtained from CA, get the Waseh version.
  • A paid account from Real-Debrid, it's cheap at around $10 for 3 months.
  • Install the CLI_Debrid docker available in CA. Template by "mash2k3". IMPORTANT, when installing, choose the godver3/cli_debrid:dev version. Latest version will NOT work.
  • Download the zip file from my repo here. I'll explain what to do with it later.
  • Download the zurg binary form your the zurg-testing repo here. Download the zip file for the latest version of zurg-v0.9.xxx-final-linux-amd64.zip
  • Install the Overseerr docker from CA by linux server. I will show you settings later on. You are responsible for proxying this Docker if you want it available from outside your network.
  • User Scripts plugin in unRAID. This assumes you know how to use it.

 

IMPORTANT CAVEAT

For my Debrid media consumption, I really am interested in Debrid media at 1080p resolution. Some of my configuration below will reflect this. This doesn't mean it is limited to those. After you get going, you can explore CLI_Debrid and the MediaFusion settings to change this. I have not tried getting other resolutions.

 

ANOTHER VERY IMPORTANT CAVEAT:

I have my /appdata stored in a drive pool called cahe... this was the norm w/ unRAID for a long time, and stuck to it. With the advent of multiple pools, it may be the case where your appdata is NOT located at /mnt/cache/appdata. If this is the case, you will need to adjust my instructions below to account for this.

 

Step 1 - Create a share and a folder in /mnt/cache/appdata

 

Create User Share

In unRAID's Web UI, go to Share and create a new root share. Name this share "zurg". 

 

image.png.de6e8c2118114242bdd968e9f64cce85.png

 

In this new share, we are going to be mounting (via rclone) a folder that your Real Debrid account creates for you out in the cloud somewhere. Not that it matters for our purposes, but I believe this remote folder stores a torrent file that is linked to the actual media file you want. Please configure your share as below. Remember this folder is NOT store in unRAID; it is only mounted. No need to back the folder up, no need to store, or move it to the array.


In my example, I am mounting this folder to my "DownloadCache" pool. I strongly advise NOT mounting it on the array. I cannot guarantee it it will work on the array. This folder is NOT meant to be touched. Do not put or manipulate files in there; do not copy or erase files from it. Note that I am sharing it as NFS and SMB:

 

image.thumb.png.5fde53a832c0857856623cb512680046.png

 

Create and Configure the Zurg Folder in Appdata

Go to your appdata folder... and create a new folder called "zurg". So in my case it is in /mnt/cache/appdata/zurg/

 

Download the latest zurg binary from the Zurge-Testing repo here. Extract the single file named zurg and place it in this folder. I am linking to file directly, but if you land on the repo, this is the file you need:

image.png.aa619d5dd2dd78b955cc8a145d35d4d8.png

 

Also, into this folder, copy the zip file you download from my repo above. After extracting the zip file, you should end up with this:

image.png.a348dcd5abd2c73c3b5e01943c0b91be.png

 

Edit the file rclone.conf and change the IP to your unRAID's internal IP:

image.png.8974f21ff6dbb119f9d20d4af500b6d2.png

 

Edit the file config.yml to add your Real Debrid AP Private Token. After you have set up your paid Real Debrid account, the API key can be located at this link:

https://real-debrid.com/devices

Edit the config.yml :

image.png.9a1cd5304b336fc840eb05c9446c1840.png

 

Edit the file plex_update.sh

There are three things that need to be changed and verified:

  1. Change the Plex IP and port to match your setup
  2. Paste your Plex Token... If you don't know how to do this, follow this link.
  3. Make sure that the zurg user share you created earlier is properly found in your unraid at /mnt/user/zurg. If it does not, fix it please. Do NOT change the zurg_mount value in the script file.

 

image.png.d667121c2f3a2d8c376104e83cc8c472.png

 

In unRAID, open a terminal window and type the following commands - One line at a time:

cd /mnt/cache/appdata/zurg

chmod +x zurg

chmod +x plex_update.sh

 

Create User Scripts that Launch and Kill Rclone and Zurg

 

Zurg is an application that takes the Real Debrid stuff, and makes it so that Plex can interpret the data and properly shows in Plex. That is the extent of my knowledge. It is required. Rclone mounts the remote Real Debrid cloud folder to a share in your server. In our case, this will be mounted into /mnt/user/zurg. Very important.

 

As of this writing, no unRAID docker template exists for this. The required items to make these two run, is what we stored in /mnt/cache/appdata/zurg. To automatically launch Zurg and the Rclone share, we are going to create User Scripts specifically do this. We will be creating three separate scripts.

 

image.png.8bab8335e5323fad70229c7721697c94.png

 

For the Start Zurg Service script, paste this:

#!/bin/bash
cd /mnt/user/appdata/zurg
chmod 777 zurg
/mnt/user/appdata/zurg/./zurg &

Please make sure the schedule is set to "At Starting of Array". If you ever want to manually launch this script form the User Scripts page, you MUST click on RUN IN BACKGROUND.

 

 

For the Start Zurg Rclone Mount script, paste this:

#!/bin/bash
sleep 10
rclone mount zurg-wd: /mnt/downloadcache/zurg --dir-cache-time 20s --config=/mnt/user/appdata/zurg/rclone.conf --allow-other --allow-non-empty --gid 100 --uid 99 --daemon

Please note in the script above, I am actually specifying the actual pool folder and NOT the user share. I did this in case the array has not completed starting when the script is executed. Please change my /mnt/downloadcache/zurg to the actual drive you are using to house this mount. Please make sure the schedule is set to "At Starting of Array". If you ever want to manually launch this script from the User Scripts page, you MUST click on RUN IN BACKGROUND.

 

For the Zurg-UNMOUNT Drive script, paste this:

#!/bin/bash
pkill zurg
sleep 2
fusermount -uz /mnt/downloadcache/zurg

Please make sure the schedule is set to "At Stopping of Array". Some explanations here. This is meant to run once you execute an Array Stop. If you were to try to stop the array without this, you would end up in a dreaded "Retry un-mounting disks" situation. This will require an unclean reboot/shutdown of your server and will cause a parity check when you start back up. We also need to stop the zurg process from running. This is running in the background and must be stopped in order to not get the unclean shutdown. Also please note the script needs to reference the actual path of the zurg folder. I have mine at /mnt/downloadcache/zurg. Please change this accordingly.

 

After firing the first two scripts (remember the third kills what we are starting), you can check they are both properly running by going to your /mnt/user/zurg folder, and you should see this:

 

image.png.eb9f74b2df2fcfd6614e95e0f0848dff.png

 

Also in your web browser, navigate to http://192.168.0.XXX:9999 (change your IP). You should see a zurg status page (nothing gets configured here).

image.png.7fbf15a6a7e82c2a74b180ff9ba9b946.png

 

 

YOU MUST SEE THE ABOVE BEFORE CONTINUING

If you see these, wonderful, consider yourself lucky - I spent about 2 weeks trying to get this to work. However, we still have a long way to go. If you do NOT see these items in the folder, retrace all the steps above. If that does not work, I may need the help of others to figure out why. If you ultimately cannot get this to work, there is no point going forward with this guide.

 

Step 2 - The Setup of Dockers

The paths and references, so that all the dockers talk to each other properly, are VERY important. Please follow the below carefully. In some occasions, you will need to add additional paths to some of the existing Docker templates.

 

Plex Media Server:

Unfortunately, this is NOT compatible with Jellyfin or Emby. The CLI_Debrid docker is not yet compatible with these. I assume you already have Plex running with locally stored Movie and TV Show libraries. We need to configure Plex with additional libraries to include the rclone mounted Debrid media. This media will appear in your /mnt/user/zurg folder. Movies show up as single .mkv files, all stored in one big folder. They will also show up in the __all__ folder. This is normal, and you should NEVER try to manually organize this.

 

Edit your Plex template and ADD the highlighted path:

image.thumb.png.e0ef12b4d9f3b375ec834037a5ead083.png

 

Start Plex and go to Settings > Manage > Libraries. We are going to add two new libraries. One for the Debrid Movies and one for the Debrid TV Shows. In my screepcap below, I have already added the two libraries.

 

image.png.1637cc442add0efcbb738b9fe99ba77f.png

 

To add libraries,

Movies

1) Click Add Library. On the screen that pops up, select Movies and name the library Movies-DB. Click Next...

image.png.b739c033c6468abd08025ff291059df4.png

 

2) Click on Browse Folders for library, and select /data/movies. Remember this is the mounted rclone folder.

image.png.073971043f3bd8e0dc542063b18008b7.png

 

On the Advanced tab, make sure you have the below options set.

image.png.dd5557079f9f7f87cf5e58c7b9b5295c.png

 

TV Shows

Similar to the process above, except:

  • Call the new library TV Shows-DB
  • Select library type as TV Shows
  • Point to the folder /data/shows

 

It will scan those new folders for content; but as a newbie, you probably don't have any media yet.

 

When looking at all your Libraries, click on the little movie icon to the right of Movies-DB to expand the options. Please match all the checks shown below:

image.png.781608e1781092314b61ec7104faad85.png

 

Repeat this for the TV Shows-DB library

 

OPTIONAL:

If you want Debrid Movies and TV Shows in your Recently Added elements of your Plex Home page showing both your local media and you Debrid media, follow the below:

 

Go back to your Plex Home Page, and on the right side menu select More:

image.png.ec687fcb1b698107d079177f4393efaa.png

 

Click on the Movies-DB library, click on the three dots, and select Pin

image.png.01b6d06d7071a12637188aae3f08ddfd.png

 

Repeat for the TV Shows-DB.

 

It should look something like the below. Click on the "< Pinned" item to return to the Home menu.

image.png.5fff3c5d6cc57ae2cb9a1bd8b4d0b826.png

 

End of OPTIONAL.

 

In Plex > Settings > Settings > Library make sure you have the below items ticked:

image.png.ea50c8a34ad4694f5df3120843cb46ae.png

 

Overseer:

If you already use Overseer, and you use Radarr/Sonarr with it, you may want to create a new Overseerr docker for Debrid only use. I will assume that you are not using Overseerr at the moment or with Sonarr/Radarr or torrents.... There is nothing to change to the default Overseerr docker template. 

 

Overseer allows you to have your Plex users request and add media to your collection. You are the Admin, and you can individually allow your Plex friends to request/add. Overseer gives you the following options to you and your users  

  • Add TV/Movies directly without your approval
  • Allows user to request, but you have to approve their requests
  • Allows you and your to automatically request what is on their Plex watch list
  • Users log in via their Plex account.
  •  

You can configure Overseer as you see fit. In my case, I have a two users that can automatically add their requests and what is on their watch list. I will paste my Settings screens below based on this. I will also highlight CRITICAL settings as well. If screen is not included below, you can leave w/ default values.

 

image.thumb.png.1ebd53c90a61a31e16a222947299b53a.png

 

image.thumb.png.7cba795388ad8628da795ed4fff6adec.png

 

image.thumb.png.505bd3ba5ab6f8193ac17ec03f91826e.png

 

image.thumb.png.e79a3e803bc6ec025933812c4660dd9d.png

 

image.png.8e5eedb648033819232a37077a23185d.png

 

As mentioned above, we will need to return to Overseer once we do some stuff.

 

CLI_Debrid Docker:

This makes the magic happen. In unRAID go to Community Apps, search for "CLI_Debrid" and click install. On the Docker setup screen match this:

image.thumb.png.c74934c23caa40784600bdbcd6c066cc.png

 

It is possible that the Path I am highlighting above does not exists (I can't recall, and I don't want to bork my installation). If it does not exist, add it. Change your Time Zones per your location.

 

OPTIONAL: This is a very hernandito thing. I am manic compulsive obsessive over icons. I created a new icon for this Docker. If you want, you can use what I use. Enable Advanced Setting in the docker setup page and paste:

https://i.imgur.com/3TduuDn.png

image.png.6d2d690f6165a9b09f5fd75ef6129b5d.png

 

Click to add the docker.

 

Once the Docker is started, go to its web ui on port :5000.

 

IMPORTANT: You will be presented with a big dialog about using a new Phalanx database option. Please pick to NO. Disable. I could not get things to work with this option enabled.

image.thumb.png.fc786e005341f633cf946ce5a9249324.png

 

You will be presented with a Wizard to set up... again no screencap... try to muddle through the options. I believe the options is asking are all changeable in the Settings pages, which I will post below. Once you are in the home screen, please make sure the button on the top-right is green like picture below. You will not be able to change settings if this is running:

image.png.fb49fb568697a5715b83b097b18e1dc0.png

 

Then please navigate to the Settings screen. On center top menu go to System > Settings. 

image.png.f37c06dfb6278b032224f3d8ee9219d7.png

 

Below are the settings you need to apply. I will highlight special instructions on the screens below. Please make sure you Save Settings before changing tabs.:

 

Required Settings:

image.thumb.png.0a6705ebc2c2977baca9b0e0bd5563d8.png

 

Scrapers:

Add two scrapers. One will be a Zilean scraper, the other one is MediaFusion. For the Zilean configuration, enter https://zilean.elfhosted.com

image.thumb.png.59cfd44b602905f4153e3b3299bd889c.png

 

For MediaFusion, go to this web site. https://mediafusion.elfhosted.com/configure. As I mentioned earlier, I only want 1080P content. You can experiment with other choices, but I dont know what will result.

 

image.thumb.png.e083ce6b6813df0c0f4699ee29676a10.png

 

Now return to your CLI_Debrid Settings > Scrapers (second from the above screen capture) and click on the URL: field for MediaFusion. Then paste the code that was placed in your clipboard by the MediaFusion web site. Save Settings.....

 

Version Settings:

EDIT - 3/31/25:

Since I originally wrote this, I have learned and tested more on the Version Quality Settings. Please refer to the Tips section at the end of the guide for more updated information.

 

Sorry, same caveat... I only want 1080p content. When I first strted setting this up, this page caused some confusion. In order to properly set up please follow my instructions, and later you can come back and experiment. In you are only interested in 1080p you should be set. I am sure godver3 and @mash2k3 would laugh at me... but remember I am still a newbie at this Debrid stuff.

 

In this page, you can set your file size limits and change your version priorities. I was getting some pretty huge files (50GB BR Remux) that did not play well in Plex (constantly re-caching). I lowered my size limit and re-scraped. I get better file sizes that should be more playable in Plex. I have 1GB internet... I dont know how others are able to play those huge files. I added 4K as a resolution option, again setting my max file size to 22GB.

 

image.png.4682a1cf5332444fef5b94ab27afb514.png

 

Here are the steps I followed:

If there are any options displayed, click the red Delete button on each one until you get rid of everything.

  • Click on the "Add Separate 180p/4K Versions" button.
  • Then I deleted all the 4K versions, so it looks like the screenshot above.

Save Settings....

 

Content Sources:

image.png.d53aa0a09ab04fbdd0770d56798810e4.png

  • Click on "Add New Source" and select Overseerr
  • Put your internal URL and port number for your Overseer docker
  • Go to the Overseerr web ui, and click Settings > General. Copy the API Key
  • Return to CLI_Debrid and paste the API key. When you do this copy, make sure you check that against what is in Overseerr. For some reason I ended up w/ two = signs at the end... that made things not work.

Save Settings.

 

Additional Settings:

I only made two changes. 

  • I added my TMDB API Key. You need to go to their web site to generate one.
  • I added my Username and Password to my OpenSubtitles.com account. I have a paid account so I can get subtitles.

image.thumb.png.4cd426d9da1a5a3d0274bd0006a645cf.png

 

Advanced Settings:

Again, I made only two changes here towards the bottom of the screen. 

  • I enabled the Unmatched Items Check (helps with getting realeases that do not match what you wanted).
  • Changed the Overseerr check period. Changed it to 2 minutes to not have to wait too long while testing the whole thing. After you get everything working, you should change it back.

image.png.25046a5c7ea1a78f9ca37ff61235df45.png

 

This is it for all the Settings I customized in CLI_Debrid. This is a very powerful program that takes time to familiarize. If you run into any issues, I suggest going to their Discord and asking.

 

BUT, please consider supporting them by becoming a Patreon member. The link is right on the header of the web page.

 

Back to the Overseerr Docker:

image.png.73d2700b8d9882c772c0124b3000d035.png

In Overseer, go to Settings > Plex and perform the following steps:

  1. Click on the "Sync Libraries Button" and wait until your libraries show up.
  2. Check All the Libraries (this will ensure you do not add duplicate media between your local files and your Debrid media). If you search for an item, and it is already in one of your libraries, Overseerr will show it as Available. This is also helpful if you have users that do not bother to check if something is already in your library before requesting.
  3. Click "Save Changes"
  4. Click the "Start Scan". This will scan all your libraries to know what you already have. This will take time. Just let it run and let's keep on going.

 

Testing it All

The moment of truth....

 

Go to the CLI_Debrid UI and click the green button on upper right to start the program

image.png.fcd3cbb668fd917535c52991a86cb417.png

You may want to open the dockers log window to get a sense of what it is doing.

 

Make sure Plex and CLI_Debrid are running properly.  

 

Make sure the Real Debrid folder is mounted at /mnt/user/zurg.

image.png.eb9f74b2df2fcfd6614e95e0f0848dff.png

 

(continues next post....)

Edited by hernandito

  • Replies 57
  • Views 67.8k
  • Created
  • Last Reply

Top Posters In This Topic

Most Popular Posts

  • hernandito
    hernandito

    Go to Overseer On the search bar type the name of a Movie you know is not in your collection. Click the Request button:   The below screen will pop up. Notice that it tells you (i

  • hernandito
    hernandito

    Apologies.... I forgot to change the repo to public. It is fixed.  

  • missing screenshots if needed

Posted Images

  • Author

Go to Overseer

On the search bar type the name of a Movie you know is not in your collection. Click the Request button:

image.png.f5e77aa31ca636013b6dac05ff447191.png

 

The below screen will pop up. Notice that it tells you (in my case) that the item will be approved automatically. Click the Request button.

image.png.ad47d7b233e3d8e24708c455adcec182.png

 

 

Go o the Request tab and you will see your movie added.

image.png.1a67dcc32fabcfcb50667eaaa2adc64f.png

 

Back in unRAID, open up the Log screen for your CLI_Debrid docker, giving it some time, you will see scrolling messages about adding the new movie.

 

Again, after waiting for a few minutes (2 to 8 min. approx). Go to https://real-debrid.com/torrents. You should see your added movie.

image.png.9708fa749e2d578fb804c9074d08a307.png

 

Go to your unRAID folders and navigate to /mnt/user/zurg/movies and you should see:

image.png.a6914b9ff677bd6422d534c3d2f17acb.png

 

Finally, go to the Home screen in Plex, and you will see the movies added to your Recently Added Movies:

image.png.68af35775f90fc26c61810f5eb58bba4.png

If you do NOT see the new movie, please go to Plex > Settings > Manage >  Libraries and execute a "Scan Library Files" for the Movies-DB library. I had to do this once, and after this, new movies show very quickly.

 

Back in Overseerr Requests Page, you should see that the movie is now shown as Available. You can Delete Request so it doesn't clutter this page. But if you (or a lazy friend) tries to add it again, it will tell you it is Available.

image.png.92000df66eb9f4d0f68dee78433b9bb1.png

 

 

TV Shows:

Everything described above works the same for TV Series. Please note that if you add a show that has a lot of episodes and seasons, it will take a while to scrape and add everything. It processes one episode at a time.

 

Success....!

As mentioned throughout this guide, I am a semi-newbie on this. If you followed the guide precisely,  you should be golden. If you run into issues, I may not be the best one to help resolve. I hope others, more experienced users, can help out. 

 

Tips, Usage, Recommendations, Advice:

3/25/25 - tips added below

 

Below I will share useful tips that may not be clearly obvious. I will keep adding tips as I discover, so check back often. If you have some tips, please message me, and I will add them here (crediting you).

 

- Library Management. If you want to delete media from your library, the best way to do this is going into CLI_Debrid >System > Database. Type the first letter of the release you want to delete. Select the release, and click delete. This will delete it from the CLI_Database, and your Plex. Make sure it is also not in your Overseer's request list.

image.png.a7a215c0ba9c1fff2537d8f86c00e617.png

 

image.thumb.png.e59589e1444a5d8a80b5447fb46871dd.png

 

- Debrid Media Manager, I use this site to mainly check what is in my Real-Debrid library. I mainly check the sizes of each of the files that will stream. Useful to diagnose if something is going to play properly in Plex. This is also available to self-host, but I don't see a Docker template.... yet. I have not discovered if the file size is reported in CLI_Debrid.

 

- CLI_Debrid Tester. This is a very useful tool to see if your Scrapers are properly finding releases. Performing these tests will not add the movie to your list. Go to Tools > Tester. Type the name of a movie and Search. It will present you with a list; make your selection. On the next screen, select your Version resolution. On the left hand column, select options to check (max file size, preferred release type, etc). Then hit the Run Scrape at bottom of left column. You will then be shown ((below bottom-left Run Scrape button) the items and their scores of what it finds. Depending on the movie and release date, you should have a decent size list.

image.png.04f197417f3c38ab5bdf9e172d68de0a.png

 

- CLI_Debrid's Scraper. You can also add movies / shows within CLI_Debrid. Under Main > Scarpers, type the name of what you want and hit Search. The nice thing is it will give you resolution options based of your selected versions. This is a very nice feature. But Overseer is nicer if you have other users making requests. CL_Debrid allows for User Account. Your preference.

 

- CLI_Debrid's Queues. You can see what is in your download queue, if the item is yet unreleased, or Blacklisted. Blacklisted are items that it has not found, or that you have blocked from any future download.

 

- More on the Debrid Cloud - added 3/25/25

As I mentioned in my edit at the start of the guide, Debrid is a powerful thing. In a nutshell, Real-Debrid (RD) allows you to add releases to media you want. The searching of this media is handled by CLI_Debrid (CLI), with the request coming from either Overseerr or items you add to Plex watchlist. Zurg's job is to ensure this media is properly indexed and cataloged in your Plex. When CLI_Debrid receives a request and it executes a search (scrape), if the exact release is available at RD (this is called a cached release), it will simply add it as a reference* to your RD account and your library gets updated. If the release is NOT available at RD, RD will get the release from torrents being seeded in the wild. This may take some time to download and make available in your library. You can monitor on the RD web site. Remember the download is not stored on your machine. This release will also be available to any other member of RD. In essence, everyone shares the same files. At RD some files expire and will get erased, when this happens, Zurg notices, and takes charge by requesting a new file, which will be downloaded and then cached again. Your Plex will never skip a beat.

 

My one concern was, what if RD goes belly up... your collection and references to each release is gone... poof. Well there is a solution. There are other comparable alternatives to RD that do the same. They are not as cheap as RD and apparently not as complete (say others)... But what about the library you have curated  built up? Enter https://debridmediamanager.com (DMM)- which I mentioned somewhere here. I believe you can also self host this (but not sure how it's done) - there is a Docker listed on their Github. In essence, it ties to your RD account and once you log in, it shows you your entire collection. When your are viewing your collection, you can click on a little button, and back up your library as a little 2MB .json for a library on thousands of releases. You store this file locally. This process can be automated (not sure how). So.... it goes belly up; you sign up for an AllDebrid or Torbox account. Tie it to DMM and click on another little button, to import that .json file and you will be golden.

 

More black magic... you can share that little .json file with others, and you basically replicate their collection.

 

*The "reference" to the files I mention above, are basically the hashes of those release files. That is all your collection is, a list of file names and hashes that share between providers and because they reference the actual file.

 

- More on Versions and Quality  - added 3/25/25

Per the above tip, we have determined that storage capacity is not really an issue for the Debrid method. Because of this, one would like THE best quality releases possible. The determining factor on what you select would be download speed of your internet connection. The higher the quality, the faster your internet speed needs to be. Also critical is where are you watching your content. If you are ONLY watching on your phone's screen, you may get away with 720p content, but if you have a super-duper 77" OLED 4K TV, you want the highest quality your internet can support. In my case, I have a big TV and really good ethernet. This can support watching 4K Remux content, with files upwards of 100GB. You need to figure out what is the best quality/file size you want to consume. I suggest testing and looking at the files sizes and the quality of your  playback.

 

A quick brief on encoding qualities (not an expert). There is a lot on info and discussions out there, but from my understanding, the best possible quality encoding comes from REMUX, releases, followed by BLUERAY, followed by WEB-DL. There are lower like Pre-Release, TS, Telecine, , but I do not care for these... like someone in the movie theater filming the screen with their phone...

 

With the above in mind, and in my case, I want best possible resolution and best encoding within that resolution that is available. I have configure the CLI_Debrid > Settings > Version Settings the following way. I ONLY have one setting. As I described earlier, I started with the "Add Separate 1080p/4K Versions". I have now deleted the 1080p version. And renamed mine to "Best from 4K Down".

image.thumb.png.9da6dc0ca8072da9e0c72e7be7004236.png

 

Drilling into the specifics of this version, please see below. In the screenshots below, I will highlight the items that are important for my situation.

image.png.d343a73e3fccfcdbd1f4315da1c92911.png

 

image.png.4f244bcd5bc061a7fbfad677cdee882e.png

 

Then, in the Settings > Contents Sources > Overseer, make sure your option is ticked:

image.thumb.png.f1eafc179ea29409231c6a68db001081.png

 

CONCLUSION:

Best of luck, and PLEASE sponsor and donate to the CLI_Debrid team. You can do a Patreon subscription or do a one time donation. It is important that these guys are supported to continue their efforts.

 

Edited by hernandito

I know this is not complete but wanted to look at it anyway. The github repo does not seem to exist can you maybe check, just wanted to check the stuff you made or uploaded.

  • hernandito changed the title to [GUIDE] Setup Real-Debrid for Plex Using CLI_Debrid, Rclone, and Zurg

 

Well man ! you are a god send!

Hey quick question
in this part where was this mentioned ?
 

In unRAID, open a terminal window and type the following commands - One line at a time:

cd /mnt/cache/appdata/zurg
wasn't it /mnt/cache/zurg ?

missing screenshots if needed
image.thumb.png.890f9992da9036e5afa2017606250f44.png

@hernandito  I followed step by step, slowly and carefully your guide. And everything is working.
What an awesome guide. All is perfectly detailled.
Thank's for all your hard work


I'm far away from being an expert.
I changed a line (added & at the end of the last line) in the Start Zurg Service script, because in unraid webui script it was always shown "running",  :

#!/bin/bash
cd /mnt/user/appdata/zurg
chmod 777 zurg
/mnt/user/appdata/zurg/./zurg &


I also added a script called Stop Zurg Service launched "At Stopping of Array", just in case :

#!/bin/bash

MYPROCESS="zurg"
pkill -9 -f $MYPROCESS || true

 

  • Author
On 3/24/2025 at 3:00 AM, MEnVaNic said:

I know this is not complete but wanted to look at it anyway. The github repo does not seem to exist can you maybe check, just wanted to check the stuff you made or uploaded.

 

Thank you.... the repo is available now. Had to make it public.

  • Author
14 hours ago, bidalos said:

Hey quick question
in this part where was this mentioned ?
 

In unRAID, open a terminal window and type the following commands - One line at a time:

cd /mnt/cache/appdata/zurg
wasn't it /mnt/cache/zurg ?

 

 Hi, the chmod commands are to enable the scripts and the zurg binaries (in /appdata/zurg) to be executable... nothing to do with the rclone mount folder.

  • Author
13 hours ago, bidalos said:

missing screenshots if needed
image.thumb.png.890f9992da9036e5afa2017606250f44.png

 Awesome.... thank you! I have edited the original post to include.

  • Author
1 hour ago, Nonoss said:

@hernandito  I followed step by step, slowly and carefully your guide. And everything is working.
What an awesome guide. All is perfectly detailled.
Thank's for all your hard work


I'm far away from being an expert.
I changed a line (added & at the end of the last line) in the Start Zurg Service script, because in unraid webui script it was always shown "running",  :

#!/bin/bash
cd /mnt/user/appdata/zurg
chmod 777 zurg
/mnt/user/appdata/zurg/./zurg &


I also added a script called Stop Zurg Service launched "At Stopping of Array", just in case :

#!/bin/bash

MYPROCESS="zurg"
pkill -9 -f $MYPROCESS || true

 

Very interesting.... I will check up w mash if this could cause an issue. Please stay tuned. Thank you....

Edited by hernandito

  • Author
1 hour ago, Nonoss said:

@hernandito  I followed step by step, slowly and carefully your guide. And everything is working.
What an awesome guide. All is perfectly detailled.
Thank's for all your hard work

 

 

This is music to my ears.... I am so glad someone proved my guide. I was afraid of having missed something. Thank you!!

When I first saw this thread I thought, dang, this is way too much!  But I followed all of the instructions and things are running great!

Thank you!

Where you have "Create and configure zurg in appdata" section, your path in the text has /mnt/cache/zurg but the screenshot shows /mnt/cache/appdata/zurg.  

 

Honestly I can't remember at this point what I set mine to, but I think it was the latter.

 

  • Author
48 minutes ago, scott2020 said:

When I first saw this thread I thought, dang, this is way too much!  But I followed all of the instructions and things are running great!

Thank you!

Where you have "Create and configure zurg in appdata" section, your path in the text has /mnt/cache/zurg but the screenshot shows /mnt/cache/appdata/zurg.  

 

Honestly I can't remember at this point what I set mine to, but I think it was the latter.

 

 

@scott2020 I will check and correct... Thanks for catching this. Should be in /mnt/cache/appdata/zurg.

  • Author
On 3/25/2025 at 7:26 AM, Nonoss said:

@hernandito  I followed step by step, slowly and carefully your guide. And everything is working.
What an awesome guide. All is perfectly detailled.
Thank's for all your hard work


I'm far away from being an expert.
I changed a line (added & at the end of the last line) in the Start Zurg Service script, because in unraid webui script it was always shown "running",  :

#!/bin/bash
cd /mnt/user/appdata/zurg
chmod 777 zurg
/mnt/user/appdata/zurg/./zurg &


I also added a script called Stop Zurg Service launched "At Stopping of Array", just in case :

#!/bin/bash

MYPROCESS="zurg"
pkill -9 -f $MYPROCESS || true

 

 

 

Hi Nonoss... Thanks again for the scripts. I have edited the original guide to update the Start Zurg Service script, to reflect your change. However for the Stop Zurge Service. I believe my original script includes a command to both top the zurg process AND unmounts the rclone mount.

 

Thanks again.

Just in case someone else notices with cli_debrid

 

I was looking for older, obscure TV shows and even though there were legitimate results, the resolutions were not listed in the file or metedata.  The search returned a 0 and said there were no good results.  My preferences were less than or equal to 1080.

 

I reported to godver3 and it appears to be a bug.

 

I was wondering why so much stuff was getting blacklisted even though there were results and even could play in other things like stremio.  

 

 

 common.py:detect_season_episode_info:56 - Raw episode info: []
2025-03-27 19:14:52,559 - DEBUG - filter_results.py:filter_results:26 - Starting filter_results with 1 results
2025-03-27 19:14:52,559 - DEBUG - filter_results.py:filter_results:55 - Processing result: The Golden Palace S01 WEBRip AAC2 0 x264-WEBTUBE[rartv]
2025-03-27 19:14:52,560 - DEBUG - filter_results.py:resolution_filter:495 - Unknown resolution value: result=Unknown(0), max=1080p(1080)
2025-03-27 19:14:52,560 - DEBUG - filter_results.py:filter_results:131 - Failed: Resolution Unknown doesn't match criteria <= 1080p
2025-03-27 19:14:52,560 - filter_results.py:filter_results:464 - DEBUG -
Filtering complete: 0/1 results passed

  • Author
16 hours ago, scott2020 said:

Just in case someone else notices with cli_debrid

 

I was looking for older, obscure TV shows and even though there were legitimate results, the resolutions were not listed in the file or metedata.  The search returned a 0 and said there were no good results.  My preferences were less than or equal to 1080.

 

I reported to godver3 and it appears to be a bug.

 

 

A new version of CLI_Debrid was pushed out earlier today. According to the release notes, it allows for unknown resolutions.

Yep, and it works!

Afternoon, all.  So, I worked closely with @godver3 on discord getting this setup on a RazPi 5 running Ubuntu as a proof of concept and it works great.  I've recently changed my TerraMaster NAS from their OS (TOS) to unRAID, and now I'd like to get this setup on my production environment.

I've followed the guide and I seem to be stuck pretty early on:
 

Quote

After firing the first two scripts (remember the third kills what we are starting), you can check they are both properly running by going to your /mnt/user/zurg folder, and you should see this:

 

 

I ran (in background) both Start Zurg and Start Rclone mount (logs below)
Start Zurg:
Script Starting Mar 31, 2025 12:43.28

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Start Zurg Service/log.txt

Script Finished Mar 31, 2025 12:43.28

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Start Zurg Service/log.txt

/tmp/user.scripts/tmpScripts/Start Zurg Service/script: line 4: /mnt/user/appdata/zurg/./zurg: cannot execute binary file: Exec format error

Start Rclone Mount:
Script Starting Mar 31, 2025 12:43.40

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/log.txt

2025/03/31 12:43:50 ERROR : Daemon timed out. Failed to terminate daemon pid 693003: os: process already finished
2025/03/31 12:43:50 CRITICAL: Fatal error: daemon exited with error code 1
Script Finished Mar 31, 2025 12:43.50

Full logs for this script are available at /tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/log.txt

---------------------------------

I can't move on from here as I dont see my real-debrid folders mounted in /mnt/user/zurg/

Any help would be appreciated.  Thanks

  • Author

Did you properly edit the rclone.conf and config.yml in the /apddata/zurg folder - as described in the  Create and Configure the Zurg Folder in Appdata section above. You need to add your token and your correct unRAID IP address... Did you run the chmod +x commands...?

 

8 hours ago, hernandito said:

Did you properly edit the rclone.conf and config.yml in the /apddata/zurg folder - as described in the  Create and Configure the Zurg Folder in Appdata section above. You need to add your token and your correct unRAID IP address... Did you run the chmod +x commands...?

 

Hi, thanks for the response.  Yes, I 'think' I edited them properly.  See below:

CleanShot2025-04-01at00_51_53.png.4dcc6e956be58d6dd1cff2b82d38fed5.png


config.yml

zurg: v1
token: XM--REDACTED--OQ
# host: "[::]"
# port: 9999
# username:
# password:
# proxy:
# concurrent_workers: 20
check_for_changes_every_secs: 10
# repair_every_mins: 60
# ignore_renames: false
retain_rd_torrent_name: true
retain_folder_name_extension: true
enable_repair: true
auto_delete_rar_torrents: true
# api_timeout_secs: 15
# download_timeout_secs: 10
# enable_download_mount: false
# rate_limit_sleep_secs: 6
# retries_until_failed: 2
# network_buffer_size: 4194304 # 4MB
# serve_from_rclone: false
# verify_download_link: false
# force_ipv6: false
on_library_update: sh plex_update.sh "$@"
#for windows comment the line above and uncomment the line below:
#on_library_update: '& powershell -ExecutionPolicy Bypass -File .\plex_update.ps1 --% "$args"'

directories:
  anime:
    group_order: 10
    group: media
    filters:
      - regex: /\b[a-fA-F0-9]{8}\b/
      - any_file_inside_regex: /\b[a-fA-F0-9]{8}\b/

  shows:
    group_order: 20
    group: media
    filters:
      - has_episodes: true

  movies:
    group_order: 30
    group: media
    only_show_the_biggest_file: true
    filters:
      - regex: /.*/

 

plex_update.sh

#!/bin/bash

# PLEX PARTIAL SCAN script or PLEX UPDATE script
# When zurg detects changes, it can trigger this script IF your config.yml contains
# on_library_update: sh plex_update.sh "$@"

# docker compose exec zurg apk add libxml2-utils
# sudo apt install libxml2-utils

plex_url="http://192.168.1.42:32400" # If you're using zurg inside a Docker container, by default it is 172.17.0.1:32400
token="h--REDACTED--9" # open Plex in a browser, open dev console and copy-paste this: window.localStorage.getItem("myPlexAccessToken")
zurg_mount="/mnt/user/zurg" # replace with your zurg mount path, ensure this is what Plex sees

# Get the list of section IDs
section_ids=$(curl -sLX GET "$plex_url/library/sections" -H "X-Plex-Token: $token" | xmllint --xpath "//Directory/@key" - | grep -o 'key="[^"]*"' | awk -F'"' '{print $2}')

for arg in "$@"
do
    parsed_arg="${arg//\\}"
    echo $parsed_arg
    modified_arg="$zurg_mount/$parsed_arg"
    echo "Detected update on: $arg"
    echo "Absolute path: $modified_arg"

    for section_id in $section_ids
    do
        echo "Section ID: $section_id"

        curl -G -H "X-Plex-Token: $token" --data-urlencode "path=$modified_arg" $plex_url/library/sections/$section_id/refresh
    done
done

echo "All updated sections refreshed"

# credits to godver3, wasabipls

 

rclone.conf

[zurg-wd]
type = webdav
url = http://192.168.1.42:9999/dav
vendor = other
pacer_min_sleep = 0

 

8 hours ago, hernandito said:

@TheRandy I would start the Mount Rclone script first.

 

 

CleanShot2025-04-01at00_25_35.thumb.png.85082de11ab7f8cdb1ec49645dfa2310.png

 

zurg_start_rclone (mount rclone):

#!/bin/bash
sleep 10
rclone mount zurg-wd: /mnt/zurg --dir-cache-time 10s --config=/mnt/user/appdata/zurg/rclone.conf --allow-other --allow-non-empty --gid 100 --uid 99 --daemon

 

Thanks again for the response.

Edited by TheRandy

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.