Swaparr is configured via environment variables. You can specify connection details for your Starr instance (Radarr, Sonarr, etc.) and tune the monitoring behavior such as scan intervals, strike limits, and size thresholds.
Connection Settings
BASEURL: The URL of your Starr instance (default: http://127.0.0.1:7878).APIKEY: The API key for your Starr instance.PLATFORM: The type of Starr platform being used. Supported values: radarr, sonarr, lidarr, readarr, or whisparr (default: radarr).
Monitoring & Strike Logic
MAX_STRIKES: Maximum strikes a download can accumulate before removal (default: 3).SCAN_INTERVAL: Frequency of stalled download checks (default: 10m).MAX_DOWNLOAD_TIME: Time threshold before a download is considered stalled (default: 2h).IGNORE_ABOVE_SIZE: Files larger than this size are ignored (default: 25GB).STRIKE_QUEUED: If true, queued downloads are eligible for strikes (default: false).REMOVE_FROM_CLIENT: If true, removes from both the queue and the download client. If false, only removes from the Starr instance queue (default: true).
Operational Modes
DRY_RUN: When true, Swaparr runs in sandbox mode and performs no destructive actions (default: false).
| Name | Default | Description |
|--------------------|-------------------------|-----------------------------------------------------------------------------------------------------|
| BASEURL | `http://127.0.0.1:7878` | The URL of a radarr, sonarr or other starr instance. |
| APIKEY | `7f3a8..cbc07` | The API key of a radarr, sonarr or other starr instance. |
| PLATFORM | `radarr` | Indicates the type of starr platform, either `radarr`, `sonarr`, `lidarr`, `readarr` or `whisparr`. |
| MAX_STRIKES | `3` | Maximum number of strikes a download can accumulate before it is removed. |
| SCAN_INTERVAL | `10m` | How often Swaparr checks for stalled downloads. |
| MAX_DOWNLOAD_TIME | `2h` | Maximum allowed download time before it's considered stalled. |
| IGNORE_ABOVE_SIZE | `25GB` | Files larger than this size will be ignored and not monitored. |
| REMOVE_FROM_CLIENT | `true` | Remove from both queue and download client (default) OR `false` only the queue of a starr instance. |
| STRIKE_QUEUED | `false` | When enabled, queued downloads are eligible to be striked instead of being bypassed. |
| DRY_RUN | `false` | Sandbox mode; try Swaparr without it performing destructive actions on your instances. |