qBitTorrent mock api for *Arr's to forward requests to real debrid
qDebrid creates a 'fake' QBitTorrent server with the endpoints necessary for *Arrs services to add/remove/scan for media, qDebrid will forward these requests to your real debrid account.
The image for this project is available on Docker at ghcr.io/sushydev/qdebrid:latest
. Below is an example of a docker-compose.yml
file to set up the project:
qdebrid:
container_name: qdebrid
image: ghcr.io/sushydev/qdebrid:latest
restart: unless-stopped
network_mode: host # Preferable if using a specific network
volumes:
- ./qdebrid.yml:/app/config.yml # Bind configuration
- ./your-mount-directory:/mnt/your-mount-directory # Make mount available for path checking
- ./logs/qdebrid:/app/logs # Store logs
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8080 || exit 1"]
interval: 1m00s
timeout: 15s
retries: 3
start_period: 1m00s
To build the project manually, you can use the following Go commands:
-
Download Dependencies:
go mod download
-
Build the Project:
CGO_ENABLED=0 GOOS=linux go build -o main main.go
qDebrid uses a config.yml
file (Very important its yml
and not yaml
) with the following properties
Example config.yml
with all its default values. In your own config.yml
you can leave out all the settings that you leave on default.
settings:
qdebrid:
host: ""
port: 8080
# Category name for *Arrs (Sonarr, Radarr, etc.)
category_name: "qdebrid"
# Parent directory where media is saved
save_path: "/mnt/fvs/debrid_drive/media_manager"
# Whether to validate paths when updating *Arrs
validate_paths: true
# Deprecated: Reject if unavailable
allow_uncached: false
# Allowed file types to be considered when adding to RD
allowed_file_types:
- "mkv"
- "mp4"
# Minimum file size in bytes. (500MB)
min_file_size: 500000000
# Log level for the application (e.g., info, debug, warn)
log_level: "info"
real_debrid:
# Your Real Debrid API token
token: ""
qDebrid is tested in Sonarr and Radarr but might work for other services too.
In your Arrs of choice:
- Go to
settings/general
and get your API Key - Go to
settings/downloadclients
and select qBitTorrent - Set the host and port to what you configured (or default localhost & 8080)
- Set the "Username" field to the host of your Arrs service (For example http://localhost:8989 for sonarr)
- Set the "Password" field to the api key of your Arrs service
- Set the "Category" field to what you configured (or default qdebrid)
- Click test to check if it works and save!
Since qDebrid has no clue what entries in your real debrid are related to your Arrs it makes a request to the /history
endpoint of the arrs and only returns entries that have been requested by that specific arrs service.
This way you only see the correct entries in your "Activity" panel in the arrs rather than every entry in your real debrid account with a bunch of warning messages.
Now you're ready to use it
Ensure you have the following installed on your system:
- Go (version 1.23.2 or later)
- Install Dependencies:
go mod download
- Start:
go run main.go
Contributions are welcome! Please follow the guidelines in the CONTRIBUTING.md for submitting changes.
This project is licensed under the GNU GPLv3 License. See the LICENSE file for details.