Manage Cloudflare zones, DNS records, R2 object storage, cache purging, and analytics from your nSelf backend. Automate certificate provisioning, set up Workers KV bindings, and monitor CDN traffic — all via GraphQL or REST without leaving your stack.
Set your license key with nself license set nself_pro_... before installing.
nself license set nself_pro_...
nself plugin install cloudflare
nself build
nself start| Variable | Required | Description |
|---|---|---|
PLUGIN_CLOUDFLARE_API_TOKEN | Yes | Cloudflare API token with Zone:Edit and DNS:Edit permissions |
PLUGIN_CLOUDFLARE_ZONE_ID | Yes | Zone ID from the Cloudflare dashboard overview |
PLUGIN_CLOUDFLARE_ACCOUNT_ID | No | Required for R2 and Workers KV operations |
PLUGIN_CLOUDFLARE_R2_BUCKET | No | Default R2 bucket name for object storage operations |
curl -X POST http://127.0.0.1:3024/cloudflare/cache/purge \
-H "Content-Type: application/json" \
-d '{"urls": ["https://example.com/assets/app.js"]}'curl -X POST http://127.0.0.1:3024/cloudflare/dns/records \
-H "Content-Type: application/json" \
-d '{"type":"A","name":"api","content":"1.2.3.4","proxied":true}'| Endpoint | Method | Description |
|---|---|---|
/cloudflare/dns/records | GET, POST | List or create DNS records |
/cloudflare/dns/records/:id | PUT, DELETE | Update or delete a DNS record |
/cloudflare/cache/purge | POST | Purge cached assets by URL or tag |
/cloudflare/r2/upload | POST | Upload object to R2 |
/cloudflare/analytics | GET | Zone bandwidth and request analytics |
/health | GET | Plugin health check |
nself plugin remove cloudflarePort: 3024 | Category: Infrastructure | Last Updated: April 2026 | Plugin Version 1.1.1