Skip to content

Latest commit

 

History

History
34 lines (20 loc) · 2.65 KB

File metadata and controls

34 lines (20 loc) · 2.65 KB

Deployment

Independent builds

Build personal and company deployments independently from the public source. Do not copy personal databases, signing keys, device config, or built Agent identities into company infrastructure.

Required production variables are documented in .env.example. APP_MODE and TRUST_DOMAIN must match. Use a unique random HUB_TOKEN_SECRET of at least 32 characters and a strong initial password.

Reverse proxy

Terminate TLS at Caddy, nginx, an ingress controller, or a company-approved proxy. Forward /api/*, /ws/*, and /healthz to Hub port 8787 with WebSocket upgrades enabled. Serve the PWA at the exact HUB_WEB_ORIGIN configured on Hub. An example-only Caddyfile is in deploy/examples.

Set these response headers at the proxy:

Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
Referrer-Policy: no-referrer
Content-Security-Policy: default-src 'self'; connect-src 'self' https: wss:; img-src 'self' data: blob:; style-src 'self' 'unsafe-inline'; script-src 'self'; object-src 'none'; base-uri 'none'; frame-ancestors 'none'

Optional containers

deploy/docker/compose.yaml builds Hub and Web. The Hub uses a named volume for SQLite. The PWA embeds VITE_HUB_URL at build time, so personal and company PWA images are separate builds even though the source is identical.

For a path-based deployment, set both VITE_HUB_URL and VITE_BASE_PATH at Web build time. For example, a deployment at https://example.com/codex-remote/ uses VITE_HUB_URL=https://example.com/codex-remote and VITE_BASE_PATH=/codex-remote/. The reverse proxy must forward /codex-remote/api/ and /codex-remote/ws/ to the Hub after removing the /codex-remote prefix, and serve the PWA assets under /codex-remote/.

If the reverse proxy applies WebSocket message or request-body limits, allow at least 24 MB for /ws/*; the application still enforces the lower per-file and aggregate attachment limits described in the security document.

Docker is not required for local development or production: Hub can run directly with Node.js and the PWA is static output. Compose is provided only for operators who prefer containers. The reverse proxy is intentionally outside the Compose file because certificate and DNS ownership differ by deployment.

Agent update policy

The MVP never auto-updates. Release installation is an explicit administrator/user operation. AGENT_UPDATE_URL is reserved; config validation allows it for personal deployments and restricts company mode to the pinned Registry origin. A future updater must remain disabled by default, verify signed manifests, and honor this restriction.