itsToggle / plex_debrid

Plex torrent streaming through Debrid Services
1.52k stars 130 forks source link

For the Wiki: Installing rclone_rd on Unraid #492

Open carloss66 opened 1 year ago

carloss66 commented 1 year ago

Installing RCLONE_RD on Unraid

This guide covers how to install the rclone_rd Linux binary on Unraid. There are probably many other ways of doing this, especially now that rclone_rd is available as a Docker plugin, but this is how I got it working before the plugin was released.

  1. Install the following Unraid plugins: a. Rclone (Waseh's Repository) – This will install rclone and rclone’s prereqs (fuse) on Unraid, but we will not be using rclone from the plugin. b. User Scripts – This will be used to launch rclone_rd when Unraid boots up.
  2. Create a rclone_rd folder under the appdata share (/mnt/user/appdata).
  3. Create a new share as the mount point for rclone_rd. I named my share real-debrid since that is the service that I use.
  4. Create a file named rclone.conf and put this in the file: [debrid] type = realdebrid api_key =
  5. Put the rclone.conf file and the rclone_rd Linux binary in the folder you created on step #2. For simplicity, rename rclone-linux to rclone.
  6. Open Terminal on Unraid and go to the rclone_rd folder: cd /mnt/user/appdata/rclone_rd
  7. Take ownership of rclone: chown -R rclone
  8. Make rclone executable: chmod u+x rclone
  9. Now is a good time to test if everything we have done so far is going to work. From Terminal run: /mnt/user/appdata/rclone_rd/./rclone mount debrid: /mnt/cache/real-debrid --dir-cache-time 10s --allow-other –daemon (This command assumes that your folder for rclone is under /mnt/user/appdata/rclone_rd and that your mount point share is called real-debrid.)
  10. Check the debrid share to verify that the movies, shows, and default folders are mounted.
  11. If everything looks good, close Terminal and open the User Scripts plugin in Unraid. Create a new script and use the command from step 9. Schedule the script to run At First Array Start Only.
  12. I found that manually stopping the the array will not work if the rclone share is mounted. Also, after rebooting Unraid, a parity check will start automatically. To prevent this, create another user script to unmount the rclone share when stopping the array, or when rebooting Unraid. Use “fusermount -u /mnt/cache/real-debrid” (no quotes) for the script, and schedule it to run At Stopping of Array.
  13. That’s it. If you want to make sure the new user script will work, just reboot your Unraid server and check the real-debrid mount point after the server restarts.
itsToggle commented 1 year ago

thanks for this!

nightcrawler2164 commented 1 year ago

This is a fantastic write up! Followed it a couple days back and it's working like a charm with some 'minor' updates to my mount command.

/mnt/user/appdata/rclone_rd/./rclone mount debrid: /mnt/user/real-debrid --dir-cache-time 10s --allow-other --daemon --umask=022 --gid=100 --uid=99

  1. I had to add the uid, gid, and umask permissions for whatever reason to mirror my Plex library directory permissions otherwise Plex wouldn't see the real-debrid mount
nightcrawler2164 commented 1 year ago

Another question - I can never get the plex_debrid container from the community apps store working. Not a big deal as I can manually run the "docker run" command but I'm curious if anyone else was able to get it working in unRAID.

Varming73 commented 11 months ago

Another question - I can never get the plex_debrid container from the community apps store working. Not a big deal as I can manually run the "docker run" command but I'm curious if anyone else was able to get it working in unRAID.

Depends on what you mean :) I create the docker container from the Unraid UI with icon: https://avatars.githubusercontent.com/u/71379623?s=48&v=4 extra parameters: --interactive --tty container path: /config pointing to /mnt/user/appdata/plex_debrid/

After running the container I go to the terminal and docker attach In here I can set up the script and set it to NOT start in menu, when it starts up. After that it just runs

djtonebank commented 10 months ago

Another question - I can never get the plex_debrid container from the community apps store working. Not a big deal as I can manually run the "docker run" command but I'm curious if anyone else was able to get it working in unRAID.

Depends on what you mean :) I create the docker container from the Unraid UI with icon: https://avatars.githubusercontent.com/u/71379623?s=48&v=4 extra parameters: --interactive --tty container path: /config pointing to /mnt/user/appdata/plex_debrid/

After running the container I go to the terminal and docker attach In here I can set up the script and set it to NOT start in menu, when it starts up. After that it just runs

Can you elaborate on this further? I have the icon, parameters and container path set but when i open the console or logs it never kicks off. Did you set all those options BEFORE you pulled the image from docker?

also, what do i have to do as far as docker attach works? thank you!

7gp commented 6 months ago

I'm getting a "Fatal error: mount not ready" error when attempting to do step 9. Any help?

/mnt/user/appdata/rclone_rd/./rclone mount debrid: /mnt/cache/real-debrid --dir-cache-time 10s --allow-other –daemon Usage: rclone mount remote:path /path/to/mountpoint [flags]

