Skip to content
stage

Security

Shared access

Enable shared access for named accounts in one trusted workspace. Members can operate every project, task, worker and harness setting. Admins can also invite people, change roles and disable accounts. Members can run code on the server or workers wherever harnesses permit. Use separate OS accounts or hosts for stronger execution isolation.

Stage accepts email and password. An admin creates a single-use invite for a specific address and shares it privately. The OS user who runs Stage controls first-admin setup and admin recovery through a separate owner-only socket. Keep access to the data directory private.

Default binding

How it runsListens on
Foreground stage serve127.0.0.1:7380
Per-user service (and the desktop app)a private Unix socket only, mode 0600

Binding to 127.0.0.1 keeps other machines out, not browsers on this machine. Listener settings: Configuration.

Request origin policy

/api and /mcp reject requests that browsers send on behalf of other sites. Static UI routes are not checked. Checks, in order:

CheckRejects
Host (DNS rebinding)a Host other than an IP address, localhost, or a trusted origin's host. The port is ignored.
Fetch metadataSec-Fetch-Site: cross-site or same-site, unless the Origin is trusted. This applies to GET too.
Unsafe methodscross-origin POST, PUT, PATCH and DELETE
Body typea non-empty body on an unsafe method that is not application/json or multipart/form-data (415). This closes the text/plain and form-encoded vectors.

Trusted origins are STAGE_PUBLIC_URL's origin and those in STAGE_ALLOWED_ORIGINS. Any other hostname gets:

403 host "…" not allowed: add its origin to STAGE_ALLOWED_ORIGINS …

X-Forwarded-* headers are never trusted.

Exposing Stage to a network

  • For a personal server outside your trusted network, require proxy authentication and keep the Stage listener reachable only from the proxy.
  • For shared access, use a canonical HTTPS STAGE_PUBLIC_URL and bind Stage to loopback TCP or a protected product Unix socket. Preserve the public Host and browser Origin at the proxy. Cookie-based writes require that exact Origin. Protected routes require a credential, even on the product Unix socket.
  • Health, version and access status stay available without signing in so clients can connect. Shared public health omits operational details. Protected requests return 401 for missing or invalid credentials and 403 when an admitted principal lacks permission.

HTTPS options and streaming settings are in Self-hosted server and Multiple machines.

Worker routes

/api/worker/* uses independent machine credentials:

  • A worker joins with a one-time pairing code (valid 10 minutes), then authenticates every other worker route with a revocable machine token.
  • Every other route refuses machine tokens.
  • Forward the Authorization header unchanged. If a personal server uses an authenticating proxy, let /api/worker/* through without proxy user authentication. Keep pairing link creation protected.
  • Removing a machine revokes its token at once.

HTTP MCP and loopback

Shared Stage accepts HTTP MCP at the canonical origin with a scoped agent credential. Personal HTTP MCP keeps its loopback Host check. For a personal proxy forwarding to loopback, use stdio MCP or the CLI at the proxy URL. MCP tools

Agent gateway

A worker's agent gateway forwards /api and /mcp to the main server with its machine token. Shared mode admits agent operations through the worker's owner-private default socket. Update older workers for shared gateway access. A personal worker can also accept local HTTP MCP at a loopback address (STAGE_WORKER_LISTEN=unix,127.0.0.1:7381). Anyone who reaches that endpoint has agent access. The gateway refuses machine management and harness changes with 403.

Releases

Releases are not signed. The installer's checks catch corrupt, truncated or substituted downloads and wrong-platform releases; trust in the release itself rests on the GitHub account and HTTPS (Install and update).