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

  • Author
15 hours ago, TheRandy said:

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.

 

This doesn't look right:

image.png.ea8668b84d7ac669af419d8a3d7e1f2c.png

 

I cant really advise, without knowing where you placed things... this should point to the exact drive and folder you are using to mount w/ Rclone. While you created a share for zurg, you need to know where you configured that share to reside. Please re-read my section on Create User Share

 

 

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

Thanks for the feedback.  Let me go take a look and report back.

Okay, this is the correct location now:

 

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


Same outcome....nothing is mounted in the share.

 

  • Author
13 hours ago, TheRandy said:

Okay, this is the correct location now:

 

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


Same outcome....nothing is mounted in the share.

 

 

Hi... It is extremely difficult for me to help you out, as there are MANY steps in the guide. Any one tiny thing makes the whole thing not work. Where did you configure the share zurg to reside? Array, a pool, an external drive?  In my case, I am mounting this share to a specific cache pool device (drive share) called "downloadcache". Your case is VERY likely different. You need to add the path to where the share is configured to be stored. Your script is mounting it to the user share. These are the sections you need to follow:

 

image.thumb.png.489fe6197f4d69c58a062e95fd9509e1.png

 

image.thumb.png.008a6dcde56f7184f8215067f8d9965f.png

You can see below where the share is configured to reside. This is the path that you need there.

image.png.dff82ff7bfb2befb8a5412cbbd580f9f.png

 

 

 

You MUST also correct this path on the Stop Zurge script. Otherwise you will not be able to cleanly unmount your array.

 

 

Edited by hernandito

Awesome guide. I am so close to having this working.  I have the zurg service working but i cant seem to get rclone to mount.

 

error:

2025/04/03 21:26:22 CRITICAL: Failed to create file system for "zurg-wd:": didn't find section in config file ("zurg-wd")
/tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/script: line 4: --allow-other: command not found
/tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/script: line 5: allow-non-empty: command not found

 

 

 

Edited by XDrunk TurnerX

  • Author
13 hours ago, XDrunk TurnerX said:

Awesome guide. I am so close to having this working.  I have the zurg service working but i cant seem to get rclone to mount.

 

error:

2025/04/03 21:26:22 CRITICAL: Failed to create file system for "zurg-wd:": didn't find section in config file ("zurg-wd")
/tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/script: line 4: --allow-other: command not found
/tmp/user.scripts/tmpScripts/Start Zurg Rclone Mount/script: line 5: allow-non-empty: command not found

 

 

 

That's weird... there are only 3 lines in the Rclone script... in your /appdata/zurg folder you should have the files shown below... it's possible that you may have others, but these 4 are critical. Did you properly edit the yaml and config files? Did you sign up for a Real-Debrid account and got the API Token? Also, did you follow the chmod commands? Review all those steps and see if there is anything you missed.

 

image.png.a348dcd5abd2c73c3b5e01943c0b91be.png.2033c906865d08e99c5a4bc815abd8c2.png

 

On 4/2/2025 at 6:28 AM, hernandito said:

 

Hi... It is extremely difficult for me to help you out, as there are MANY steps in the guide. Any one tiny thing makes the whole thing not work. Where did you configure the share zurg to reside? Array, a pool, an external drive?  In my case, I am mounting this share to a specific cache pool device (drive share) called "downloadcache". Your case is VERY likely different. You need to add the path to where the share is configured to be stored. Your script is mounting it to the user share. These are the sections you need to follow:

 

 

 

 

Hey, I appreciate the reply...sorry, I meant to respond earlier.

Through a bunch of trial and error, and working with @Godver3 over on Discord, I was able to get it sorted out.  I really appreciate the guide and hope it brings more folks over to Cli_Debrid.  It's a great piece of code.

  • Author

 

4 minutes ago, TheRandy said:

Hey, I appreciate the reply...sorry, I meant to respond earlier.

Through a bunch of trial and error, and working with @Godver3 over on Discord, I was able to get it sorted out.  I really appreciate the guide and hope it brings more folks over to Cli_Debrid.  It's a great piece of code.

 

What was the problem / solution? It may help others... Glad to hear you you got it working.

 

3 minutes ago, hernandito said:

 

 

What was the problem / solution? It may help others... Glad to hear you you got it working.

 

Ooof, I'll try to capture the long list of issues I ran into below.  Some of which were my fault.  Listed with (*)
 

  • (*) Zurg - Most observant folks won't run into this, but I did because I was rushing through the process
    • Ensure to download the correct files from 'testing' - I download Darwin (top of the list), when I needed Linux - my mistake
  • Rclone - would not mount
    • I found that I didn't have NFS enabled within my unRAID instance - didn't think it mattered
      • Enabled NFS in disk settings, and then the clone mounted to zurg.  Not sure why that made a difference
    • (*) Failed to mount via script
      • via CLI, I was able to mount leaving out the .config argument
      • reviewing with Godver3, he saw that the script was calling for 'zurg' but the .config had 'zurg-wd' - not sure how I got this changed but reviewing your guide, they match so again, my mistake
  • Cli_Debrid
    • Container Path: /data as per the guide, did not allow Cli_Debrid to see my RD files for some reason.
      • Confirmed with @Godver3, the container mount should match the location you want Cli_Debrid to search
        • so both container path" & host path: should be /mnt/user/zurg/
        •  CleanShot2025-04-04at12_43_03.png.66e6eb79f63445254e861938a00628a2.png
    • I noticed that in the guide, you are using the direct mount within Cli_Debrid - which works and is fine.  I'm using the symlinks path (Anime will struggle without symlinks)
      • I had to add another path to both Cli_Debrid, and Plex containers for Cli_Debrid to manage the library properly via Symlinks
      • Screenshot about show's that path (for mysetup).  Others would look like '/mnt/user/user_folder/user_folder/symlinks/' where the user corrects the path their specific location.

 

