Start
Quickstart
1. Choose what you need
| You want | Choose |
|---|---|
| A ready personal control panel | Personal dashboard |
| An API for your existing product or bot | Agent backend |
| Your own web or mobile UI | Agent backend, then build your UI |
| A self-hosted business inbox | Flary Mail |
The dashboard starter includes first-owner login, the production React and WebSocket thread console, provider setup, MCP connections, approvals, tool activity, and secret-health status. The backend is headless and exposes the same durable agent runtime through typed APIs.
The mail starter receives and sends mail for selected addresses. It includes inbox, sent, draft, archive, spam, and trash folders; replies and attachments; team access; and WebSocket updates.
2. Choose a setup path
For a guided browser setup for your assistant, clone Flary and run the local setup assistant:
git clone https://github.com/rdvo/flary.git
cd flary
npm run setup
It opens the assistant in your browser and creates a project in ~/flary-project by default. Keep
the terminal open while you work through setup. This path requires Node.js 22.19 or newer.
To choose a dashboard, backend, or Flary Mail starter from the terminal, run the CLI wizard:
npx flary create
The default setup does not need Docker. Browser Run and Sandbox are optional.
3. Sign in to Cloudflare
The wizard starts Wrangler OAuth. Sign in in the browser and select the Cloudflare account that will
own the deployment. Flary stores the selected account ID in .flary/project.json. It never reads or
stores Wrangler’s access token.
4. Choose an AI provider
Choose OpenAI, Anthropic, Cloudflare Workers AI, or skip provider setup. API keys are entered in a hidden prompt. Workers AI does not need a provider key.
The personal dashboard does not ask for an MCP token. After deployment, open Connections, paste an MCP server URL, and complete the server’s login. For the backend template, the optional GitHub example uses a fine-grained GitHub token during setup.
Local secrets go in .dev.vars with file mode 0600. Production values are uploaded as Worker
secrets. They do not enter source files or command arguments.
5. Deploy
The wizard installs packages, builds the Worker, creates required Cloudflare resources, uploads
secrets, applies database migrations, deploys, and checks /health. For mail projects, it also
enables Email Routing and Email Sending. Email Routing replaces the domain’s inbound MX records.
Interactive setup asks for approval before making this change; the automated --yes option approves
it as described below.
If setup stops, continue from the generated project directory:
npx flary setup
npx flary deploy
npx flary doctor
6. Use the result
For a dashboard, open the printed setup URL and create the first owner with FLARY_SETUP_TOKEN from
the generated .dev.vars file. Registration closes after that owner is created. Direct Better Auth
registration is disabled. Open Connections to add an MCP server by URL.
For a personal backend, use FLARY_ACCESS_TOKEN from .dev.vars as a bearer token.
Existing-application authentication stays closed in production until you add a trusted identity
resolver.
For mail, open the printed /setup URL and use FLARY_SETUP_TOKEN to create the first owner. Read
the Flary Mail guide for domain setup, the MX record change, and mailbox limits.
Next, choose one guide:
- Functions for finite typed work.
- Persistent agents for durable conversations.
- Build your UI or bot for headless clients.
Automated setup
Non-interactive setup must state every required choice. Provider keys come from the process environment.
OPENAI_API_KEY=... npx flary create my-flary \
--template backend \
--provider openai \
--package-manager npm \
--deploy \
--yes
Create mail without interactive prompts:
In this command, --yes approves setup prompts, including enabling Email Routing and replacing the
domain’s inbound MX records. Use it only when Flary should receive mail for that domain.
npx flary create my-mail \
--template mail \
--domain example.com \
--mailboxes admin,support \
--package-manager npm \
--deploy \
--yes