# Configuration variables

> Every environment variable of Stuarty, with its default.

Source: https://stuarty.com/docs/reference/configuration/

All variables are optional.

| Variable | Default | Meaning |
| --- | --- | --- |
| `STUARTY_HOME` | `~/.stuarty` | workspace directory |
| `STUARTY_ALLOW_DEFAULT_HOME` | none | `1` lets a build that is not a release, and a test, open the default workspace `~/.stuarty`; without it they refuse with `E_INVALID_STATE` and a message that names `STUARTY_HOME` (SDD-007 section 3.10). A release build never needs it. Not read under a former name |
| `STUARTY_ADDR` | `127.0.0.1:7878` | bind address; a non-loopback address requires network mode |
| `STUARTY_MODE` | `local` | `local` or `network` |
| `STUARTY_FFMPEG`, `STUARTY_FFPROBE` | discovered | explicit binaries |
| `STUARTY_ENCODER` | automatic | force an H.264 encoder by FFmpeg name |
| `STUARTY_ALLOW_USER_X264` | `false` | allow `libx264` when the user's own FFmpeg has it |
| `STUARTY_OPENH264_DIR` | none | the folder of Cisco's OpenH264 library that the own FFmpeg build loads at run time (SDD-011 §8.4). The server sets it for the FFmpeg child process only, and only when the library passed verification; a person never sets it, and the server ignores a value it did not set. Read by the build `ffmpeg-9.0.2-3` and later; the builds up to `ffmpeg-9.0.2-2` read `VUKEM_VIDEO_OPENH264_DIR` (section 13.3), so the server sets both while those builds are installed |
| `STUARTY_EXPORT_RENDERER` | `go` | what draws the exported frames: `go` (the compositor in Go), `rust` (the renderer of `renderer/`, a WebAssembly module under `wazero`, which draws the same bytes: SDD-013 §3.10) or `gpu` (the native GPU host `stuarty-render` when the machine has a graphics adapter, `rust` otherwise: SDD-013 §4.9). Any other value stops the server at start. The default changes only when the stage C gate passes on every system |
| `STUARTY_IMPORT_ROOTS` | none | in network mode, directories from which import by path is allowed |
| `STUARTY_MAX_EXPORTS` | `2` | concurrent exports per workspace |
| `STUARTY_MAX_IMPORT_BYTES` | `8589934592` (8 GiB) | largest file accepted by import |
| `STUARTY_TRANSCRIBE_URL`, `STUARTY_TRANSCRIBE_KEY`, `STUARTY_TRANSCRIBE_MODEL` | none | OpenAI-compatible transcription API; when unset, the local provider is used |
| `STUARTY_WHISPER_MODEL` | `small` | local model name: `tiny`, `base`, `small` or `large-v3-turbo` |
| `STUARTY_TEST_TRANSCRIBER` | none | test only: `stub` selects a provider that answers every audio with four fixed words (`hello` 100-400 ms, `brave` 400-700, `new` 1100-1400, `world` 1400-1900, language `en`). Honoured only with `APP_ENV=test` in local mode; with any other `APP_ENV`, in network mode, or with any other value the server refuses to start. Never set in production |
| `STUARTY_TEST_SOCIAL_URL` | none | test only: the address (`http://127.0.0.1:&lt;port&gt;`) of a server on loopback that plays a social network; the build then also offers the network `fake`, which speaks only to that address (SDD-020 §12). Honoured in local mode only; any other address, scheme or mode and the server refuses to start. Honoured only with `APP_ENV=test`; with any other `APP_ENV` the server refuses to start and names the variable (SDD-007 T-67). Never set in production |
| `STUARTY_TEST_SIGNIN_URL` | none | test only: the address (`http://127.0.0.1:&lt;port&gt;`) of a server on loopback that plays the sign-in to an AI provider; Sign in with ChatGPT and OpenRouter then authorize, exchange and call the API at that address (SDD-016 §12.5). Honoured in local mode only; any other address, scheme or mode and the server refuses to start. Honoured only with `APP_ENV=test`; with any other `APP_ENV` the server refuses to start and names the variable (SDD-007 T-67). Never set in production |
| `STUARTY_MAX_EXPORTS_PER_KEY` | `1` | concurrent exports running per actor (two more may wait) |
| `STUARTY_MAX_INGESTS` | `2` | concurrent ingests per workspace |
| `STUARTY_MAX_TRANSCRIBES` | `1` | concurrent transcriptions per workspace |
| `STUARTY_MAX_TRANSCRIBES_PER_KEY` | `1` | transcriptions of one actor (key or user) that are queued or running; the same rule as `MAX_EXPORTS_PER_KEY` |
| `STUARTY_MAX_IMPORT_SECONDS` | `14400` | longest source accepted by import |
| `STUARTY_MAX_IMPORT_PIXELS` | `33177600` | largest source frame (7680 x 4320); no side above 8192 |
| `STUARTY_MAX_TRANSCRIBE_SECONDS` | `7200` | longest audio per transcription job |
| `STUARTY_MAX_EXPORT_BYTES` | `4294967296` (4 GiB) | largest exported file |
| `STUARTY_MIN_FREE_BYTES` | `2147483648` (2 GiB) | writes are refused below this free space on the workspace volume |
| `STUARTY_CAPTURE_HELPER` | next to the server binary | absolute path of `stuarty-capture`, the native capture helper (SDD-025 §7) |
| `STUARTY_MAX_RECORDING_SECONDS` | `14400` | longest screen recording, 1 to 14400 (SDD-025 §5) |
| `STUARTY_CACHE_MAX_BYTES` | `2147483648` (2 GiB) | size of the frame, bitmap and processed-sound caches (`frames/`, `bitmaps/`, `audio-previews/`) before eviction |
| `STUARTY_RATE_LIMIT_PER_MINUTE` | `300` | requests per minute per key or local token |
| `STUARTY_RATE_LIMIT_SESSION_PER_MINUTE` | `1800` | requests per minute per browser session |
| `STUARTY_RATE_LIMIT_HEAVY_PER_MINUTE` | `10` | calls of `JobStart`, `MediaImport`, `TemplateImport`, `ProjectBundleExport`, `ProjectBundleImport`, `FontImport`, `ProjectOtioImport` and `AudioMeasure` per minute per credential (SDD-007 section 4.4); one list, the same on the documentation pages and in the OpenAPI document |
| `STUARTY_SANDBOX` | `none` | `bwrap` runs FFmpeg and whisper.cpp in a sandbox on Linux |
| `STUARTY_INSECURE_ALLOW_ROOT` | `false` | allow network mode as root |
| `STUARTY_LAUNCHER_SECRET` | none | set only by the desktop shell in the environment of the server it starts (SDD-007 §5.3); the server reads it once and removes it; never set it by hand or write it to a file |
| `STUARTY_MASTER_KEY`, `STUARTY_MASTER_KEY_FILE` | none | the master key of the vault as base64 or 64 hex digits, or the path of a file that holds it (a Docker secret); without either, a desktop uses the operating system keychain (SDD-014 §4) |
| `STUARTY_ADMIN_EMAIL`, `STUARTY_ADMIN_PASSWORD` | none | network mode: create the first administrator at start-up when no user exists |
| `STUARTY_URL`, `STUARTY_KEY` | none | client side: make the CLI and the stdio MCP server talk to a remote server with an API key |
| `STUARTY_PROJECT` | none | client side: the default project of CLI commands that take one |
| `STUARTY_HARNESS`, `STUARTY_HARNESS_PASSWORD` | none | release tooling only (`internal/tools/agentharness`, never in a shipped binary): `STUARTY_HARNESS=1` allows the paid agent harness to run; `STUARTY_HARNESS_PASSWORD` is the password of its local account in the first-flow scenario, read from the environment so it is not on the command line; the harness gives the `stuarty` process it runs only an allow-list of variables, never a provider key |
| `OTEL_EXPORTER_OTLP_ENDPOINT` | none | turns on OpenTelemetry (ADR-0026) |

## Variables of the server and of the server package

The framework the server is built on reads these, with its own names: `APP_URL`, `APP_KEY`, `TLS_CERT_FILE`, `TLS_KEY_FILE`, `TRUSTED_PROXIES`, `TRUST_FORWARDED_PROTO`, `SHUTDOWN_TIMEOUT`, `DB_MAX_OPEN`. `APP_KEY` is required in network mode (32 bytes or more, base64).

The scripts and the compose file of `deploy/` read these, never the program itself: `STUARTY_DOMAIN`, `STUARTY_VERSION`, `STUARTY_ACME_EMAIL`, `STUARTY_TLS_DIRECTIVE`, `STUARTY_SUBNET`, `STUARTY_CADDY_IP`, `STUARTY_MAX_BODY`, `STUARTY_HEALTH_TIMEOUT`, `STUARTY_HTTPS_TIMEOUT`.

## Names before the rename

The product has had another name. The variables of that name are still read for a while: see [Migrating from the former name](/docs/migration).
