Cloudflare
The two things the self-hosted vuzon needs from Cloudflare — an API token with exactly three permissions, and Email Routing enabled on your zone — and what vuzon writes there.
On this page
API token
Create the token
- Open the Cloudflare dashboard → My Profile (avatar, top right) → API Tokens.
- Click Create Token → Create Custom Token.
- Under Permissions, add these rows (names match the English Cloudflare UI):
| Scope | Permission | Why vuzon needs it |
|---|---|---|
| Account → Email Routing Addresses | Edit | List, add and remove destination addresses. |
| Zone → Email Routing Rules | Edit | List, create, update, enable/disable and delete routing rules. |
| Zone → Zone | Read | On startup, resolve CF_ZONE_ID and CF_ACCOUNT_ID from DOMAIN. Skip this row only if you set both IDs manually in .env. |
- Under Account Resources, choose the account that owns the zone (or All accounts if you accept broader access).
- Under Zone Resources, restrict to Specific zone → your domain (recommended), or All zones for that account.
- Create the token and copy the value into
CF_API_TOKENin.env.
Cloudflare shows the token once. Copy it right away — if you lose it, revoke it and create a new one.
Least privilege
Use an API token, not the Global API Key. Prefer least privilege — one zone, one account — over “all zones” when possible. vuzon never logs the token and never returns it to the browser.
The official guide: Create API tokens.
Email Routing
Enable it on your zone
In the Cloudflare dashboard, open your zone → Email → Email Routing and enable it. Cloudflare guides you through creating the MX and SPF records for the domain. vuzon needs Email Routing to be already enabled on the zone — it manages the rules, not the DNS onboarding.
Zone and account autodetection
On startup, vuzon resolves your zone and account from DOMAIN (via the Zone: Read permission), so there are usually only two variables to set. If autodetection fails — or two zones share the same name — add both CF_ZONE_ID and CF_ACCOUNT_ID to your .env; the startup error tells you when. See Configuration.
What vuzon writes
vuzon only writes actions it fully understands: forward to one verified address, or discard. Everything else it shows without touching:
- A rule pointing at an Email Worker shows its script name.
- A fan-out rule (multiple destinations) shows all its addresses.
- Both are marked read-only in the list. They can still be renamed or paused — an omitted field is preserved exactly as Cloudflare holds it — but changing the action replaces routing you configured elsewhere, so the panel asks first rather than guessing. See Using the panel.
The catch-all
The catch-all handles mail sent to any address without an alias. From the panel you can pause it or change what it does — forward the leftovers to a verified address, or discard them.
What you cannot do is break it: the API always writes the “match everything” matcher and offers no delete, so the fallback rule cannot quietly stop catching mail.