API Keys
Cloudflare Account ID
Identifies which Cloudflare account the deploy targets.
Quick reference
- Env var:
CF_ACCOUNT_ID - Required for: every deploy (all workers, DNS, custom domain setup)
- Permissions / scopes: not applicable — this is a public identifier, not a secret. It's only sensitive because it scopes which account your API token writes to.
- Validation:
mastrakit doctor --key CF_ACCOUNT_ID(checks the ID exists and that yourCLOUDFLARE_API_TOKENcan access it)
Where to find it
- Go to dash.cloudflare.com and sign in.
- In the sidebar, click Workers & Pages (or any zone).
- The Account ID is shown on the right-hand side of the overview page — a 32-character hex string.
- Click the copy icon next to it.
Alternative: the Account ID is also visible in the URL when you're in a worker. dash.cloudflare.com/<account-id>/workers/...
Add to your project
Paste into .env.dev-secrets (gitignored):
CF_ACCOUNT_ID=bc23091c80334ec6751586189e46be26Note: the env var is
CF_ACCOUNT_ID, notCLOUDFLARE_ACCOUNT_ID. Older docs and the previousdeploy.jsonschema used the longer form; the codebase usesCF_ACCOUNT_IDeverywhere.
Multiple accounts
If your Cloudflare login has access to multiple accounts (e.g. personal + work), double-check you copied the ID for the account you want to deploy to. The validator can't catch a "wrong account" — it can only confirm "this account exists and this token can access it".