Risuko
Configuration

Configuration

Risuko configuration reference — all available options.

Risuko stores configuration in two JSON files in the config directory:

  • system.json — System-level defaults (created on first run)
  • user.json — User overrides

User settings take precedence over system defaults.

Config Directory Locations

EnvironmentPath
macOS~/Library/Application Support/dev.risuko.app
Linux~/.config/dev.risuko.app
Windows%APPDATA%\dev.risuko.app
Desktop AppManaged by Tauri (platform-specific app data)
Node.js APIConfigurable via EngineConfig.configDir

Reading Configuration

CLI

# List all settings
risuko config list

# Get a specific value
risuko config get dir

# JSON output
risuko config list --json

Node.js

import { getGlobalOption } from "@risuko/risuko-js";

const options = await getGlobalOption();
console.log(options.dir);
console.log(options["max-concurrent-downloads"]);

Writing Configuration

CLI

risuko config set dir '"/home/user/downloads"'
risuko config set max-concurrent-downloads '"5"'

Values must be valid JSON. Strings need double quotes inside quotes: '"value"'

Node.js

import { changeGlobalOption } from "@risuko/risuko-js";

await changeGlobalOption({
  dir: "/home/user/downloads",
  "max-concurrent-downloads": "5",
});

Option Reference

General

KeyDefaultDescription
dirOS defaultDefault download directory
max-concurrent-downloads5Maximum parallel download tasks
continuetrueResume interrupted downloads
purge-record-on-startfalseWhen the engine starts, drop completed/stopped task records from the session. On-disk files for stopped torrent tasks are preserved (the librqbit orphan-purge step is told to keep files for those info-hashes); HTTP/FTP/etc. payloads on disk are never touched

Connection

KeyDefaultDescription
split16Connections per download (HTTP/HTTPS); ignored when the file is smaller than min-split-size or the server doesn't support Range
min-split-size1MMinimum segment size before the file is split (bytes; accepts K/M/G suffixes)

Speed Limiting

KeyDefaultDescription
max-overall-download-limit0Global download speed limit (bytes/s, 0 = unlimited)
max-overall-upload-limit0Global upload speed limit (bytes/s)
max-download-limit0Per-task download speed limit

HTTP

KeyDefaultDescription
user-agentChrome UA stringDefault user agent string
refererDefault HTTP referer
headerDefault HTTP headers (array)
all-proxyProxy server URL. Accepts http://, socks5://, or socks5h:// (use socks5h to resolve hostnames through the proxy). https:// proxies are not supported
load-cookiesPath to a Netscape/Mozilla format cookies.txt (also accepts curl/wget output) loaded into the per-task cookie jar
netrc-path~/.netrc (%USERPROFILE%\_netrc on Windows)Override the .netrc file used to inject HTTP Basic auth when a URL has no embedded credentials
no-netrcfalseSkip .netrc lookup entirely

Reliability

KeyDefaultDescription
connect-timeout60Connect timeout in seconds for HTTP/HTTPS/FTP
lowest-speed-limit0Stalled-transfer threshold in bytes/s. If the EMA stays below this for lowest-speed-limit-timeout, the worker is aborted (and restarted when auto-retry is enabled). 0 disables the watchdog
lowest-speed-limit-timeout30How many seconds the transfer must stay below lowest-speed-limit before it is considered stalled
uri-selectorfeedbackMirror selection strategy when a task has multiple URIs: feedback (drop slow/failing mirrors), inorder (try left-to-right), or adaptive (prefer fastest)

Low-Speed Auto-Recovery

A separate watchdog from lowest-speed-limit. The renderer's EngineClient samples active task speeds, and any task whose downloadSpeed stays under low-speed-threshold for 3 consecutive polling ticks is force-paused and resumed (with a 30-second per-task cooldown between recovery cycles).

KeyDefaultDescription
auto-detect-low-speed-tasksfalseMaster switch. When false, the recovery loop never runs
low-speed-threshold20Speed threshold in KB/s below which a task counts toward the strike count

Pause/resume only revives a single stalled TCP connection — useful for HTTP/HTTPS, FTP/SFTP, and HTTP-segment streams (m3u8, YouTube). Peer-swarm protocols (BitTorrent, ED2K, ADC, Gnutella, G2, giFT) are explicitly excluded from this recovery: pause tears down peer connections, aborts in-flight tracker announces and choke negotiations, and the swarm spends minutes warming up again. Tasks whose kind is not in {http, ftp, youtube, m3u8}, or whose kind is missing, are skipped.

Storage

KeyDefaultDescription
file-allocationfallocDisk reservation strategy. falloc reserves real blocks via fallocate(2) (Linux) or fcntl(F_PREALLOCATE) (macOS), falling back to set_len. trunc only sets the file length. none lets writes grow the file as needed. The aria2 alias prealloc is accepted as a synonym for falloc
auto-file-renamingtrueWhen the target output file already exists, append .1, .2, … instead of overwriting
remote-timefalseStamp the local file mtime from the server's Last-Modified header on completion (per-task)
use-remote-file-timeUI/global preference mirrored into per-task remote-time when set
m3u8-output-formattsContainer produced after concatenating HLS segments (ts keeps the original transport stream; other values trigger a remux)
file-category-dirsPer-category default directory overrides (object keyed by category id, e.g. { "video": "/downloads/video" }); applied as a fallback when no routing rule matches

