Hosted mode

Run Frond for a team on Fly.io with Supabase Postgres, Auth and Storage, a GitHub App and a remote test runner.

petal serve-hosted (Cargo feature hosted) runs the API, MCP over HTTP (/mcp, agent tokens) and the dashboard in one container. It stores data in Postgres and evidence in S3-compatible storage, signs people in with GitHub (through Supabase Auth) or passkeys, and posts pull request checks through a GitHub App.

The full deploy guide is docs/deploy.md in the Frond repository. This page is the outline.

What you need

  • Supabase: Postgres, Auth with the GitHub provider, and a private Storage bucket (petal-evidence) with S3 keys. Use asymmetric JWT signing keys; Frond refuses to start on a project that only has the HS256 secret. Connect on port 5432 (direct or session pooler); the transaction pooler on 6543 is rejected.
  • GitHub App (optional): check runs on pull requests. Set all six PETAL_GITHUB_APP_* variables or none.
  • Fly.io: one machine for the core, and optionally a second app for the test runner.

Core

fly launch --no-deploy --copy-config
fly secrets set PETAL_PUBLIC_URL=https://<host> DATABASE_URL=… SUPABASE_URL=… …
fly deploy
fly scale count 1

Keep exactly one machine. Required variables:

Variable Notes
PETAL_PUBLIC_URL https://<host>, no path
DATABASE_URL Postgres on port 5432
SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY project URL and publishable key
PETAL_SIGNUP_GITHUB_LOGINS GitHub logins allowed to sign up
PETAL_RUNNER_TOKEN 32+ characters; the runner needs the same value
PETAL_S3_ENDPOINT, PETAL_S3_REGION, PETAL_S3_BUCKET, PETAL_S3_ACCESS_KEY_ID, PETAL_S3_SECRET_ACCESS_KEY evidence storage
PETAL_ALLOWED_HOSTS test target hosts; the server and hosted runners refuse to start without it

Test runner

A separate Fly app that only makes outbound requests. Put it in its own Fly organization if you can. Set PETAL_URL to the core’s public URL, the same PETAL_RUNNER_TOKEN, and always PETAL_ALLOWED_HOSTS:

fly apps create petal-runner -o <runner-org>
fly secrets set -c fly.runner.toml \
  PETAL_RUNNER_TOKEN=<same value as the core> \
  PETAL_ALLOWED_HOSTS='staging.example.com,*.preview.example.com'
fly deploy -c fly.runner.toml

Dashboard on its own origin

By default the core serves the dashboard. You can serve it from Vercel instead, with PETAL_WEB_URL on the API and VITE_PETAL_API_URL on the dashboard build.

The two origins must share a registrable domain, for example app.example.com and api.example.com. Two hosts on a shared platform domain (*.vercel.app, *.fly.dev) are different sites, and the API refuses that pairing at startup. The session cookie stays host-only, SameSite=Strict, and there are no third-party cookies.

Agents and the sidecar

Agents connect to https://<host>/mcp with a project-scoped agent token. The sidecar signs in through the system browser.