Skip to content

Configuration

Vladimir Kochnev edited this page Nov 17, 2026 · 1 revision

Configuration

The panel takes no flags: everything is environment, and mcprig panel --help prints all twenty-seven variables below and exits 0. A set's own settings live in servers.json — see Panel.

group variable default what it does
data MCPRIG_DATA_DIR $XDG_STATE_HOME/mcprig, else ~/.local/state/mcprig registry, keys, logs, OAuth tokens
data XDG_STATE_HOME ~/.local/state base of the state directory; MCPRIG_DATA_DIR overrides it
data MCPRIG_CLI the running executable binary spawned for each set (serve --config …)
data MCPRIG_SEED_FILE empty JSON with servers[] and sets[]; used only when the registry is empty
panel MCPRIG_HOST 127.0.0.1 panel listen address; unset means loopback only
panel MCPRIG_PORT 9091 panel port
panel MCPRIG_PUBLIC_URL empty public address; the only source of the OAuth redirect and of the Secure cookie decision
panel MCPRIG_PASSWORD empty login password
panel MCPRIG_PASSWORD_HASH empty scrypt$N$r$p$salt$hash; when set, the plain password is ignored
panel MCPRIG_USER admin login name
panel MCPRIG_AUTH empty off disables panel auth
panel MCPRIG_BIND_IP 0.0.0.0 transport.host written into every set's servers.json
proxy MCPRIG_TLS_CERT empty certificate for the panel listener; only with the key — one without the other refuses to start
proxy MCPRIG_TLS_KEY empty private key for the panel listener
proxy MCPRIG_PROXY_SECRET empty shared secret with a trusted proxy; shorter than 32 characters logs a warning
proxy MCPRIG_TRUSTED_PROXIES loopback IPs or CIDRs whose X-Forwarded-* are believed; a bad entry stops the panel at startup
proxy MCPRIG_USER_HEADER Remote-User header carrying the user name from a trusted proxy
proxy MCPRIG_ALLOWED_HOSTS loopback only comma-separated Host allowlist
secret BAO_ADDR empty OpenBao address for set secrets; empty keeps them in the local env file only
secret OPENBAO_ADDR empty same as BAO_ADDR, used when that one is empty
secret BAO_TOKEN empty OpenBao token; without it and BAO_ADDR secrets stay local
secret OPENBAO_TOKEN empty same as BAO_TOKEN, used when that one is empty
secret BAO_MOUNT secret KV v2 mount inside OpenBao
secret BAO_PREFIX mcp path prefix inside that mount
dump MCPRIG_TOOLOUT_TTL 24h truncated answers older than this are removed
dump MCPRIG_TOOLOUT_MAX 256MiB size cap of the tool-out directory; oldest files go first
dump MCPRIG_PPROF empty host:port for net/http/pprof, e.g. 127.0.0.1:6060

A set resolves ${VAR} from the chain OpenBao → env.json → process environment. MCPRIG_*, BAO_* and OPENBAO_* are reserved and never handed to a downstream server.

Login modes

password proxy secret MCPRIG_AUTH mode
any any off none
yes no password
no yes proxy
yes yes proxy + password

With none of them the panel refuses to start: API открыт: задайте MCPRIG_PASSWORD или MCPRIG_AUTH=off.

MCPRIG_BIND_IP is the default for the set listeners, not for the panel: sets are protected by their bearer keys, the panel still binds loopback unless MCPRIG_HOST says otherwise. Trusting a proxy on another host takes both the secret and its address in MCPRIG_TRUSTED_PROXIES; otherwise the headers are treated as absent.

Details: docs/en/cli.md.

Clone this wiki locally