Set only what you need to change. Leave defaults out of your deployment file.
Where to set ENV
Compose: environment under the named service. Kubernetes: env / envFrom on the named container. Recreate or restart the workload after changes.
RK_* names map to boot.yaml; numbers are array indexes. In Compose, quote booleans and escape a literal $ as $$. RK also parses commas and backslashes; use a long random hexadecimal password for new databases. Keep existing passwords when upgrading.
This page lists the common ones. Any boot.yaml value can be overridden the same way; see rk-boot: Override boot ↗.
docker compose up -dkubectl -n mof rollout restart deployment/mofDatabase
| Variable | Default | Description |
|---|---|---|
RK_POSTGRES_0_ADDR | localhost:5432 | PostgreSQL address:port. |
RK_POSTGRES_0_USER | postgres | Database role with login and CREATEDB permissions. |
RK_POSTGRES_0_PASS | password | Use your existing database password. |
RK_POSTGRES_0_DATABASE_0_MAXOPENCONN | 30 | Maximum database connections per MOF process. With several processes, keep the total under the database limit. |
All options in the rk-boot docs ↗
Empty database Params use sslmode=disable and TimeZone=Asia/Shanghai. MOF does not apply TLS to provider databases; TLS-only PostgreSQL is not supported.
Server and Admin
| Variable | Default | Description |
|---|---|---|
MOF_ADMIN_PASSWORD | — | Optional Admin password override; otherwise generated on first setup. |
RK_CONFIG_0_CONTENT_MODE_WEB | false | Web-only mode. Leave both mode flags unset for all-in-one. |
RK_CONFIG_0_CONTENT_MODE_WORKER | false | Worker-only mode; do not enable together with Web-only mode. |
RK_CONFIG_0_CONTENT_JOBS_SYNCWORKERS | 2 | Sync jobs (bills, resources, exports) run at the same time in one process. |
RK_CONFIG_0_CONTENT_JOBS_OPSWORKERS | 2 | Ops jobs (delete an account, purge bills, apply a virtual tag) run at the same time in one process. |
MOF_JWT_SECRET | — | Optional sign-in signing key, at least 32 characters. Unset: generated on first start and stored in the database. If set, use the same value on every MOF process. |
CORS
| Variable | Default | Description |
|---|---|---|
RK_GIN_0_MIDDLEWARE_CORS_ALLOWORIGINS_0 | * | Allowed browser origin, including scheme and port; no path. |
RK_GIN_0_MIDDLEWARE_CORS_ALLOWCREDENTIALS | false | For cross-origin credentials, use explicit origins instead of *. |
All options in the rk-boot docs ↗
Example: cross-origin credentials
RK_GIN_0_MIDDLEWARE_CORS_ALLOWORIGINS_0: "https://mof.example.com"
RK_GIN_0_MIDDLEWARE_CORS_ALLOWCREDENTIALS: "true"Add origins using _1, _2, etc. Replace the default * when credentials are enabled.
Logs
| Variable | Default | Description |
|---|---|---|
RK_LOGGER_0_ZAP_LEVEL | info | Application log level: debug, info, warn, error. |
RK_LOGGER_0_ZAP_ENCODING | console | Application log format: console or json (for log collectors). |
RK_GIN_0_MIDDLEWARE_LOGGING_ENABLED | true | HTTP request logging; independent of application logs. |
RK_POSTGRES_0_LOGGER_LEVEL | warn | SQL logging: info, warn, error, silent. |
MCP and OAuth
| Variable | Default | Description |
|---|---|---|
MOF_MCP_INTERNAL_URL | http://mof-mcp:8001 | Internal MCP address: the compose service / Kubernetes Service name. Leave unset. |
MOF_PUBLIC_URL | — | OAuth public HTTPS origin shared by Dash and MOF, without a path. |
MOF_MCP_OAUTH_SECRET | — | OAuth secret, at least 32 characters; shared across MOF nodes. |
Example: OAuth
MOF_PUBLIC_URL: "https://mof.example.com"
MOF_MCP_OAUTH_SECRET: "REPLACE_WITH_A_RANDOM_SECRET_AT_LEAST_32_CHARACTERS"Personal tokens do not need OAuth. Enable MCP access in Admin → Settings → MCP. OAuth configuration status does not prove public callback connectivity.
Dash upstream
| Variable | Default | Description |
|---|---|---|
MOF_UPSTREAM | http://mof:8080 | MOF address: the compose service / Kubernetes Service name. Set it only when MOF runs under another name. |
Outbound proxy
| Variable | Default | Description |
|---|---|---|
HTTP_PROXY | — | Optional outbound HTTP proxy. |
HTTPS_PROXY | — | Optional outbound HTTPS proxy. |
NO_PROXY | — | Exclude internal hosts and database addresses. SDK support varies. |
— means unset. License and user management belong in Admin.