# Deploy your own email on Cloudflare Workers · cloudmail

> Buy a licence, click Deploy to Cloudflare, then paste one Cloudflare API token. The setup wizard shows every DNS, routing and sending change before it makes it.

Canonical: https://trycloudmail.com/deploy
Last updated: 2026-11-24

**One-click deploy, then a guided setup.** cloudmail installs into your own Cloudflare account. You click one button, answer a short setup, and paste one API token. The app shows you every change it will make to your domain before it makes it.

1. **Buy a licence**: Solo or Unlimited. The key arrives by email.
2. **Click Deploy to Cloudflare**: The app and its storage are created in your own account.
3. **Paste one Cloudflare token**: Setup shows its plan for your domain, then applies it when you say so.

## Before you start

- **A Cloudflare account**: Your mail, storage and AI usage live here.
- **Your domain on Cloudflare DNS**: Each domain you add must use Cloudflare's nameservers.
- **R2 turned on**: Open R2 in the Cloudflare dashboard once and complete its sign-up, so the deploy can create a bucket.
- **Workers Paid, $5 a month**: Recommended. Sending through Cloudflare Email Service needs it.
- **A GitHub or GitLab account**: The Deploy button copies the code into a repository you own.

## 1. Buy a licence

Pick Solo for one domain or Unlimited for all of them. Checkout is handled by Dodo Payments, and your licence key arrives by email. You will paste it during setup.

| Plan | Price | Domains | Buy |
| --- | --- | --- | --- |
| Solo | $9 once, one deployment | One domain | [Buy Solo](https://licence.tapetide.com/cloudmail/buy/solo) |
| Unlimited | $29 once, one deployment | Unlimited domains | [Buy Unlimited](https://licence.tapetide.com/cloudmail/buy/unlimited) |

## 2. Click Deploy to Cloudflare

Cloudflare copies the code into a repository you own and creates the app in your account: the Worker, an R2 bucket for attachments, a KV namespace, a Vectorize index for search, the Durable Objects that hold each mailbox, and a Workers AI binding.

The deploy form asks for a few values. Then open the app's address: the first visit asks for the setup token and creates the owner account.

[Deploy to Cloudflare](https://deploy.workers.cloudflare.com/?url=https://github.com/cloudmail-hq/cloudmail)

### The deploy form

```text
Worker name
  cloudmail
SETUP_TOKEN
  openssl rand -base64 32
  # keep it: it's also your recovery key
AUTH_SECRET
  openssl rand -base64 32
DOMAINS, CF_API_TOKEN
  leave empty: you add them in the app
```

## 3. Paste one Cloudflare token

The setup screen has a Create token link that opens Cloudflare with the right permissions filled in. Paste the token, paste your licence key, and pick your domains.

The app then shows a plan. It lists what it will do on its own, what needs your confirmation, and anything you must do by hand. Apply it, create a mailbox, and send it a test from another account.

## What setup changes, and what it asks first

Nothing on your domain changes until you apply the plan, and you can undo each DNS change it made.

### Done for you

- Turns on Email Routing for the domain
- Points the catch-all address at your cloudmail Worker
- Sets the domain up for sending, with SPF and DKIM
- Adds a monitor-only DMARC record if you have none, and keeps yours if you do
- Creates the metadata index that search needs

### Asks you first

- Anything that changes or removes a record you already have, such as another provider's MX records
- Steps it can't do with your token are listed for you to do in the dashboard

## Moving from Google or Microsoft

Changing MX records moves new mail to cloudmail straight away. Bring your history across first: Settings → Import takes a Google Takeout file, .mbox or .eml files, or reads an IMAP account read-only. Labels, threads and read state come with it, and re-running an import adds nothing twice.

Then let setup replace the old MX records. Keep your old account until you have checked that mail arrives and sends from the new one.

More on [importing from Gmail, IMAP or .mbox](https://trycloudmail.com/features/email-import), [domains, aliases and catch-alls](https://trycloudmail.com/features/custom-domain-email) and [SPF, DKIM, DMARC and deliverability](https://trycloudmail.com/features/email-deliverability).

Rather hand it to an AI agent? The README has a [prompt for Claude Code, Codex or Cursor](https://github.com/cloudmail-hq/cloudmail#deploy-with-an-ai-agent) that deploys from the terminal. For the manual route, see the [docs](https://trycloudmail.com/docs).

## Related

- [Pricing](https://trycloudmail.com/pricing)
- [Docs](https://trycloudmail.com/docs)
- [Agents and developers](https://trycloudmail.com/agents)
