Runtime Configuration Reference
Configure MirrorNeuron CLI, API, runtime, blueprint catalog, and local model connections.
Runtime Configuration Reference
Use this page to configure the deployed MirrorNeuron CLI, FastAPI gateway, Web UI, runtime connection, and blueprint catalog. It covers shared operator-facing settings, not every blueprint-specific variable; a blueprint's manifest.json and configuration files define its own inputs, model settings, and permitted environment access.
Before you change configuration
- Run
mn runtime statusto record the active endpoints and runtime state. - Keep a copy of any deployment-specific configuration and remove secrets before sharing it.
- Restart or re-check affected services after changing a listener, connection target, model, or catalog source.
- Use a unique
MN_REDIS_NAMESPACEfor isolated test runs.
Runtime state and client connection
| Variable | Default | Purpose |
|---|---|---|
MN_ENV | dev | Runtime environment. Use prod only with a reviewed production configuration. |
MN_HOME | ~/.mn | Local state root for runtime metadata, endpoint files, logs, models, and default run records. |
MN_GRPC_TARGET | localhost:55051 for the CLI | Core gRPC target used by CLI and SDK clients. |
MN_GRPC_TIMEOUT_SECONDS | 10 | Per-RPC timeout for CLI, SDK, and API clients. |
MN_GRPC_AUTH_TOKEN | unset | Bearer token for a protected gRPC gateway. Treat as a secret. |
MN_GRPC_ADMIN_TOKEN | unset | Administrative gRPC token. Treat as a secret. |
MN_REDIS_URL | deployment-specific | Redis connection URL used for runtime state. |
MN_REDIS_NAMESPACE | mirror_neuron | Redis key namespace. Use a separate value for tests. |
MN_COOKIE | deployment-specific | Cluster credential. Change it before forming a non-local cluster and treat it as a secret. |
The deployed gRPC endpoint is normally published on port 55051; the Core container can use a distinct internal port. Use mn runtime status instead of assuming a port after a custom deployment.
REST API and Web UI
| Variable | Default | Purpose |
|---|---|---|
MN_API_HOST | localhost | FastAPI bind host. Binding beyond localhost changes the network trust boundary. |
MN_API_PORT | 54001 | FastAPI bind port. |
MN_API_BASE_URL | unset | External API base URL when it differs from the local default. |
MN_API_TOKEN | unset | Enables bearer-token API authentication when configured. Treat as a secret. |
MN_API_REQUEST_SIZE_LIMIT_BYTES | 5242880 | Maximum API request-body size in bytes. |
MN_API_CORS_ALLOW_ORIGINS | unset | Comma-separated CORS allowlist. |
MN_WEB_UI_HOST | localhost | Web UI bind host. |
MN_WEB_UI_PORT | 55173 | Web UI bind port. |
MN_WEB_UI_API_BASE_URL | unset | Web UI upstream API URL. |
MN_WEB_UI_PROXY_TIMEOUT_SECONDS | 30 | Web UI upstream request timeout in seconds. |
Warning: MN_API_HOST or MN_WEB_UI_HOST values that expose a listener beyond localhost require a deliberate network and authentication design. Do not rely on CORS as an authentication boundary.
Blueprint catalog source
| Variable | Default | Purpose |
|---|---|---|
MN_BLUEPRINT_SOURCE | github | Selects github or local catalog resolution. |
MN_BLUEPRINT_REPO | SDK default repository when source is github | Git URL for the catalog. |
MN_BLUEPRINT_LOCAL | unset | Local catalog directory when source is local; it must contain index.json. |
MN_BLUEPRINT_REPO_CACHE | ~/.cache/mirror-neuron/blueprint-repos | Cache root for checked-out catalog repositories. |
Example local catalog configuration:
export MN_BLUEPRINT_SOURCE="local"
export MN_BLUEPRINT_LOCAL="/absolute/path/to/blueprint-catalog"Verify the source before launching a catalog ID:
mn blueprint listUse mn blueprint run --folder <folder> for a reviewed local blueprint folder when you do not need catalog resolution.
Local model and launch controls
| Variable | Default | Purpose |
|---|---|---|
MN_LLM_PROVIDER | blueprint-specific | Selected model provider. |
MN_LLM_MODEL | blueprint-specific | Model name passed to the worker/provider. |
MN_LLM_RUNTIME_MODEL | blueprint-specific | Runtime-managed model reference. |
MN_LLM_API_BASE | provider-specific | OpenAI-compatible model API base when used by the blueprint. |
MN_LLM_API_KEY | unset | Model-provider key. Treat as a secret and pass it only to approved workers. |
MN_PRE_LAUNCH_TIMEOUT_SECONDS | 30 | Pre-launch timeout in seconds. |
MN_POST_LAUNCH_TIMEOUT_SECONDS | 10 | Post-launch timeout in seconds. |
MN_RUN_BACKGROUND_EVENT_RELAY | 1 | Enables background event relay for launched runs. |
Use mn model doctor <model-id> before launching a blueprint that requires a local Docker Model Runner model. Do not put provider keys in a manifest or a committed configuration file.
Logging and CLI behavior
| Variable | Default | Purpose |
|---|---|---|
MN_LOG_LEVEL | INFO | Process log level. |
MN_LOGS_ROOT | ~/.mn/logs | Default log directory. |
MN_LOG_MAX_BYTES | 1048576 | Rotating process-log size in bytes. |
MN_LOG_BACKUP_COUNT | 5 | Rotated process-log files to retain. |
MN_CLI_OUTPUT | rich | Set to plain for non-Rich terminal output. |
MN_RUN_DETACH_LOG_SECONDS | 30 | How long the CLI follows events after submitting a run. |
MN_RUN_LOG_POLL_INTERVAL_SECONDS | 0.5 | CLI polling interval while collecting run events. |
Verify a configuration change
After changing shared configuration, restart or re-check the affected services:
mn runtime health
mn runtime statusFor API configuration, also check:
curl -s http://localhost:54001/api/v1/healthReplace the URL when you changed MN_API_HOST or MN_API_PORT.