MirrorNeuron Developer Manual

Runtime Configuration Reference

This is the canonical internal reference for shared MirrorNeuron configuration. It covers the CLI, FastAPI gateway, runtime connection, Web UI, local models, and…

Runtime Configuration Reference

This is the canonical internal reference for shared MirrorNeuron configuration. It covers the CLI, FastAPI gateway, runtime connection, Web UI, local models, and blueprint-catalog resolution. Blueprint-specific configuration belongs in the owning manifest and configuration files.

Sources of truth

  • CLI parsing/defaults: mn-cli/mn_cli/config.py.
  • API parsing/defaults: mn-api/mn_api/config_schema.py and mn-api/mn_api/config.py.
  • Blueprint catalog resolution: mn-python-sdk/mn_sdk/blueprint_source.py.
  • Deployment/runtime publication: mn-cli/mn_cli/runtime/server.py, mn-deploy/install.sh, and mn-deploy/docker-compose.yml.

Update this page and mn-doc-site/content/docs/env_variables.mdx whenever a parser, default, validation rule, or secret classification changes.

Inspect before changing state

mn runtime status
mn runtime status

Save sanitized output before changing listener, connection, catalog, model, or credential configuration. Do not commit ~/.mn/docker-compose.env, endpoint files, or secrets.

Runtime state and client connection

VariableDefaultBehavior
MN_ENVdevCLI/API environment. Use prod only with intentional authentication and secret configuration.
MN_HOME~/.mnState root for endpoints, logs, models, and default run records.
MN_GRPC_TARGETlocalhost:55051 in CLICore gRPC target.
MN_GRPC_TIMEOUT_SECONDS10Per-RPC timeout.
MN_GRPC_AUTH_TOKENunsetSensitive gRPC bearer token.
MN_GRPC_ADMIN_TOKENunsetSensitive administrative token.
MN_REDIS_URLdeployment-specificRuntime state-store URL.
MN_REDIS_NAMESPACEmirror_neuronRedis namespace; use a separate value for isolated tests.
MN_COOKIEdeployment-specificSensitive cluster credential. Change before non-local cluster use.

The deployed gRPC endpoint is normally published on port 55051; the Core container can use a distinct internal port. Confirm actual endpoints with mn runtime status after custom deployment.

FastAPI gateway and Web UI

VariableDefaultBehavior
MN_API_HOSTlocalhostFastAPI bind host. The installer defaults it to 0.0.0.0 when the Compose Web UI is enabled so the container can proxy to the host API.
MN_API_PORT54001FastAPI bind port.
MN_API_BASE_URLunsetExternal API base URL; must be absolute HTTP(S) when set.
MN_API_TOKENunsetSensitive bearer token for protected API deployments.
MN_API_REQUEST_SIZE_LIMIT_BYTES5242880Maximum request body size.
MN_API_CORS_ALLOW_ORIGINSunsetComma-separated CORS allowlist.
MN_WEB_UI_HOSTlocalhostWeb UI endpoint host reported by the CLI.
MN_WEB_UI_PORT55173Web UI published/container port.
MN_WEB_UI_BIND_HOST127.0.0.1Compose host address for publishing the Web UI port.
MN_WEB_UI_SOURCE_MODEinstaller-selectedpackage for binary installs; source for local/GitHub installs.
MN_WEB_UI_SOURCE_MOUNTinstaller-selectedRead-only source mount consumed by the Compose Web UI service.
MN_WEB_UI_PACKAGE_VERSIONselected releasePublished package version installed inside the Compose service in package mode.
MN_WEB_UI_API_HOSThost.docker.internalAPI host used by the Web UI container proxy.
MN_WEB_UI_API_BASE_URLunsetWeb UI upstream API URL.
MN_WEB_UI_PROXY_TIMEOUT_SECONDS30Web UI upstream timeout in seconds.

Warning: CORS does not authenticate requests. A non-localhost bind requires firewall, reverse-proxy, authentication, and security-documentation review.

Blueprint catalog resolution

VariableDefaultBehavior
MN_BLUEPRINT_SOURCEgithubMust be github or local.
MN_BLUEPRINT_REPOSDK default repository for Git sourceMust be a Git URL when source is github.
MN_BLUEPRINT_LOCALunsetRequired for local source; must be an existing directory containing index.json.
MN_BLUEPRINT_REPO_CACHE~/.cache/mirror-neuron/blueprint-reposCatalog checkout cache root.
export MN_BLUEPRINT_SOURCE="local"
export MN_BLUEPRINT_LOCAL="/absolute/path/to/blueprint-catalog"
mn blueprint list

Models, launch controls, and logs

VariableDefaultBehavior
MN_LLM_PROVIDERblueprint-specificModel provider.
MN_LLM_MODELblueprint-specificModel name passed to the worker/provider.
MN_LLM_RUNTIME_MODELblueprint-specificRuntime-managed model reference.
MN_LLM_API_BASEprovider-specificOpenAI-compatible API base when used.
MN_LLM_API_KEYunsetSensitive provider key.
MN_PRE_LAUNCH_TIMEOUT_SECONDS30Pre-launch timeout in seconds.
MN_POST_LAUNCH_TIMEOUT_SECONDS10Post-launch timeout in seconds.
MN_LOG_LEVELINFOProcess log level.
MN_LOGS_ROOT~/.mn/logsDefault log root.
MN_CLI_OUTPUTrichCLI rendering mode; plain disables Rich formatting.

Validate models and blueprint requirements with mn model doctor <model-id> and mn blueprint validate <folder>. Do not use --force as a routine fix for a failed hardware check.

Shared storage and node-local caches

VariableDefaultBehavior
MN_SHARED_STORAGE_ROOT$MN_HOME/sharedSynchronized job storage. Multi-node submissions and executable bundle cache entries remain here.
MN_BLUEPRINT_PYTHON_ENVS_DIR$MN_HOME/cache/blueprint-python-envsNode-local derived HostLocal virtual-environment cache. An explicit path remains supported, but mn blueprint doctor warns when that path is inside synchronized storage.
MN_CHECKPOINT_ROOT$MN_HOME/checkpointsNode-local compatibility checkpoint directory. Redis remains the recovery authority.
MN_SYNCTHING_ENABLEDautoStarts and configures the shared-storage Syncthing sidecar unless explicitly disabled.
MN_SYNCTHING_REQUIREDunsetWhen truthy, fail startup or join instead of warning when Syncthing cannot be prepared.
MN_SYNCTHING_RESCAN_INTERVAL_SECONDS3600Periodic fallback rescan interval. Invalid and non-positive runtime values fall back to 3600; filesystem watching remains enabled with a 10-second coalescing delay.

MirrorNeuron installs rooted Syncthing ignores for blueprint-python-envs, blueprint-python-sources, and checkpoints separately on every peer while preserving operator-defined ignore lines. The .stignore file is node-local and is not replicated by Syncthing.

There is no automatic submission retention. Inputs, intermediate artifacts, and outputs remain synchronized until the existing job or run deletion workflow removes them. See Cluster Guide for the upgrade and legacy-cache cleanup procedure.

Contributor verification

After changing shared configuration, run mn runtime status and mn runtime status. Also run mn blueprint list for catalog changes, mn model doctor <model-id> for model changes, and API health checks for API configuration changes.

Configuration changes require parser/schema tests, secret-redaction review where applicable, this reference, the docs-site reference, and a documentation-site type check.

On this page