メインコンテンツまでスキップ
バージョン: 次期

Environment variables

Environment variables configure Compose and selected runtime integrations. Never put a usable password, API key, session, or cluster token in source control, examples, logs, or support diagnostics. Redact credentials embedded in database URLs before sharing output.

Compose and logging

VariableDefault / use
BEARUST_PORTHost port for proxy service; 8080.
BEARUST_CONTROL_PORTHost loopback publication for control service; 8081.
BEARUST_IMAGEProduction Compose image; bearust:local.
BEARUST_DEV_IMAGEDevelopment Compose image; bearust:dev.
BEARUST_CONFIGTOML mounted into the container; ./config/bearust.example.toml.
BEARUST_FRONTEND_PORTDevelopment frontend host port; 5183.
RUST_LOGTracing filter; info in production Compose, debug in development Compose.
BEARUST_PLUGIN_REGISTRY_URLOptional CLI plugin-registry index override.

Production Compose runs bearust serve --config /etc/bearust/bearust.toml --json-logs. It maps the control port only to 127.0.0.1 on the host.

Setup and database

VariableUse
BEARUST_SETUP_TOKENOptional first-start setup token. If absent, BeaRust generates one and, for a file-backed SQLite database, writes a setup-token file beside it with Unix mode 0600.
DATABASE_URLSelects the control-plane database. Empty/unset uses server.control_database; Compose defaults to sqlite:///data/bearust.sqlite. SQLite, PostgreSQL, and MySQL URLs are supported by the Compose setup.
POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_DBPostgreSQL profile provisioning values.
MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE, MYSQL_ROOT_PASSWORDMySQL profile provisioning values.

Use the postgres or mysql Compose profile only with the corresponding DATABASE_URL. BeaRust provisions the file-backed SQLite path when needed and runs control-plane migrations at startup. Use non-secret placeholders such as replace-with-a-development-password in local copies; deployment credentials belong in a secret mechanism.

AI provider

The advisor is disabled unless both LLM_API_URL and LLM_API_KEY are set.

VariableDefault / bounds
LLM_API_URLRequired with the API key when enabling the provider.
LLM_API_KEYRequired; treat as a secret.
LLM_MODELgpt-4o-mini.
LLM_REQUEST_TIMEOUT_SECONDS30; 1300.
LLM_RESPONSE_LIMIT_BYTES2097152; 10248388608.
LLM_QUEUE_CAPACITY32; 11024.
LLM_WORKER_COUNT2; 116.
LLM_CIRCUIT_FAILURE_THRESHOLD3; 110.
BEARUST_AI_REPORT_INTERVAL_HOURS24; accepted range 1168 when the advisor is enabled.

Cluster

VariableUse
NODE_IDOverrides cluster.node_id when non-empty.
CLUSTER_PEERSOverrides peers using comma-separated node_id=host:port entries.
CLUSTER_AUTH_TOKENOverrides cluster.auth_token; with peers it must contain 32–256 bytes.

These three values override TOML. Keep CLUSTER_AUTH_TOKEN out of diagnostics and use a placeholder such as replace-with-a-secret-from-your-secret-manager in deployment templates.