Before provisioning
The self-hosted admin instance must already have:- a public hostname that reaches the web server
- the admin Cloudflare OAuth app configured
- the admin R2 archive bucket configured
- internal service secrets configured
- the web app running and reachable
Provisioning flow
1
Sign in
Open the AgentTeam Email web app at the configured public hostname and sign in.
2
Connect Cloudflare
Start the Cloudflare connection flow in the web UI. The user approves the Cloudflare OAuth scopes and
returns to AgentTeam Email.
3
Select the zone
Choose the Cloudflare zone that should receive agent mail.
4
Provision the domain
AgentTeam Email uses the user’s Cloudflare OAuth grant to create or update DNS, Email Routing, Worker
script, Worker routes, and Worker bindings for that domain.
5
Verify delivery
Send a test message to the domain, confirm R2 archive objects were written, and confirm the target mailbox received the message.
Credentials used
The user’s OAuth grant is stored server-side. Do not copy access tokens into deployment files, browser-visible config, logs, or docs.
Provisioned Worker bindings
The web app and mail-control service generate the Worker bindings for each domain. Operators do not set these by hand in Compose or Helm.AGENTTEAM_INGEST_URL is derived from the admin public hostname and the Worker connection public ID. AGENTTEAM_WORKER_HMAC_SECRET stores the deployment-owned Standard Webhooks signing secret. R2 credentials are temporary and scoped to the connected domain archive prefix.
Not part of domain provisioning
- User domains are not configured with
AT_EMAIL_ADMIN_*environment variables. - User-domain mail does not use admin transactional SMTP.
- Operators do not paste user Cloudflare API tokens into Compose or Helm.
- Operators do not set global Worker ingest URLs or global Worker webhook signing secrets.