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)
| Variable | Default | Description |
|---|---|---|
SERVER_HOST | 0.0.0.0 | Interface the mock server binds to. |
SERVER_PORT | 8080 | Port the mock server listens on. |
SERVER_ALLOW-CORS | true | Answer CORS preflights and add CORS headers to responses. Set to false to let OPTIONS requests reach your mocks or proxy instead. |
PROXY_BASE-URI | empty | Backend to proxy unmatched requests to. Empty disables proxying (unmatched requests return 404). CLI flag: -u. |
PROXY_TIMEOUT-MILLIS | 30000 | Max time to wait for a proxied response. CLI flag: -t. |
MANAGEMENT_AUTH_MODE | deploy | Which management routes require Authorization: Bearer auth; see below. |
DEPLOY_SECRET | unset | The bearer token protected routes expect. Shared with the control panel and, in all mode, with the SDK. |
DEPLOY_ENDPOINT_ENABLED | false | Enables 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-LIMIT | 200 | Maximum 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:
| Mode | Effect |
|---|---|
none | Everything open. Throwaway local setups only. |
deploy | Internal management routes protected; flag endpoints open so tests and the SDK work without credentials. The default. |
all | Flag 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.
| Variable | Default | Description |
|---|---|---|
REDIS_ENABLED | false | false is storeless mode; true enables Redis persistence. |
REDIS_URL | unset | Full connection URL, e.g. redis://:password@host:6379/0. Takes precedence over the discrete settings below. rediss:// enables TLS. |
REDIS_HOST / REDIS_PORT | 127.0.0.1 / 6379 | Discrete host and port. |
REDIS_PASSWORD / REDIS_DATABASE | unset / 0 | Discrete credentials and database index. |
REDIS_PREFIX | mocko: | Key prefix for all Mocko keys. Change it when sharing a Redis between deployments or with other applications. |
Control panel
| Variable | Default | Description |
|---|---|---|
MOCKO_CORE_URL | empty | URL where control reaches core, e.g. http://mocko-core:8080. |
MOCKO_DEPLOY_SECRET | empty | Must match core's DEPLOY_SECRET. |
PORT | 6625 | Port the control panel listens on. |
FLAGS_LIST_LIMIT | 200 | Flag listing truncation in the panel; keep it in sync with core's value. |
MOCKO_V1_MIGRATION_ENABLED | false | Reveals 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:
| Variable | Default | Description |
|---|---|---|
MOCKO_URL | empty | Proxy target for unmatched requests (-u). |
MOCKO_TIMEOUT | 30000 | Proxy 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.