Deployment
Cyborg7 deployment modes — local daemon (agents on your machine) and cloud relay (broker on EC2 connecting daemons across machines).
Cyborg7 has two deployment modes: a local daemon (full server, agents run on your machine) and a cloud relay (a broker on EC2 that connects daemons and clients across machines). The desktop app ships an embedded daemon with silent auto-update. Mobile is a Tauri 2 app (iOS and Android).
Mode 1: Local daemon
The default. Each user runs the daemon on their own machine. In solo mode it uses SQLite only; set DATABASE_URL to switch to connected mode (SQLite cache + shared PostgreSQL, syncing through the relay). Agents run locally.
pnpm install
# Solo mode: nothing else required
pnpm dev
# Connected mode: point at shared PostgreSQL first
export DATABASE_URL=postgres://user:pass@host:5432/cyborg7
pnpm drizzle-kit migrate
pnpm dev
Mode 2: Cloud relay
The relay (relay-standalone.ts) is a Hono HTTP + WebSocket broker that runs on EC2. It uses PostgreSQL for shared state, optional Redis for multi-instance pub/sub and rate limiting, and S3 for asset storage. It has its own message routing, separate from the local daemon's dispatcher — it handles auth, workspace/channel/member/task operations against PostgreSQL directly, and forwards agent prompts to connected daemons.
Deploying the relay (source + restart, no build)
The relay runs TypeScript directly via tsx — there is no compilation step. Deploy is a path-mirrored copy plus a service restart:
scp packages/server/src/server/cyborg/relay-standalone.ts \
ceiba:/opt/cyborg7/packages/server/src/server/cyborg/
ssh ceiba "sudo systemctl restart cyborg7-relay"
Dependencies (node_modules) are pre-installed in /opt/cyborg7/deploy/ on the box. If you add a new dependency, run pnpm install on EC2 before restarting — a new import that ships uninstalled crash-loops the service. The on-box file layout and the systemd unit assume these exact relative paths, so don't move the cyborg/ relay files. (Containerizing the relay is the documented future plan — see Docker.)
Relay environment
Set these on the EC2 host (see Configuration for the full list):
DATABASE_URL=postgres://user:pass@rds-host:5432/cyborg7
CYBORG7_JWT_SECRET=<strong secret> # relay refuses to boot with the dev default
RELAY_HOST=0.0.0.0
RELAY_PORT=8787
RELAY_PUBLIC_URL=wss://relay.cyborg7.com
REDIS_URL=redis://localhost:6379 # optional — for multi-instance relay
S3_ASSETS_BUCKET=cyborg7-shared-assets
S3_ASSETS_REGION=sa-east-1
Desktop release
The desktop app is the Svelte UI built with adapter-static, wrapped in Electron, with an embedded local daemon and silent auto-update. Bump the version in packages/desktop-cyborg/package.json before building — electron-builder uses it for the DMG filename.
cd packages/ui && pnpm build
cd packages/desktop-cyborg && npx tsc -p tsconfig.json
npx electron-builder --config electron-builder.yml --mac
Database migrations
Connected mode and the relay require PostgreSQL migrations (Drizzle):
pnpm drizzle-kit migrate