// PART 03
First boot
The first boot is the only moment the platform builds itself. Know what it does, what “done” looks like, and the four checks that separate a healthy boot from a half-up stack.
What the first boot does
The bootstrap process detects the system, creates botserver-stack/, downloads the components pinned in botserver/3rdparty.toml (checksum-verified), initializes the database, object storage and secrets, deploys the default bot, and starts the services. First run takes 2–5 minutes. The desktop edition runs the same sequence headlessly as ./start.sh --provision, printing one GBWIZARD:{...} line per component; the server prints progress to the console and writes component logs to botserver-stack/logs/.
The first-boot checklist
- Wait for bootstrap to finish. The startup log must reach the completed state (
Bootstrap process completed!in development logs). If the directory service (Zitadel) is slow to become ready, admin creation is deferred and the script waits — check the log before concluding the boot failed. - Health, unauthenticated.
curl -s http://localhost:8080/healthmust answer./healthis a fast anonymous liveness stub; if you pass?deep=1to it, the deep probe is downgraded to the stub on purpose — deep dependency probes live only on the authenticated/readyroute. - Components.
./botserver listshows installed vs available;./botserver status tables(andcache,drive,llm) confirms the core four. Component logs live underbotserver-stack/logs/. - Administrator. On first startup, if no admin exists, bootstrap creates one, generates a secure random password, creates the default organization, assigns admin roles, and prints the credentials to the console only. Save them immediately — the password is never displayed again. The desktop/GB Lite flow instead creates the administrator through the first-run wizard (
admin-credentials.jsonin the stack). - First sign-in. Log in, change the password, update the admin e-mail, and create real users (see First-run wizard and Users and roles).
- Secrets check.
./botserver vault healthproves the Vault connection works; the.envshould contain only Vault connection variables at this point.
What a healthy stack answers
| Check | Command | Expected |
|---|---|---|
| Liveness | curl -s http://localhost:8080/health |
200, version in the body |
| Readiness (deps) | authenticated GET /ready; add ?deep=1 for diagnostics |
healthy when the database answers, degraded otherwise |
| Database | ./botserver status tables, or pg_isready -U postgres |
installed / accepting connections |
| Vault | ./botserver vault health |
Vault is healthy |
| Drive | curl -sf https://127.0.0.1:9100/otterio/health/live (with the stack CA) |
200 |
| Metrics | authenticated GET /metrics |
Prometheus text |
Common first-boot failures
| Symptom | Cause / fix |
|---|---|
error while loading shared libraries: libpq.so.5 |
run ./PROD-DEPENDENCIES.sh --check; on a minimal server the next missing one is often libsystemd.so.0 from the provisioned Valkey |
| Bootstrap waits forever on the directory | Zitadel not ready within the wait window; check botserver.log for the bootstrap-completed line and the directory logs |
Vault sealed, Database pool creation failed … connection refused |
the server retries forever; unseal with three of the five keys from conf/vault/init.json (see Service does not start) |
| Port already bound | stop the conflicting service or move the port; check ss -tlnp |