Handbook - Operations

Start, Stop, And Reset

This page covers day-to-day local operation.

On this page

This page covers day-to-day local operation.

Start Infrastructure

bun run dev:infra

Equivalent:

docker compose --env-file .env up -d nats surrealdb

Inspect infrastructure:

docker compose --env-file .env ps
docker compose --env-file .env logs -f nats surrealdb

Start Application Services

Preferred local command:

bun run dev:all

Manual order:

StepServiceCommand
1storage-writego run -tags surrealdb ./core/storage-write/cmd/storage-write
2storage-readgo run -tags surrealdb ./core/storage-read/cmd/storage-read
3control-planego run ./core/control-plane/cmd/control-plane
4BFF and frontendbun run dev
5OTLP collectorgo run ./core/otlp-collector/cmd/otlp-collector

The startup order avoids noisy first-load request timeouts. If the BFF starts before private services subscribe to NATS subjects, early GraphQL requests can fail with MESSAGE_BRIDGE_TIMEOUT.

Stop Services

Stop dev:all with Ctrl+C.

Stop stale local app processes left behind on CloudGrid dev ports:

bun run dev:clean

By default, this only stops listeners whose current working directory is inside the CloudGrid checkout. Use bun run dev:clean -- --force only when you want to terminate any process bound to a configured CloudGrid app port.

Stop Docker infrastructure:

docker compose --env-file .env down

Reset Local Data

This removes NATS JetStream and SurrealDB volumes:

docker compose --env-file .env down -v

Then restart:

bun run dev:infra
bun run dev:all

Ports Already In Use

PortDefault ownerOverride
3000BFFCLOUDGRID_BFF_PORT
5173frontend dev serverCLOUDGRID_FRONTEND_DEV_PORT
4318OTLP/HTTP collectorCLOUDGRID_OTLP_HTTP_ADDR
4317OTLP/gRPC collectorCLOUDGRID_OTLP_GRPC_ADDR
4222NATS clientCLOUDGRID_NATS_PORT in Docker Compose env
8000SurrealDBCLOUDGRID_SURREALDB_PORT in Docker Compose env

Next Step

Confirm readiness with Health and readiness.

Last updated .