// CONTENTS Part 13 · Reference

// PART 13

Commands

Chapter 55 / 60 2 min read English Part 13 of 15

The commands an operator types in a normal week, verified against the CLI source. Container-create commands always run on the host.

The botserver CLI

botserver <command> [options]
Command Description
install <component> install a component (--container, --container-only, --tenant <name>)
remove <component> remove a component
list list components and installed state
status <component> check one component (no bare status)
start / stop / restart manage the four core components: tables, cache, drive, llm
setup-env [vault-container] generate .env from a Vault container
vault migrate [env_file] migrate .env secrets into Vault (TABLES_*→gbo/tables, DRIVE_*→gbo/drive, EMAIL_*→gbo/email, STRIPE_*→gbo/stripe, AI_*/LLM_*→gbo/llm)
vault put <path> key=value… store secrets (interactive without pairs)
vault get <path> [key] read secrets (sensitive values masked)
vault list configured secret paths
vault health Vault connection check
rotate-secret <component> rotate one: tables, drive, cache, email, directory, encryption, jwt
rotate-secrets --all rotate everything (incident path; prints the manual updates)
security status / security fix firewall, fail2ban, caddy report/hardening (needs the security feature)
version [--all] version + build info + components + Vault status

Component registry (installable): tables, cache, drive, llm, email, proxy, directory, alm, alm_ci, dns, meeting, remote_desktop, vector_db, timeseries_db, vault, observability, host, botmodels.

Container create commands (install … --container) run on the host, never inside a container.

Incus (the only container layer)

sudo incus list --format csv
sudo incus exec <container> -- systemctl restart <service>
sudo incus exec <container> -- journalctl -u <service> -f
sudo incus exec <container> -- ss -tlnp
sudo incus file push /local/src <container>/path
sudo incus snapshot create <container> pre-change-$(date +%Y%m%d%H%M%S)
sudo incus copy <container>/<snapshot> <container>-restored
sudo incus config set <container> limits.cpu 2
sudo incus config set <container> limits.memory 4GiB

Caddy and DNS

incus exec proxy -- /opt/gbo/bin/caddy validate --adapter caddyfile --config /opt/gbo/conf/config
incus exec proxy -- /opt/gbo/bin/caddy reload  --adapter caddyfile --config /opt/gbo/conf/config
incus exec <dns-container> -- dig @127.0.0.1 <domain>

PostgreSQL

pg_isready -U postgres
psql -h localhost -U postgres -d botserver -c "SELECT version, run_on FROM __diesel_schema_migrations ORDER BY run_on DESC LIMIT 5;"
pg_dump -U postgres -F c -f /tmp/backup.dump botserver
pg_restore -U postgres -d botserver_restore /tmp/backup.dump

Vault/OpenBao

botserver-stack/bin/vault/bao operator unseal <key>          # 3 of 5 shares
botserver-stack/bin/vault/bao operator raft snapshot save backup.snap
botserver-stack/bin/vault/bao kv get secret/gbo/llm
botserver-stack/bin/vault/bao audit enable file file_path=/opt/gbo/logs/vault-audit.log

Book maintenance (BotBook)

python3 scripts/botbook_guards.py --check   # links, versions, ports
python3 scripts/gen_schema_reference.py     # schema reference
cd botbook && mdbook build                  # output in botbook/book/

Verification drills

scripts/restore_drill.sh --self-test
scripts/restore_drill.sh --dsn "$DATABASE_URL" --report /tmp/gb-restore-drill.md
python3 scripts/check_slo.py --snapshot /tmp/slo.json
python3 scripts/prod_readiness.py
python3 scripts/check_container_runtime.py --check

Found a mistake? Open an issue · All books

// SEARCH ESC
Pagefind · 236 pages · 4 books Enter to open ↑ ↓ to move