Reference

Configuration

The complete list of environment variables, grouped by component. The CLI manages most of this for you locally; these tables matter when running the Docker images directly or tuning a deployment beyond what the Helm values expose.

Mock server (core)

VariableDefaultDescription
SERVER_HOST0.0.0.0Interface the mock server binds to.
SERVER_PORT8080Port the mock server listens on.
SERVER_ALLOW-CORStrueAnswer CORS preflights and add CORS headers to responses. Set to false to let OPTIONS requests reach your mocks or proxy instead.
PROXY_BASE-URIemptyBackend to proxy unmatched requests to. Empty disables proxying (unmatched requests return 404). CLI flag: -u.
PROXY_TIMEOUT-MILLIS30000Max time to wait for a proxied response. CLI flag: -t.
MANAGEMENT_AUTH_MODEdeployWhich management routes require Authorization: Bearer auth; see below.
DEPLOY_SECRETunsetThe bearer token protected routes expect. Shared with the control panel and, in all mode, with the SDK.
DEPLOY_ENDPOINT_ENABLEDfalseEnables the internal endpoint the control panel uses to apply changes to core. Set to true whenever a control panel is deployed against this core.
FLAGS_LIST-LIMIT200Maximum number of entries returned when listing flags before the listing truncates.

MANAGEMENT_AUTH_MODE

Controls bearer-token protection on the management routes, using DEPLOY_SECRET as the token:

ModeEffect
noneEverything open. Throwaway local setups only.
deployInternal management routes protected; flag endpoints open so tests and the SDK work without credentials. The default.
allFlag endpoints protected too; the SDK needs the secret option. For instances reachable beyond your team.

Redis (core and control)

Both core and the control panel accept the same Redis variables and must point at the same instance. See Persistence and Redis for what Redis mode changes.

VariableDefaultDescription
REDIS_ENABLEDfalsefalse is storeless mode; true enables Redis persistence.
REDIS_URLunsetFull connection URL, e.g. redis://:password@host:6379/0. Takes precedence over the discrete settings below. rediss:// enables TLS.
REDIS_HOST / REDIS_PORT127.0.0.1 / 6379Discrete host and port.
REDIS_PASSWORD / REDIS_DATABASEunset / 0Discrete credentials and database index.
REDIS_PREFIXmocko:Key prefix for all Mocko keys. Change it when sharing a Redis between deployments or with other applications.

Control panel

VariableDefaultDescription
MOCKO_CORE_URLemptyURL where control reaches core, e.g. http://mocko-core:8080.
MOCKO_DEPLOY_SECRETemptyMust match core's DEPLOY_SECRET.
PORT6625Port the control panel listens on.
FLAGS_LIST_LIMIT200Flag listing truncation in the panel; keep it in sync with core's value.
MOCKO_V1_MIGRATION_ENABLEDfalseReveals the v1 migration operations on the Management page. See Migrating from v1.

Standalone image

The standalone image adds two convenience variables mapped to CLI flags, and passes every core variable above straight through:

VariableDefaultDescription
MOCKO_URLemptyProxy target for unmatched requests (-u).
MOCKO_TIMEOUT30000Proxy timeout in milliseconds (-t).
Variable names containing a dash, like PROXY_TIMEOUT-MILLIS and FLAGS_LIST-LIMIT, are spelled exactly as shown. Container runtimes accept dashes in environment variable names even though most shells do not; in compose files and Kubernetes manifests they work as-is.