RDT-Client Documentation

repository·main·Indexed 23 days ago

https://github.com/rogerfar/rdt-client

A web-based management interface for Real-Debrid, AllDebrid, Premiumize, TorBox, and DebridLink. RDT-Client automates the downloading and unpacking of torrents and Usenet files to a local machine by emulating a qBittorrent API, enabling integration with automation tools like Sonarr, Radarr, and Couchpotato. It supports multiple downloaders including Bezzad, Aria2c, Symlink (rclone), and Synology Download Station.

Tokens
5.2K
Snippets
10
Records
25
Agent score
79%

What's inside RDT-Client

  1. Overview of RDT-Client features

    main

    RDT-Client is a web interface designed to manage torrents and Usenet downloads on premium debrid services. It acts as a bridge between your debrid provider and your local machine.

    Supported Services:

    • Real-Debrid
    • AllDebrid
    • Premiumize
    • TorBox (Supports NZB files)
    • DebridLink
    • TorBox (Supports NZB files)

    Key Capabilities:

    • Torrent/Usenet Management: Add torrents via magnets or files, and add Usenet downloads via NZB files (TorBox and Premiumize only).
    • Automated Local Downloads: Automatically downloads files from your provider to your local machine.
    • Post-Processing: Unpacks files automatically once the download is complete.
    • Integration: Implements a fake qBittorrent API, allowing it to be used as a download client for automation tools like Sonarr, Radarr, or Couchpotato.
  2. Set environment variables from files (Docker secrets)

    main

    To use sensitive information or long strings stored in files, prepend the environment variable name with FILE__. The value of the variable will be the content of the specified file.

    Example: -e FILE__PASSWORD=/run/secrets/mysecretpassword sets the PASSWORD environment variable to the contents of /run/secrets/mysecretpassword.

    -e FILE__PASSWORD=/run/secrets/mysecretpassword
  3. Install rdt-client via Docker CLI

    main

    You can run rdt-client directly using the docker run command. Ensure you replace the placeholder paths with actual directories on your host machine.

    docker run -d \
      --name=rdtclient \
      -e PUID=1000 \
      -e PGID=1000 \
      -e TZ=Europe/London \
      -p 6500:6500 \
      -v <path to data>:/data/db \
      -v <path/to/downloads>:/data/downloads \
      --restart unless-stopped \
      rogerfar/rdtclient
  4. Install RDT-Client on Windows

    main

    To run RDT-Client on Windows, follow these steps:

    1. Prerequisites: Install the ASP.NET Core Runtime 10.0.0 and the SDK from the .NET download page.
    2. Extraction: Download the latest zip file from the Releases page and extract it to your desired host directory.
    3. Configuration: Open appsettings.json and update the following paths to absolute paths on your host:
      • LogLevel -> Path
      • Database -> Path
      • Note: When using Windows paths in the JSON file, you must escape the backslashes. Example: D:\RdtClient\db\rdtclient.db
    4. Execution:
      • To run the client manually: Execute RdtClient.Web.exe.
      • To run as a background service: Execute service-install.bat. This installs RdtClient.Web.exe as a Windows service so it starts automatically when the computer boots. This is recommended for users integrating with Sonarr/Radarr.
  5. Perform First Login and Initial Setup

    main

    After starting RdtClient, access the Web UI at http://127.0.0.1:6500 (or your server's IP).

    1. Credentials: The first username and password you enter will be saved for all future logins.
    2. Real-Debrid API Key: Navigate to Settings and enter your API key from https://real-debrid.com/apitoken.
    3. Path Configuration:
      • Docker users: The Download path must match your Docker volume mapping (default is /data/downloads). The Mapped path must be the destination path on your host.
      • Windows users: Both Download path and Mapped path should be paths on your host machine.
  6. Connect Sonarr or Radarr (Usenet/NZB)

    main

    RdtClient emulates the SABnzbd API for NZB downloads (requires a provider like TorBox or Premiumize).

    1. In Sonarr/Radarr, go to SettingsDownload Client and add SABnzbd.
    2. Host: IP or hostname of RdtClient.
    3. Port: 6500.
    4. Use SSL: Enable only if using HTTPS.
    5. URL Base: Leave empty unless RdtClient uses a BasePath (e.g., /rdt).
    6. Authentication:
      • If RdtClient auth is enabled: Leave API Key empty; enter username/password in the standard fields.
      • If RdtClient auth is disabled: Enter any value in API Key (e.g., rdtclient) and leave username/password empty.
    7. Category: Set to sonarr or radarr.

    Note: In Docker, you may need Remote Path Mapping in Sonarr/Radarr so they can access the paths reported by RdtClient.

  7. Install RdtClient as a Linux Service

    main

    If you are not using Docker, you can install RdtClient directly on Linux as a systemd service.

    1. Install .NET 10: Follow the official Microsoft instructions for your distribution (e.g., Ubuntu 20.04).
    2. Download and Extract: Get the latest release archive from GitHub, unzip it to your desired directory (e.g., ~/rdtc), and enter that directory.
    3. Configure Database: In appsettings.json, update the Database Path to a path on your host. Ensure all parent directories exist. You can remove /data/db/ from the default path for simplicity.
    4. Test Execution: Run dotnet RdtClient.Web.dll and verify you can access http://<ipaddress>:6500.
    5. Create systemd Service: Create a file at /etc/systemd/system/rdtc.service with the following content, ensuring you update the WorkingDirectory and User fields:
    [Unit]
    Description=RdtClient Service
    
    [Service]
    WorkingDirectory=/home/<username>/rdtc
    ExecStart=/usr/bin/dotnet RdtClient.Web.dll
    SyslogIdentifier=RdtClient
    User=<username>
    
    [Install]
    WantedBy=multi-user.target
    1. Enable and Start: Run sudo systemctl daemon-reload, sudo systemctl enable rdtc, and sudo systemctl start rdtc.
    # Example systemd service configuration
    [Unit]
    Description=RdtClient Service
    
    [Service]
    WorkingDirectory=/home/<username>/rdtc
    ExecStart=/usr/bin/dotnet RdtClient.Web.dll
    SyslogIdentifier=RdtClient
    User=<username>
    
    [Install]
    WantedBy=multi-user.target
  8. Install rdt-client via Docker Compose

    main

    The recommended way to deploy rdt-client is using Docker Compose. This configuration maps the application data and download directories to your host machine and sets the necessary user permissions.

    Key Configuration:

    • PUID and PGID: Set these to match your host user's ID to avoid permission issues with volumes.
    • TZ: Set your preferred timezone (e.g., Europe/London).
    • volumes:
      • <path to data>:/data/db: Persists application database and settings.
      • <path to downloads>:/data/downloads: The location where downloaded files will be stored on your host.
    version: '3.3'
    services:
      rdtclient:
        image: rogerfar/rdtclient
        container_name: rdtclient
        environment:
          - PUID=1000
          - PGID=1000
          - TZ=Europe/London
        volumes:
          - <path to data>:/data/db
          - <path to downloads>:/data/downloads
        logging:
           driver: json-file
           options:
              max-size: 10m
        ports:
          - 6500:6500
        restart: unless-stopped
  9. Connect Sonarr or Radarr (Torrents)

    main

    RdtClient emulates the qBittorrent web protocol.

    1. In Sonarr/Radarr, go to SettingsDownload Client and add qBittorrent.
    2. Host: IP or hostname of RdtClient.
    3. Port: 6500.
    4. Username/Password: Your RdtClient credentials.
    5. Category: Set to sonarr or radarr.

    Note: Progress and ETA in Sonarr/Radarr will be inaccurate, but the client will correctly report completion for processing. Files will be downloaded to a subfolder named after the category (e.g., C:\Downloads\sonarr).

  10. Update rdt-client container

    main

    To update rdt-client to the latest version, you must pull the new image and recreate the container.

    1. Pull the latest image: docker-compose pull rdtclient (or docker-compose pull for all services).
    2. Recreate the container: docker-compose up -d rdtclient.
    3. Clean up old images: docker image prune.

    Via Docker CLI

    1. Pull the latest image: docker pull rogerfar/rdtclient.
    2. Stop and remove the current container: docker stop rdtclient and docker rm rdtclient.
    3. Run the docker run command again with your original parameters to recreate the container.
    4. Clean up old images: docker image prune.
  11. Configure Synology Download Station

    main

    Hands files to a Synology NAS. Files do not pass through RdtClient, keeping memory usage low.

    Prerequisites:

    • Install/start Download Station on Synology.
    • Use a DSM account with Download Station AND File Station permissions. Disable 2-step verification for this account.
    • Ensure the account has a Default destination set in Download Station (Settings → BT/HTTP/FTP/NZB → Location → Default destination).

    Options:

    • Url: The Synology DownloadStation URL (e.g., http://192.168.1.50:5000).
    • Username/Password: DSM credentials.
    • Download Path: The destination on the Synology, relative to a shared folder (e.g., Media/Downloads/Torrents), not an absolute path.

    Important Path Mapping: The Synology Download Path and the RdtClient Download path must resolve to the exact same physical folder on the NAS.