Deployment Guide¶
This page covers practical Bub deployment paths based on the current repository behavior.
1) Prerequisites¶
- Python 3.12+
uvinstalled- a valid model provider key (for example
OPENROUTER_API_KEY)
Bootstrap:
Minimum .env example:
Advanced model-client settings:
BUB_API_FORMATselects the request payload format sent to the upstream model endpoint:completion,responses, ormessages.BUB_CLIENT_ARGSpasses a JSON object through to the underlying model client.- The accepted
BUB_CLIENT_ARGSkeys depend on the selected provider and downstream SDK behavior, so treat it as an escape hatch rather than a stable cross-provider interface.
2) Runtime Modes¶
Choose one command based on your operation target:
- Interactive local operator:
uv run bub chat - Channel listener service:
uv run bub gateway - One-shot task execution:
uv run bub run "summarize this repo"
3) Telegram Channel Setup¶
Telegram configuration and runtime behavior are documented in:
docs/channels/telegram.md
Quick start:
4) Docker Compose¶
Repository assets:
Dockerfiledocker-compose.ymlentrypoint.sh
Build and run:
Current entrypoint behavior:
- if
/workspace/startup.shexists, entrypoint tries to runstartup.sh - otherwise it starts
bub gateway
Default mounts in docker-compose.yml:
${BUB_WORKSPACE_PATH:-.}:/workspace${BUB_HOME:-${HOME}/.bub}:/data${BUB_AGENT_HOME:-${HOME}/.agents}:/root/.agents
Notes:
- Bub runtime data is written under
BUB_HOME(container default:/root/.bub). - In this compose file,
BUB_HOMEis used as the host bind source for/data. - Do not set
BUB_HOME=/datadirectly in.envwith this compose file, or the host bind source will also become/data. - If you want Bub runtime home to be
/datain container, split variables first (for exampleBUB_HOME_HOSTfor host path) and then setBUB_HOME=/data.
5) Operational Checks¶
- Verify process:
ps aux | rg "bub (chat|gateway|run)" - Verify model config:
rg -n "BUB_MODEL|BUB_API_KEY|BUB_API_BASE|BUB_.*_API_KEY|BUB_.*_API_BASE|OPENROUTER_API_KEY" .env - Verify Telegram settings:
rg -n "BUB_TELEGRAM_TOKEN|BUB_TELEGRAM_ALLOW_USERS|BUB_TELEGRAM_ALLOW_CHATS" .env - Verify startup logs:
uv run bub gateway --enable-channel telegram
6) Safe Upgrade¶
Then restart your service command.