Skip to content

Configure

Admin guide · Configure runbook

🟢 Supported · ⚠️ Vault is the source of truth · no credentials in files

When to use Before you start Steps Verify Roll back
Change env, config.csv or LLM settings VAULT_* values from .env, token file in /tmp Read Vault, set oc alias, edit settings Alias lists buckets, health 200 Restore previous Vault value or env

When to use

You need to change an environment variable, a bot's config.csv, its LLM settings, or the credentials a channel uses. Configuration changes are not code changes: they do not go through CI/CD.

Before you start

  • The .env file at the repository root is git-ignored and may contain only VAULT_* variables. Everything else comes from Vault.
  • The Vault root token and unseal key live in /tmp/vault-token-gb and /tmp/vault-unseal-key-gb, never in the repository.
  • A sealed Vault blocks bootstrap; botserver retries while the old binary keeps working from cached credentials. Unseal before changing settings.
  • Do not restart botserver for config.csv changes: DriveMonitor reloads them on ETag change in about 10 seconds.

Steps

Read credentials from Vault and point oc at Drive (canonical block from the repository AGENTS.md):

source <(grep -E '^VAULT_' ${WORKSPACE}/.env)   # ONLY VAULT_* variables
export VAULT_ADDR=$VAULT_ADDR
export VAULT_CACERT=${WORKSPACE}/botserver-stack/conf/system/certificates/ca/ca.crt
export VAULT_TOKEN=$(cat /tmp/vault-token-gb 2>/dev/null || echo $VAULT_TOKEN)
VAULT_BIN=${WORKSPACE}/botserver-stack/bin/vault/vault
DRIVE_ACCESSKEY=$($VAULT_BIN kv get -field=accesskey secret/gbo/drive)
DRIVE_SECRET=$($VAULT_BIN kv get -field=secret secret/gbo/drive)
DRIVE_PORT=$($VAULT_BIN kv get -field=port secret/gbo/drive)
/tmp/oc alias set local http://127.0.0.1:${DRIVE_PORT} ${DRIVE_ACCESSKEY} ${DRIVE_SECRET} --api s3v4

All LLM settings live in Vault at secret/gbo/{org_id}/{branch_id}/{bot_id}; the global fallback is secret/gbo/llm. The fields are llm-url, llm-server, llm-key, llm-model, llm-provider, system-prompt and history-limit. Resolve org and branch from the bots table, then write only the fields you are changing:

vault kv put secret/gbo/<org_id>/<branch_id>/<bot_id> \
  llm-url=<chat-completions-url> llm-model=<model> llm-key=<api-key>

The global fallback, used when a bot has no per-bot entry, is written once:

vault kv put secret/gbo/llm url=<chat-completions-url> model=<model> openai_key=<api-key>

Provider selection is built at boot, so restart botserver only after an LLM provider change. For config.csv, make the change in Drive and wait for the automatic reload.

Verify

Check Command Pass condition
Vault reachable $VAULT_BIN status unsealed, Initialized true
Drive credentials $VAULT_BIN kv get -field=port secret/gbo/drive non-empty port
Drive alias /tmp/oc ls local/ expected {bot}.gbai buckets
Config reload grep drive_monitor botserver.log \| tail -20 ETag reload within ~10s
API curl -s -o /dev/null -w '%{http_code}' http://localhost:8080/health 200

Never paste a token, key or secret into a log, a chat message or this page. Use hostnames and environment variables; field names are safe, values are not.

Roll back

🔴 Restore the previous value in Vault with the same vault kv put command, or restore the previous VAULT_* lines in .env. For config.csv, push the old file back with oc and wait for the reload — do not restart. For an LLM provider change, restart with ./restart.sh after restoring, then re-run the verification table.

See also environment variables, config.csv format, LLM configuration, secrets management and the secret rotation runbook.