Quick Fix: Use the Edit Zone DNS Template
- Go to: https://dash.cloudflare.com/profile/api-tokens
- Click Create Token
- Find and click Use template next to Edit zone DNS
- Under Zone Resources:
- Change from "All zones" to:
- Include → Specific zone → Select everydayoffice.au
- Click Continue to summary
- Click Create Token
- Copy the token (you won't see it again!)
- Paste it into /rmm-psa-platform/.env as CLOUDFLARE_API_TOKEN=<your-token>
What This Template Includes
The "Edit zone DNS" template automatically grants:
- ✅ Zone → DNS → Edit
- ✅ Zone → Zone → Read
This is exactly what we need to:
- List DNS records in everydayoffice.au
- Create/update/delete DNS records for demo.everydayoffice.au
- Won't affect the main website (apex zone records remain untouched)
Verify It Works
After updating .env, run:
cd devops/cloudflare
./check_cf_token.sh --write-check
Expected output:
[OK] Token active
[OK] Zone ID: ...
[OK] DNS read access confirmed
[OK] DNS write confirmed (created and deleted cf-permission-check-...)
Common Issues
- Authentication error: Token not copied correctly or has extra spaces
- HTTP 403: Wrong permissions (not using the template, or custom token missing DNS:Edit)
- Zone not found: Token scoped to wrong account or zone name mismatch