Configuration, CLI & Paths
This reference lists the startup flags, subcommands, environment variables, and directory layout used by Stravia Server and Stravia Desktop.
Server CLI & subcommands
| Command / Flag | Description | Default |
|---|---|---|
stravia-server | Start the gateway and admin HTTP server | Listens 127.0.0.1:23471 |
stravia-server recover-admin | Reset Server admin username/password & revoke sessions (SQLite only in v0.7.8) | Interactive prompt |
--data-dir <PATH> | Override instance data root | ~/.stravia (Server release) |
--config <PATH> | Override server.toml config file path | <data-dir>/server.toml |
--listen <ADDR> | Bind host and port | 127.0.0.1:23471 |
--admin-origin <ORIGIN> | Allowed admin web origin behind reverse proxy (repeatable) | Same-origin / loopback |
--trusted-proxy <CIDR> | Trusted reverse proxy IP/CIDR for forwarded headers | None |
--updater-url <URL> | Override release/updater check endpoint | https://updater.stravia.cn |
--version | Print binary version and exit | — |
Key environment variables
| Variable | Effect |
|---|---|
STRAVIA_DATA_DIR | Override default data root (--data-dir takes precedence). |
STRAVIA_UPDATER_URL | Override default product update check URL. |
HTTP_PROXY / HTTPS_PROXY / ALL_PROXY / NO_PROXY | Read by Stravia Server when a provider, web provider, or updater uses proxy_mode = "system" (Desktop reads OS proxy settings instead). |
MIMALLOC_PURGE_DELAY | Linux Server builds use mimalloc with MIMALLOC_PURGE_DELAY=0 by default to return unused memory promptly; override if tuning allocator behavior. |
Data directory layout (<data-dir>)
Stravia enforces exclusive access on <data-dir> via .instance.lock:
| Path | Contents |
|---|---|
server.toml | Server [database] and [cache] configuration (backend, url, redis_url, capacity_mb). |
db/gateway.db | SQLite database (when backend = "sqlite"). |
plugins/ | Installed third-party / marketplace Wasm vendor plugins. |
artifacts/ | Local artifact files (when not using S3). |
diagnostics/observation-debug/ | Captured debug traces when Debug is enabled. |
logs/ | Instance startup and runtime logs. |
cache/ | Rebuildable wasmtime-images/ and plugin-admissions/ caches (safe to exclude from backups). |
- Stravia Desktop default root: OS Tauri
app_data_dir()forcn.stravia.agent-infra(e.g.,~/.local/share/cn.stravia.agent-infraon Linux,~/Library/Application Support/cn.stravia.agent-infraon macOS,%APPDATA%\cn.stravia.agent-infraon Windows), overrideable via--data-dirorSTRAVIA_DATA_DIR.
server.toml schema (PostgreSQL + Redis example)
[database]
backend = "postgres"
url = "postgresql://stravia@127.0.0.1:5432/stravia"
max_connections = 10
min_connections = 1
[cache]
capacity_mb = 16
redis_url = "redis://127.0.0.1:6379/0" toml
Runtime settings stored in DB (Settings page)
artifact_settings:{ client_base_url, external_signed_downloads, file_public_base_url, upload_prompt_injection, s3 }outbound_proxy:{"proxies": [{"id", "name", "url"}]}(http://,https://,socks5://,socks5h://; explicit port required, no path/query/fragment;bypassandforce_http1removed in v0.7.8). Companion admin endpoints:GET /api/v1/settings/outbound-proxy/system(sanitized detectedenv/osproxy) andPOST /api/v1/settings/outbound-proxy/probe(exit IP probe across 10 AI domains).update_proxy_mode:"none" | "system" | "<proxy_id>"(defaults to"system"; replaces removedupdate_use_proxy)- Update channel: Managed via
PUT /api/v1/updates/channelwith{"channel": "release" | "beta"}(persisted in DB; rejected on generic/api/v1/settings/*) reversible_redaction_enabled: booleanlog_retention_days: integer days (default 7,minimum 1)