Skip to content

Configuration

This page is the complete configuration cross-reference for nimbus start: every flag, its environment variable (when one exists), its config-file key (when one exists), its default, and what it controls.

Settings resolve as CLI flag, then environment variable, then config file. The JSON config file is named by --config <path> or the NIMBUS_CONFIG environment variable (the flag wins when both are set).

Config-file keys live under two top-level objects: persistence (storage and encryption) and functions (function-scaling policy, below). Network, runtime-limit, app, compose, and license settings are CLI and environment only. Unknown keys are rejected — at the top level and inside each object — so a typo fails startup instead of being silently ignored.

{
"persistence": {
"tenant_provider": "sqlite",
"data_dir": "./data"
}
}

Config-file keys are snake_case; enum values (tenant_provider, encryption_key_provider) are kebab-case, matching the CLI spelling. The environment variables additionally accept underscore spellings of those enum values (for example libsql_replica).

These settings have no environment variable and no config-file key.

FlagDefaultMeaning
--host127.0.0.1Interface to listen on; defaults to loopback for local safety.
--port8080TCP port to listen on.
--allow-networkoffOpt-in required for any non-loopback bind.
--systemd-socket-activationoffInherit the TCP listener from systemd instead of binding --host/--port.

nimbus start refuses any --host outside the loopback range (127.0.0.1, ::1, or localhost) unless --allow-network is set. With the flag set, a second gate still applies: the local admin token must have been explicitly rotated at least once (nimbus auth rotate-admin), or the bind is refused; a rotation older than 30 days logs a startup warning but does not block. See Hardening.

Every adapter surface is served by default — the Convex-compatible surface and native API on the main listener, the Firestore routes alongside them, and the MongoDB, DynamoDB, and S3 wire listeners on their conventional ports:

SurfaceDefaultSwitch offCredential override
Firestore routeson (main listener)--no-firestoreMain-listener auth applies
MongoDB listeneron (127.0.0.1:27017)--no-mongodb--mongodb-username (or NIMBUS_MONGODB_USERNAME) + NIMBUS_MONGODB_PASSWORD (env-only)
DynamoDB listeneron (127.0.0.1:8000)--no-dynamodb--dynamodb-access-key KEY_ID:SECRET:TENANT (repeatable) or NIMBUS_DYNAMODB_ACCESS_KEYS (comma-separated)
S3 listeneron (127.0.0.1:9000)--no-s3--s3-access-key KEY_ID:SECRET:TENANT (repeatable)

When a conventional port is busy, that listener is skipped with a warning. --mongodb-port / --dynamodb-port / --s3-port pin an explicit port instead — then a busy port is a hard startup error.

Every request authenticates. Without credential overrides, the MongoDB and DynamoDB listeners use generated credentials persisted at wire-credentials.json (owner-only, 0600) in the data directory; the generated DynamoDB key binds to the tenant default, and explicit access-key bindings replace it.

The MongoDB listener is loopback-only — non-loopback hosts are refused even with --allow-network. The DynamoDB listener may bind a non-loopback host with --dynamodb-host plus --allow-network.

--tls-cert <CERT_PEM> and --tls-key <KEY_PEM> (both required together) terminate TLS on the main HTTP listener: HTTPS and wss:// replace plain HTTP on the configured port. The PEM pair is loaded and validated at startup — a missing or mismatched identity fails the boot with the offending path named. The MongoDB and DynamoDB listeners are not covered: MongoDB is loopback-only, and remote access to either adapter goes through a TLS-terminating proxy (see Hardening).

