Docker image that runs gazelle-origin behind a webhook endpoint to automatically generate origin.yaml files for torrents from Gazelle-based trackers.
docker run -d \
--name gazelle-webhook \
-p 9000:9000 \
-v /path/to/downloads:/data \
-e RED_API_KEY=your_api_key_here \
-e ORIGIN_TRACKER=red \
-e WEBHOOK_SECRET=your_secret_token \
ghcr.io/jee-r/gazelle-origin-webhook:latestversion: '3.8'
services:
gazelle-webhook:
image: ghcr.io/jee-r/gazelle-origin-webhook:latest
container_name: gazelle-webhook
restart: unless-stopped
ports:
- "9000:9000"
volumes:
- /path/to/downloads:/data
environment:
RED_API_KEY: your_api_key_here
ORIGIN_TRACKER: red
WEBHOOK_SECRET: your_secret_tokenStart the container:
docker-compose up -d| Variable | Required | Default | Description |
|---|---|---|---|
RED_API_KEY |
Yes | - | RED API key (how to obtain) |
ORIGIN_TRACKER |
No | red |
Tracker identifier |
WEBHOOK_SECRET |
Recommended | changeme |
Authentication token |
| Path | Description |
|---|---|
/data |
Downloads directory where origin.yaml will be created |
| Port | Description |
|---|---|
9000 |
Webhook HTTP endpoint |
POST http://localhost:9000/hooks/gazelle-origin
Returns the YAML content without writing any file.
POST http://localhost:9000/hooks/gazelle-origin-write
Writes origin.yaml file to the specified directory.
Include the token in the request header:
X-Webhook-Token: your_secret_token
Read-Only Hook:
{
"torrent_identifier": "C380B62A3EC6658597C56F45D596E8081B3F7A5C"
}Write Hook:
{
"torrent_identifier": "C380B62A3EC6658597C56F45D596E8081B3F7A5C",
"output_path": "/data/Artist - Album/origin.yaml"
}Supported identifier formats:
- Info hash
- Torrent ID
- Permalink URL
See gazelle-origin usage for more details.
Read-Only:
curl -X POST http://localhost:9000/hooks/gazelle-origin \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: your_secret_token" \
-d '{"torrent_identifier": "C380B62A3EC6658597C56F45D596E8081B3F7A5C"}'Write File:
curl -X POST http://localhost:9000/hooks/gazelle-origin-write \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: your_secret_token" \
-d '{
"torrent_identifier": "C380B62A3EC6658597C56F45D596E8081B3F7A5C",
"output_path": "/data/Pink Floyd - Dark Side of the Moon/origin.yaml"
}'- Install the Execute plugin in Deluge
- Add a command for the Torrent Complete event:
Write origin.yaml to torrent directory:
curl -X POST http://localhost:9000/hooks/gazelle-origin-write \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: your_secret_token" \
-d "{\"torrent_identifier\": \"%I\", \"output_path\": \"%f/origin.yaml\"}"Read-only (just get metadata):
curl -X POST http://localhost:9000/hooks/gazelle-origin \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: your_secret_token" \
-d "{\"torrent_identifier\": \"%I\"}"If Deluge runs in Docker on the same network, use the container name:
curl -X POST http://gazelle-webhook:9000/hooks/gazelle-origin-write \
-H "Content-Type: application/json" \
-H "X-Webhook-Token: your_secret_token" \
-d "{\"torrent_identifier\": \"%I\", \"output_path\": \"%f/origin.yaml\"}"%I- Info hash (recommended)%n- Torrent name%p- Save path%f- Full file path
The webhook will create an origin.yaml file in the torrent directory containing complete metadata. See gazelle-origin output example for details.
View container logs:
docker logs -f gazelle-webhookThis project combines:
- gazelle-origin by spinfast319
- webhook by adnanh
MIT License