Riparr is a standalone, independent download client manager designed to act as a SABnzbd-compatible API endpoint for the *Arr stack (Sonarr/Radarr).
Instead of maintaining a shared database with an indexer, it is completely self-contained. It retrieves stateless download instructions from Base64-encoded payloads embedded directly in the incoming download URLs forwarded by Sonarr/Radarr and runs them in the background using ani-cli or yt-dlp. It works hand-in-hand with Otakarr to resolve and stream titles automatically.
- URL Interception: Sonarr adds a download task using
mode=addurlby passing a URL as thenameparameter. - Payload Extraction: The application extracts the
payloadquery parameter from the URL, decodes the Base64 JSON string, and gets the download metadata. - Queueing: A unique job ID (
nzo_id) is generated. The task is saved into an isolated, local SQLite database (downloads.db) and handed to an asynchronous background worker. - Execution:
- If a direct
StreamUrlis provided in the payload, the worker runsyt-dlpto download the raw stream. - If no direct
StreamUrlis provided (or if theSiteisani-cli), the worker runsani-clinon-interactively to search and download.
- If a direct
- Real-time Tracking: The worker intercepts process stdout/stderr streams, parses progress percentages and download speeds dynamically, and writes updates to SQLite.
- Completed Download Handling: Files are downloaded to
/downloads/incompleteand, upon successful completion, moved atomically to/downloads/completedusing clean names matching Sonarr's parser formatting.
The indexer/scraper must embed the download details in a URL parameter named payload containing a Base64-encoded JSON string:
{
"site": "mock_scraper",
"id": "scraper-specific-stream-or-episode-id",
"title": "Anime Title",
"season": 1,
"ep": 12,
"stream_url": "https://example.com/direct-stream.mp4",
"resolution": "1080p",
"source": "SubsGroup"
}If stream_url is empty or not provided, the application will fallback to downloading via ani-cli using search based on title and ep.
Below is the recommended configuration to deploy Riparr and Otakarr together in a unified network:
services:
otakarr:
image: ghcr.io/fofola1/otakarr:latest
container_name: otakarr
restart: unless-stopped
ports:
- "8000:8000"
environment:
- PORT=8000
- DOWNLOADER_URL=http://riparr:8080/api/sabnzbd
- API_KEY=your_shared_indexer_token
riparr:
image: ghcr.io/fofola1/riparr:latest
container_name: riparr
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./downloads:/downloads
environment:
- API_KEY=riparr-token
- TZ=Europe/Bratislava
- PORT=8080Ensure native dependencies are installed:
sudo pacman -S yt-dlp aria2 ffmpeg
# Ensure ani-cli is installed and in PATHRun locally:
cd src
dotnet runTo configure Riparr as a download client in Sonarr or Radarr:
- Navigate to Settings > Download Clients and click Add (+).
- Select SABnzbd (under the Usenet category).
- Set the following parameters:
- Name:
Riparr - Host:
localhost(or the IP address of the container) - Port:
8080 - Url Base: (leave blank)
- API Key:
riparr-token(matching theAPI_KEYenv variable) - Use SSL:
No - Category:
tv(must match the category sent from Sonarr)
- Name:
- Click Test to verify. Sonarr will query
mode=version, which will return3.7.2indicating a successful connection. - Click Save.