I'm sure there's more, but I gotta get back to work.  I'll see about adding additional notes from my experience later.  Thanks again

Fantastic Guide. I think I am 99% of the way there, but running into 1 issue. I sent a request from Overseerr and in the docker logs it looks like CLI Debrid receives the request. But I see the following error in the CLI Debrid log (also in attached screenshot)

 

"2025-04-04 13:20:36,134 - overseerr.py:fetch_overseerr_wanted_content:87 - ERROR - Error fetching wanted content from Overseerr: No connection adapters were found for '192.168.1.188:5055/api/v1/request?take=100&skip=0&filter=approved'"

 

My theory is that this has to do with what you mentioned in the guide about the Overseerr API key having two "=" at the end. Mine also pasted with == at the end, but I tried it with one and none and that didn't work either. And those == are present in the Overseerr application. I also refreshed the key as well.

 

Looking forward to hearing your thoughts. Again thank you for the wonderful information.

Screenshot 2025-04-04 132308.png

  • Author
17 hours ago, TheRandy said:

I'm sure there's more, but I gotta get back to work.  I'll see about adding additional notes from my experience later.  Thanks again

 

 

Thanks for the update... Symlinks are a different beast... I wouldn't know where to start.

  • Author
17 hours ago, ocja2889 said:

Fantastic Guide. I think I am 99% of the way there, but running into 1 issue. I sent a request from Overseerr and in the docker logs it looks like CLI Debrid receives the request. But I see the following error in the CLI Debrid log (also in attached screenshot)

 

"2025-04-04 13:20:36,134 - overseerr.py:fetch_overseerr_wanted_content:87 - ERROR - Error fetching wanted content from Overseerr: No connection adapters were found for '192.168.1.188:5055/api/v1/request?take=100&skip=0&filter=approved'"

My advice is to reach out to Godver3, at their Discord channel. He is very helpful, and will help you nail down that issue. I'm having some Oversee issues at the moment. Not sure if I changed something....

Great Guide. Won't have got this working without it. Thanks for putting it together hernandito.

 

Just wondering if there is a way to automatically start the cli-debrid program after the docker container has been stopped and restarted? Every time my appdata backup plugin runs i have to go in and manually restart the program. i assume this will also happen on container updates aswell.

 

3 hours ago, markj24 said:

Great Guide. Won't have got this working without it. Thanks for putting it together hernandito.

 

Just wondering if there is a way to automatically start the cli-debrid program after the docker container has been stopped and restarted? Every time my appdata backup plugin runs i have to go in and manually restart the program. i assume this will also happen on container updates aswell.

 

Yes there is a way to start the program automagically when the container restarts.  It’s in the advanced settings.

 

IMG_0935.thumb.png.0c8caad00238d1489b4b36b20458aff9.pngIMG_0934.thumb.png.57d8272643db541e1ba6802772243289.pngGo to system>settings>advanced…check the box that says “auto run program”

38 minutes ago, TheRandy said:

Yes there is a way to start the program automagically when the container restarts.  It’s in the advanced settings.

 

IMG_0935.thumb.png.0c8caad00238d1489b4b36b20458aff9.pngIMG_0934.thumb.png.57d8272643db541e1ba6802772243289.pngGo to system>settings>advanced…check the box that says “auto run program”

Thanks. i cant believe i missed that.

  • 2 weeks later...

Great write up! Worked out fine for me.

Ummmm, what did I do wrong?

 

Why is it downloading EVERYTHING... It's out of control. I can't even follow the logs to know why.

I added overseer and my plex watchlist, but everything in my plex watchlist is already available, and I don't have any missing media from overseer requests.

I am also pretty sure it's downloading stuff and adding it to plex that I don't have in either.

 

What is it doing?! AHHH

2 hours ago, bencmeyer said:

Ummmm, what did I do wrong?

 

Why is it downloading EVERYTHING... It's out of control. I can't even follow the logs to know why.

I added overseer and my plex watchlist, but everything in my plex watchlist is already available, and I don't have any missing media from overseer requests.

I am also pretty sure it's downloading stuff and adding it to plex that I don't have in either.

 

What is it doing?! AHHH

CLI_Debrid is designed to not just fetch, but also upgrade.  Without screenshots of your logs, or more information, I would only be speculating.  So here is my best guess on what little info you provided.

 