Browsers are granted CORS access from loopback origins only, by default. --cors-allow-origin <origin> (repeatable) or the comma-separated NIMBUS_CORS_ALLOW_ORIGINS environment variable allow additional exact origins, normalized to the browser Origin form (scheme://host[:port], lowercase, default ports stripped). Flags win over the environment variable. Wildcards and bare hosts are rejected at startup — the allowlist is exact-match only.

With --systemd-socket-activation, the server takes its listener from systemd (Unix only). It requires LISTEN_FDS=1 and a LISTEN_PID matching the server process, and consumes exactly one inherited socket. The --host/--port flags are not used to bind; the inherited listener’s address is checked against the same --allow-network and admin-token freshness gates. See Deploy on Linux.

FlagEnvironment variableConfig key (persistence.)Default
--configNIMBUS_CONFIGnone
--data-dirNIMBUS_DATA_DIRdata_dir./data
--control-data-dirNIMBUS_CONTROL_DATA_DIRcontrol_data_dirthe data directory
--tenant-providerNIMBUS_TENANT_PROVIDERtenant_providersqlite

--data-dir holds embedded tenant databases; --control-data-dir overrides where the local control plane lives (it defaults to the data directory).

tenant_provider accepts sqlite, libsql-replica, redb, postgres, or mysql. Flags belonging to a provider other than the selected one are rejected at startup. See Storage backends.

FlagEnvironment variableConfig key (persistence.)Default
--postgres-urlNIMBUS_POSTGRES_URLpostgres_urlrequired
--postgres-metadata-schemaNIMBUS_POSTGRES_METADATA_SCHEMApostgres_metadata_schemanimbus_provider
--postgres-tenant-schema-prefixNIMBUS_POSTGRES_TENANT_SCHEMA_PREFIXpostgres_tenant_schema_prefixtenant_
--postgres-min-connectionsNIMBUS_POSTGRES_MIN_CONNECTIONSpostgres_min_connectionspool default
--postgres-max-connectionsNIMBUS_POSTGRES_MAX_CONNECTIONSpostgres_max_connectionspool default
FlagEnvironment variableConfig key (persistence.)Default
--mysql-urlNIMBUS_MYSQL_URLmysql_urlrequired
--mysql-metadata-databaseNIMBUS_MYSQL_METADATA_DATABASEmysql_metadata_databasenimbus_provider
--mysql-tenant-database-prefixNIMBUS_MYSQL_TENANT_DATABASE_PREFIXmysql_tenant_database_prefixtenant_
--mysql-min-connectionsNIMBUS_MYSQL_MIN_CONNECTIONSmysql_min_connectionspool default
--mysql-max-connectionsNIMBUS_MYSQL_MAX_CONNECTIONSmysql_max_connectionspool default

For both Postgres and MySQL, min_connections may not exceed max_connections when both are set.

libSQL / Turso (--tenant-provider libsql-replica)

Section titled “libSQL / Turso (--tenant-provider libsql-replica)”
FlagEnvironment variableConfig key (persistence.)Default
--libsql-urlNIMBUS_LIBSQL_URLlibsql_urlrequired
--libsql-auth-tokenNIMBUS_LIBSQL_AUTH_TOKENlibsql_auth_tokennone
--libsql-admin-urlNIMBUS_LIBSQL_ADMIN_URLlibsql_admin_urlrequired
--libsql-admin-auth-headerNIMBUS_LIBSQL_ADMIN_AUTH_HEADERlibsql_admin_auth_headernone
--libsql-metadata-namespaceNIMBUS_LIBSQL_METADATA_NAMESPACElibsql_metadata_namespacenimbus_provider
--libsql-tenant-namespace-prefixNIMBUS_LIBSQL_TENANT_NAMESPACE_PREFIXlibsql_tenant_namespace_prefixtenant_
--libsql-replica-cache-dirNIMBUS_LIBSQL_REPLICA_CACHE_DIRlibsql_replica_cache_dirrequired
FlagEnvironment variableConfig key (persistence.)Default
--encryption-key-providerNIMBUS_ENCRYPTION_KEY_PROVIDERencryption_key_providerunset (encryption disabled)
--encryption-master-key-fileNIMBUS_ENCRYPTION_MASTER_KEY_FILEencryption_master_key_filerequired for master-key-file
--encryption-key-dirNIMBUS_ENCRYPTION_KEY_DIRencryption_key_dirrequired for key-dir
--encryption-aws-kms-key-idNIMBUS_ENCRYPTION_AWS_KMS_KEY_IDencryption_aws_kms_key_idrequired for aws-kms
--encryption-aws-regionNIMBUS_ENCRYPTION_AWS_REGIONencryption_aws_regionAWS default chain
--encryption-aws-endpoint-urlNIMBUS_ENCRYPTION_AWS_ENDPOINT_URLencryption_aws_endpoint_urlAWS default endpoint

encryption_key_provider accepts master-key-file, key-dir, or aws-kms. Provider-specific encryption options are valid only with their provider, and any encryption option without encryption_key_provider set is rejected at startup. The master key file must contain exactly 32 bytes of key material.

The nimbus encryption admin commands resolve these same settings from environment variables and the config file only (not from server flags). See Encryption at rest.

These settings have no environment variable and no config-file key. The defaults marked “derived” are computed at startup from the number of CPUs available to the process, so nimbus start --help shows the concrete values for your machine.

FlagDefaultMeaning
--runtime-heap-mb128V8 heap limit per runtime isolate, in megabytes.
--runtime-initial-heap-mb8Initial V8 heap size per runtime isolate, in megabytes.
--runtime-timeout-secs30Maximum wall-clock execution time for a runtime invocation, in seconds.
--runtime-max-instancesderived: CPU countMaximum number of concurrent top-level runtime instances.
--runtime-worker-threadsderived: 2 × max instancesNumber of runtime worker threads.
--runtime-max-active-per-tenantderived: max instances − 1, at least 1Maximum active top-level runtime invocations per tenant.
--runtime-max-in-flight-per-tenantderived: 2 × active per tenant, capped at worker threadsMaximum active plus parked top-level runtime invocations per tenant.
--runtime-max-queued-per-tenantderived: equals the in-flight defaultMaximum queued top-level runtime invocations per tenant.
--runtime-max-nested-calls64Maximum nested runtime ctx.run* invocations per request tree.

Warm-pool scaling for runtime functions is the one config-file surface outside persistence. It lives under the top-level functions object and is read from the same --config file:

{
"functions": {
"scaling": {
"default": { "preset": "warm", "min_warm": 1, "max_warm": "auto", "scale_down_delay": "10m" },
"classes": {
"hot": { "preset": "latency", "min_warm": 2 }
},
"overrides": {
"messages:send": { "class": "hot", "reason": "chat send path" }
}
}
}
}
Key (functions.scaling.)Meaning
defaultBaseline policy for every function without a more specific match.
classesNamed reusable policies (classes.<name>) that overrides and functions can point at.
overridesPer-function policy by function name (overrides.<function>), optionally naming a class plus a free-text reason.

A policy object accepts preset (economy, warm, latency, or fixed), min_warm (an integer floor of warm isolates), max_warm (auto or an integer ceiling), and scale_down_delay (seconds, or a duration string like 10m). nimbus run --config reads the same keys; run nimbus explain functions <name> to see the resolved policy for a function.

These settings have no environment variable and no config-file key.

FlagDefaultMeaning
--app-dirnoneApp directory with generated runtime artifacts to serve at startup.
--skip-codegenoffSkip automatic codegen before startup; manifests must be pre-built.
--debug-node-apisoffDiagnose Node.js builtin imports during the codegen preflight.

nimbus start does no source-tree discovery: without --app-dir, the daemon starts with no app functions and waits for deploys to arrive through the deploy admin API. An explicit --app-dir must contain a recognizable app surface (a convex/ or nimbus/ source directory, a firebase.json, a Functions Framework package.json, or a generated function manifest), or startup fails.

FlagEnvironment variableDefaultMeaning
--compose-fileCOMPOSE_FILEauto-discoveryOrdered Compose file list declaring sandbox-backed services; repeat the flag to merge overlays.
COMPOSE_PATH_SEPARATOR: (Unix), ; (Windows)Separator used to split COMPOSE_FILE into multiple paths.

When --compose-file is omitted, Nimbus uses COMPOSE_FILE when set, then discovers a Compose file by walking up from the current directory. Discovery checks each directory for compose.yaml (merging a sibling compose.override.yaml when present), then compose.yml, then docker-compose.yaml or docker-compose.yml (having both in one directory is an error), and stops at the repository’s .git boundary.

FlagEnvironment variableDefaultMeaning
--license-fileNIMBUS_LICENSE_FILE~/.config/nimbus/license.json when presentPath to a Nimbus license file.

The flag wins over the environment variable. The default path honors XDG_CONFIG_HOME when set ($XDG_CONFIG_HOME/nimbus/license.json) and is used only when the file exists. With no license file at all, the server runs with the built-in community license.

Environment variableMeaning
NIMBUS_DEPLOY_TOKENEnables the deploy admin API and sets the expected deploy bearer token. Unset, every deploy request returns 401.
NIMBUS_CLOUD_FUNCTIONS_TENANTBinds every HTTP target in the active Cloud Functions deployment to one existing application tenant. Required by nimbus start when its app artifact contains HTTP targets; request paths never select a tenant. nimbus dev uses its auto-provisioned tenant instead.
NIMBUS_CONVEX_SILOTrusted silo for the Convex auth config loaded from a startup app directory, and the default for nimbus deploy --convex-silo. A Convex deploy requires this value or the flag.
NIMBUS_CONVEX_SILO_TEAMSComma-separated SILO:TEAM bindings used only by explicit anonymous Convex access policy.
NIMBUS_CONVEX_ANONYMOUS_TEAMExplicitly assigns anonymous Convex requests to one team. Only silos assigned to the same team by NIMBUS_CONVEX_SILO_TEAMS are reachable anonymously. Unset is fail-closed.
NIMBUS_TENANT_MUTATION_ISOLATE_CEILINGMaximum concurrently executing top-level mutation isolates per tenant. Additional mutations wait in bounded admission; the default is 16.
NIMBUS_SYSTEM_PROJECTION_WORK_CAPACITYMaximum queued _nimbus table-projection tasks for one loaded tenant runtime. A breach drops the event and warns once per crossing instead of blocking the commit path, and marks the affected table for catch-up. The runtime keeps projecting: once its in-flight work drains, capacity returns and each marked table is re-projected once, so a dropped event still reaches _nimbus. Breach and drop counts stay in the tenant’s projection diagnostics. Default: 1024.
NIMBUS_SYSTEM_PROJECTION_WORK_HIGH_WATERMARKPer-tenant projection backlog level that emits a warning. It is clamped to the per-tenant capacity. Default: 768.
NIMBUS_SYSTEM_PROJECTION_AGGREGATE_WORK_CAPACITYMaximum _nimbus table-projection tasks across all loaded tenants in the process. A breach drops the offending enqueue and warns once per crossing without blocking commits, and marks that tenant’s table for catch-up. Only the tenant that lost the enqueue is affected, and it keeps projecting: once process-wide work drains, the marked table is re-projected once. Default: 8192.
NIMBUS_SYSTEM_PROJECTION_AGGREGATE_WORK_HIGH_WATERMARKProcess-wide projection backlog level that emits a warning. It is clamped to the aggregate capacity. Default: 6144.
LISTEN_FDS, LISTEN_PIDSet by systemd for --systemd-socket-activation; not set manually.