Flags: --allow-non-empty Allow mounting over a non-empty directory (not supported on Windows) --allow-other Allow access to other users (not supported on Windows) --allow-root Allow access to root user (not supported on Windows) --async-read Use asynchronous reads (not supported on Windows) (default true) --attr-timeout duration Time for which file/directory attributes are cached (default 1s) --daemon Run mount in background and exit parent process (as background output is suppressed, use --log-file with --log-format=pid,... to monitor) (not supported on Windows) --daemon-timeout duration Time limit for rclone to respond to kernel (not supported on Windows) --daemon-wait duration Time to wait for ready mount from daemon (maximum time on Linux, constant sleep time on OSX/BSD) (not supported on Windows) (default 1m0s) --debug-fuse Debug the FUSE internals - needs -v --default-permissions Makes kernel enforce access control based on the file mode (not supported on Windows) --devname string Set the device name - default is remote:path --dir-cache-time duration Time to cache directory entries for (default 5m0s) --dir-perms FileMode Directory permissions (default 0777) --file-perms FileMode File permissions (default 0666) --fuse-flag stringArray Flags or arguments to be passed direct to libfuse/WinFsp (repeat if required) --gid uint32 Override the gid field set by the filesystem (not supported on Windows) -h, --help help for mount --max-read-ahead SizeSuffix The number of bytes that can be prefetched for sequential reads (not supported on Windows) (default 128Ki) --network-mode Mount as remote network drive, instead of fixed disk drive (supported on Windows only) --no-checksum Don't compare checksums on up/download --no-modtime Don't read/write the modification time (can speed things up) --no-seek Don't allow seeking in files --noappledouble Ignore Apple Double (._) and .DS_Store files (supported on OSX only) (default true) --noapplexattr Ignore all "com.apple.*" extended attributes (supported on OSX only) -o, --option stringArray Option for libfuse/WinFsp (repeat if required) --poll-interval duration Time to wait between polling for changes, must be smaller than dir-cache-time and only on supported remotes (set 0 to disable) (default 1m0s) --read-only Only allow read-only access --uid uint32 Override the uid field set by the filesystem (not supported on Windows) --umask int Override the permission bits set by the filesystem (not supported on Windows) --vfs-cache-max-age duration Max age of objects in the cache (default 1h0m0s) --vfs-cache-max-size SizeSuffix Max total size of objects in the cache (default off) --vfs-cache-mode CacheMode Cache mode off|minimal|writes|full (default off) --vfs-cache-poll-interval duration Interval to poll the cache for stale objects (default 1m0s) --vfs-case-insensitive If a file name not found, find a case insensitive match --vfs-fast-fingerprint Use fast (less accurate) fingerprints for change detection --vfs-read-ahead SizeSuffix Extra read ahead over --buffer-size when using cache-mode full --vfs-read-chunk-size SizeSuffix Read the source objects in chunks (default 128Mi) --vfs-read-chunk-size-limit SizeSuffix If greater than --vfs-read-chunk-size, double the chunk size after each chunk read, until the limit is reached ('off' is unlimited) (default off) --vfs-read-wait duration Time to wait for in-sequence read before seeking (default 20ms) --vfs-used-is-size rclone size Use the rclone size algorithm for Used size --vfs-write-back duration Time to writeback files after last use when using cache (default 5s) --vfs-write-wait duration Time to wait for in-sequence write before giving error (default 1s) --volname string Set the volume name (supported on Windows and OSX only) --write-back-cache Makes kernel buffer writes before sending them to rclone (without this, writethrough caching is used) (not supported on Windows)

Use "rclone [command] --help" for more information about a command. Use "rclone help flags" for to see the global flags. Use "rclone help backends" for a list of supported services. Command mount needs 2 arguments maximum: you provided 3 non flag arguments: ["debrid:" "/mnt/cache/real-debrid" "–daemon"]

carloss66 commented 6 months ago

Did you create the share from step 3?

On May 5, 2024, at 3:44 PM, 7gp @.***> wrote:

I'm getting a "Fatal error: mount not ready" error when attempting to do step 9. Any help?

— Reply to this email directly, view it on GitHubhttps://github.com/itsToggle/plex_debrid/issues/492#issuecomment-2094961220, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYMGBWIRLV2UVQGLUVPWLDZA2R3HAVCNFSM6AAAAAAZE32WEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHE3DCMRSGA. You are receiving this because you authored the thread.Message ID: @.***>

7gp commented 6 months ago

Did you create the share from step 3? On May 5, 2024, at 3:44 PM, 7gp @.> wrote: I'm getting a "Fatal error: mount not ready" error when attempting to do step 9. Any help? — Reply to this email directly, view it on GitHub<#492 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYMGBWIRLV2UVQGLUVPWLDZA2R3HAVCNFSM6AAAAAAZE32WEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHE3DCMRSGA. You are receiving this because you authored the thread.Message ID: @.>

Yes

carloss66 commented 6 months ago

Ok. Make sure you use your share name in the mount command.

On Sun, May 5, 2024 at 4:57 PM 7gp @.***> wrote:

Did you create the share from step 3? On May 5, 2024, at 3:44 PM, 7gp @.> wrote: I'm getting a "Fatal error: mount not ready" error when attempting to do step 9. Any help? — Reply to this email directly, view it on GitHub<#492 (comment) https://github.com/itsToggle/plex_debrid/issues/492#issuecomment-2094961220>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAYMGBWIRLV2UVQGLUVPWLDZA2R3HAVCNFSM6AAAAAAZE32WEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHE3DCMRSGA https://github.com/notifications/unsubscribe-auth/AAYMGBWIRLV2UVQGLUVPWLDZA2R3HAVCNFSM6AAAAAAZE32WEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHE3DCMRSGA. You are receiving this because you authored the thread.Message ID: @.>

Yes

— Reply to this email directly, view it on GitHub https://github.com/itsToggle/plex_debrid/issues/492#issuecomment-2094984242, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAYMGBU76KXUAJWBJJNV4B3ZA22NXAVCNFSM6AAAAAAZE32WEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUHE4DIMRUGI . You are receiving this because you authored the thread.Message ID: @.***>