ObjectOS
Reference

Environment Variables

ObjectOS runtime environment variable reference.

Environment Variables

Use environment variables for deployment-level configuration and secrets. Use system settings for tenant/user-editable application configuration.

Naming. As of the next release, all ObjectStack-owned variables use the OS_ prefix. Pre-1.0 unprefixed names (PORT, AUTH_SECRET, OS_MULTI_TENANT, …) still work but emit a one-shot deprecation warning. Prefer the canonical OS_* names in new deployments; see Legacy aliases.

Core

VariableRequiredDescription
OS_PORTNoHTTP port the runtime listens on. Defaults to 3000. Legacy alias: PORT.
OS_AUTH_SECRETYes for authBase secret used to derive per-project auth secrets. Legacy alias: AUTH_SECRET.

Artifact and project resolution

VariableRequiredDescription
OS_ARTIFACT_FILEFile modePath to a local compiled objectstack.json. Read by the ObjectOS app wrapper and forwarded as fileConfig.artifactPath.
OS_ARTIFACT_PATHAlternativeFramework-level name for the same path or http(s):// URL. Honoured by @objectstack/runtime directly (CLI dev/start, standalone mode).
OS_PROJECT_IDOptionalLegacy alias for OS_ENVIRONMENT_ID, accepted by the ObjectOS wrapper for backward compatibility. Prefer OS_ENVIRONMENT_ID in new deployments.
OS_ENVIRONMENT_IDOptionalEnvironment id for standalone/file-backed mode (default proj_local). Also used to derive the per-project auth secret. The ObjectOS wrapper also accepts the legacy alias OS_PROJECT_ID.
OS_ORGANIZATION_IDOptionalDefault organization id for file-backed mode (default org_local).
OS_WATCH_ARTIFACTNoSet to 1 to reload the local artifact when it changes. Use only in development.
OS_CLOUD_URLCloud modeControl-plane base URL for hostname resolution and artifact fetch. Set to off or local to opt out of cloud-connected behaviour.
OS_CLOUD_API_KEYOptionalBearer token for private control-plane Artifact API access.
OS_MULTI_ORG_ENABLEDNoSet to true to enable multi-tenant routing / organization switching (default false). Legacy alias: OS_MULTI_TENANT.
OS_RUNTIME_PORTDev onlyLocalhost port used to build platform-SSO callback URLs when developing on http://localhost:<port>.

Cache

VariableDefaultDescription
OS_KERNEL_CACHE_SIZE32Maximum cached project kernels.
OS_KERNEL_TTL_MS900000Idle TTL for project kernels.
OS_ENV_CACHE_TTL_MS300000Environment/hostname cache TTL.
OS_ARTIFACT_CACHE_TTL_MS300000Artifact response cache TTL.

Auth and trusted origins

VariableDescription
AUTH_SECRETLegacy alias for OS_AUTH_SECRET. Still honoured this release; prefer OS_AUTH_SECRET.
OS_TRUSTED_ORIGINSComma-separated additional trusted origins.
OS_ROOT_DOMAINRoot domain used to trust project subdomains in platform SSO deployments.
OS_PLATFORM_SSOSet to false to disable platform SSO wiring.
OS_RUNTIME_PORTLocal development helper for localhost project hostnames.

Database

In cloud-connected mode the control plane returns the per-project runtime database configuration with the artifact response. In file-backed mode ObjectOS reads datasource declarations from the artifact. As a last resort the framework also honours:

VariableDescription
OS_DATABASE_URLConnection URL (file:./db.sqlite, libsql://…, postgres://…, mongodb://…, memory://). Used by standalone mode and CLI dev.
OS_DATABASE_DRIVEROverride the driver auto-detected from the URL.
OS_DATABASE_AUTH_TOKENAuth token for managed drivers such as Turso/libSQL.
OS_BUSINESS_DB_URLObjectOS wrapper convention for the per-project business database URL. Resolve it to OS_DATABASE_URL or a runtime datasource override in your deployment.
OS_CACHE_DIRLocal artifact and runtime cache directory (default /var/cache/objectos).
OS_SKIP_SCHEMA_SYNCSet to 1 to skip ObjectQL DDL sync at boot. Use when schema is managed out-of-band.

For ObjectOS customer deployments, prefer explicit control-plane runtime configuration or artifact datasource configuration over relying on container-local defaults.

Legacy aliases

These pre-1.0 names still work this release but emit a one-shot deprecation warning. They will be removed in a future major. Prefer the canonical name.

CanonicalLegacy
OS_PORTPORT
OS_AUTH_SECRETAUTH_SECRET
OS_MULTI_ORG_ENABLEDOS_MULTI_TENANT
OS_ENVIRONMENT_IDOS_PROJECT_ID

On this page