You have an existing Plex library.  You setup CLI_Debrid with that existing library and mainly need it for 'new' requests.  If that's the case, CLI will scan the library it has available to it...and if it 'determines' that it is a bad copy (or that it can scrub a better one), it's going to download new versions.  (I say this with experience, as I did this exact thing on my initial setup.  I ultimately SHUTDOWN CLI_Debrid and now run 6 separate folders for my Plex media.

  • Movies (these are the files I already have locally)
  • TV Shows (these are the files I already have locally)
  • Requested - Movies (CLI_Debrid Symlinks)
  • Requested - TV Shows (CLI_Debrid Symlinks)
  • Requested - Anime Movies (CLI_Debrid Symlinks)
  • Requested - Anime Shows (CLI_Debrid Symlinks)

Setting up CLI this way does NOT scan your existing library and does NOT download 'EVERYTHING'

CleanShot2025-04-18at01_32_40.png.e452926d0a516d43d4059edf8f276898.png

Edited by TheRandy

Thanks TheRandy,

 

I did set this up with seperate folders and libraries within Plex, so I don't think that's what it's doing.

I believe the issue is due to my existing overseer and very mature trakt history.

I no longer use trakt, and the data is not valuable to me so I deleted it all.

I also cleared any data within cli_debrid to sort of start over.

That definitely helped the huge influx, but was still adding stuff I didn't expect. I think this is due to my existing overseer. It is simply grabbing everything from that.

 

So I believe if I wanted the setup where there was nothing in there except for what was requested, I would have needed to start with a fresh trakt, and fresh overseer. I didn't use the other methods, but that probably applies as well. ie. Plex watchlist, etc.

 

 

decided to give it a go this morning. everything seems to be working so far got the folders showing up and etc.😀  . well got to the CLI debrid part. I need to create a trakt account and all that jazz right ? 

6 hours ago, Galacto said:

decided to give it a go this morning. everything seems to be working so far got the folders showing up and etc.😀  . well got to the CLI debrid part. I need to create a trakt account and all that jazz right ? 

Yep, the trakt account is required. I am not entirely sure why, but it won't let you save/start the program until it's filled out.

Edit: On the github, it shows what is required and why. For Trakt it says, "Used by our Metadata Battery to retrieve all needed Metadata."

 

I am currently dealing with the issue of Plex needing to be restarted due to "Sqlite3: Sleeping for 200ms to retry busy DB."

Not sure how to deal with that besides restarting the container automatically with a health check script I found.

If anyone has any experience with that and has a better option, let me know.

 

#!/bin/bash

# Plex busy DB workaround
# Set the maximum number of allowed occurrences of the Sqlite3: Sleeping for 200ms to retry busy DB string
# about 3 times usually indicates an instance that can't recover by itself
# if your instance restarts your docker logs should reset, or "cover up" the busy DB lines, afaik 
MAX_OCCURRENCES=3

# this part "docker logs --tail 10 plex" "--tail 10" means the last ten lines of the container logs
# of the container named "plex", change the name according to your setup
# you can try "docker logs --tail 10 plex" in the terminal and if everything is setup correct
# it will spit out the last 10 lines of the logs and should work
LOG_LINES=$(docker logs --tail 10 PlexMediaServer)

# Count the number of occurrences of the specified string in the log lines
OCCURRENCES=$(echo "$LOG_LINES" | grep -o "Sqlite3: Sleeping for 200ms to retry busy DB." | wc -l)

# If the health check fails, restart the plex container
if [ "$OCCURRENCES" -gt "$MAX_OCCURRENCES" ]; then
  # Restart the container
  # Again this part "docker restart plex" assumes that your container is named plex, change the name according to your setup
  docker restart PlexMediaServer
fi

 

Edited by bencmeyer
clarifying requirement for trakt

I'm wondering how to force a download to be quicker than the 15 min Overseer scan without changing the refresh time?

Can you prompt a refresh somehow to grab more quickly if you want to watch somehting straight away?

19 minutes ago, Chamzamzoo said:

I'm wondering how to force a download to be quicker than the 15 min Overseer scan without changing the refresh time?

Can you prompt a refresh somehow to grab more quickly if you want to watch something straight away?

Unless you change the time...the overseerr requests will always be the same wait.  If YOU wanted something and not one of your server users...you can use the scraper built into CLI_Debrid...it's actually really good, and lets you choose which one you want added...I typically go for the cached ones and it is immediately available.image.thumb.png.a4f66efb06003ba5e0a2fef992837da9.pngimage.thumb.png.804610a2784becf12737fcb4073a1162.png

Perfect. Thanks.

 

Saw this on reddit after I downloaded 3TB in about 10 days...  Turn off Media analysis, 

 

Media Analysis. It's in Settings -> Scheduled Tasks.

Also Video preview thumbnails & intro/credit detection

 

If these are enabled in Plex, it will download the whole file.  So I had 3TB of crap at RD and downloaded it all for analysis.  

 

If you are on a capped data ISP plan, this is bad.

 

EDIT:  A few more details.   https://github.com/itsToggle/plex_debrid/wiki/Setup-Guides#2-setup-plex-2

 

 

Edited by scott2020

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.