Deploy
Install the Fly CLI and authenticate
Install
flyctl using the official instructions, then log in:Clone the repo and create the app
fly.toml configuration. The --no-deploy flag prevents deploying before secrets are set.Set secrets
| Variable | Required | Description |
|---|---|---|
AGENT_VAULT_MASTER_PASSWORD | No | Derives a KEK that wraps the data encryption key. Omit for passwordless mode. |
AGENT_VAULT_ADDR | Recommended | Externally-reachable base URL. Used for generating links in emails, invites, and discovery responses. |
Deploy
Register the owner
Key details
- Config:
fly.tomlexposes port 14321 via Fly’s HTTP service (force HTTPS, auto-stop/auto-start). The MITM proxy on port 14322 is only reachable via Fly’s private networking (.internalDNS over IPv6) — it is not exposed to the public internet. The server must bind to::(all interfaces) so the proxy is reachable via Fly’s 6PN IPv6 mesh — pass--host ::instead of--host 0.0.0.0. - Agent connectivity: agents connect to the proxy via the private network. Agents running on Fly (same org) use
http://<token>:<vault>@your-app.internal:14322. Agents outside Fly connect via WireGuard (fly wireguard create). - Entrypoint:
scripts/docker-entrypoint.shforwards arguments to theagent-vaultbinary, which natively readsAGENT_VAULT_MASTER_PASSWORDfrom the environment - Storage: Persistent volume
agent_vault_datamounted at/data— all state is in a single SQLite file - Cold starts:
min_machines_runningdefaults to0, so the app scales to zero when idle. The first request after sleep incurs a few seconds of cold-start latency. Set it to1infly.tomlif you need always-on availability.
PostgreSQL with Fly Postgres
For production deployments or to run multiple Agent Vault machines, switch from SQLite to PostgreSQL:DATABASE_URL automatically. Agent Vault detects it and uses Postgres on the next deploy. See the PostgreSQL guide for full setup, migration steps, and configuration details.
Connecting agents
- Agent on Fly (same org)
- Agent outside Fly
Agents running as Fly apps in the same organization reach the proxy via
.internal DNS — no public internet involved.