BitTorrent

KeyDefaultDescription
keep-seedingfalseSeed until manually stopped (overrides seed-time / seed-ratio)
seed-ratio0Stop seeding at this ratio (0 = no ratio limit)
seed-time0Seed for this many minutes after completing (0 = no time limit)
bt-trackerAdditional tracker URLs (comma-separated)
bt-max-peers-per-torrent100Max concurrent peer connections per torrent (engine restart)
bt-max-outstanding-per-peer128Max pipelined chunk requests per peer (engine restart)
bt-enable-upnptrueMap the listen port on the router via UPnP IGD (engine restart)
bt-upnp-lease300UPnP mapping lease in seconds (engine restart)
bt-enable-lsdtrueBEP-14 Local Service Discovery via multicast (engine restart)
bt-encryption-policypreferMSE/PE policy: plaintext, prefer, or require (engine restart)
bt-listen-v6falseAlso bind an IPv6 TCP listener on the same port (engine restart)
bt-create-subfoldertrueWhen true, multi-file torrents and magnets are placed under <dir>/<name>/. When false, files are written directly into dir. Single-file torrents are unaffected. Read on each task add (no restart needed); accepted as a per-task option override

The DHT (BEP-5) is always enabled and runs as a dual-stack client when an IPv6 socket can be bound. The BitTorrent listener uses an ephemeral port; the legacy aria2 keys listen-port, dht-listen-port, enable-dht, enable-dht6, enable-peer-exchange, and bt-enable-lpd are accepted for backwards compatibility but currently have no effect.

RPC

KeyDefaultDescription
rpc-listen-port16800RPC server port
rpc-host127.0.0.1RPC bind address (set to 0.0.0.0 for LAN access)
rpc-secretRPC authentication token

YouTube (yt-dlp)

KeyDefaultDescription
youtube-formatyt-dlp defaultyt-dlp -f format selector (e.g. bestvideo+bestaudio/best, mp4)

RSS

See the RSS Feeds guide for the full workflow. RSS subscriptions, items, and rules are persisted via the desktop app's storage; the keys below are user-level UI preferences.

KeyDefaultDescription
rss-auto-updateEnable periodic feed polling (boolean; controlled from the RSS panel)
rss-update-intervalPolling interval in minutes between automatic refreshes

Task Routing

See the Task Routing guide.

KeyDefaultDescription
task-routing-rules[]Array of { id, label, pattern, dir, enabled } rules. The first enabled rule whose case-insensitive glob pattern matches the inferred filename wins; dir overrides the download directory and label is exposed as the task tag. Falls through to file-category-dirs then global dir

Completion Scripts

Run a script after every download finishes (success or failure). Per-task overrides are accepted via the desktop app's task options. See the Completion Scripts guide.

KeyDefaultDescription
completion-script-enabledfalseMaster switch. When false, no script runs even if command is set
completion-script-commandAbsolute path to the executable to invoke (no shell parsing)
completion-script-argsWhitespace-tokenised arguments template. Supported placeholders inside any token: {path} (final file path), {hash} (task GID), {status} (complete / error / cancelled). The same values are also exported as RISUKO_PATH, RISUKO_HASH, RISUKO_STATUS env vars
completion-script-timeout-ms30000Per-invocation timeout in milliseconds. Clamped to 1000300000 (5 minutes). stdout/stderr captured into the log are truncated to 8 KiB

Saved Credentials

KeyDefaultDescription
saved-credentials[]Non-secret credential profile metadata (id, label, scope, username). Passwords and SSH private keys are stored separately in the OS keychain (risuko-credentials service) and never written to user.json

Legacy P2P / IPC stacks

KeyDefaultDescription
adc-hubDefault ADC / DC hub URI (adc(s)://, dchub://, nmdc://) used as a hint when a file URI doesn't include one
adc-nickNickname presented to the ADC / DC hub
gnutella-cacheGWebCache URLs (comma-separated) used to bootstrap Gnutella ultrapeers
g2-cacheBootstrap caches for the Gnutella2 (G2) network
gift-enabledfalseAllow gift:// URIs to be forwarded to a local giftd daemon
gift-host127.0.0.1giFT IPC bind address
gift-port1213giFT IPC port

External Engine

By default the desktop app boots an embedded engine in-process. Switch to External Engine mode to point the UI at a separately running risuko-cli serve (or any aria2-compatible RPC server). When enabled, the embedded engine is not started; all add_uri, polling, and config writes are routed over JSON-RPC.

KeyDefaultDescription
external-engine-enabledfalseSkip the embedded engine and connect to a remote RPC server instead
external-engine-hostHostname or IP of the remote RPC server
external-engine-port16800Port of the remote RPC server
external-engine-secretToken to send as token:<secret> on each call

Startup-only Keys

The following keys are read once when the engine starts. Changing them at runtime is accepted (the value is persisted) but does not take effect until the engine is restarted (Quit & relaunch the desktop app, or restart risuko serve):

dht-listen-port, ed2k-port, listen-port, rpc-listen-port, rpc-secret, bt-max-peers-per-torrent, bt-max-outstanding-per-peer, bt-enable-upnp, bt-upnp-lease, bt-enable-lsd, bt-encryption-policy, bt-listen-v6.

All other keys are hot-reloaded on the next task or polling cycle.

On this page