Unified CDN management for Cloudflare, BunnyCDN, and Fastly. Purge cache by URL or tag, generate signed URLs for private assets, and pull analytics from your CDN provider — all from one endpoint. Works alongside nself-storage-transform for on-the-fly image delivery.
Set your license key with nself license set nself_pro_... before installing.
nself license set nself_pro_...
nself plugin install cdn
nself build
nself start| Variable | Required | Description |
|---|---|---|
PLUGIN_CDN_PROVIDER | Yes | CDN provider: cloudflare, bunny, or fastly |
PLUGIN_CDN_CLOUDFLARE_TOKEN | Cloudflare | API token with Cache Purge permission |
PLUGIN_CDN_CLOUDFLARE_ZONE_ID | Cloudflare | Zone ID for the target domain |
PLUGIN_CDN_BUNNY_API_KEY | BunnyCDN | BunnyCDN account API key |
PLUGIN_CDN_BUNNY_PULLZONE_ID | BunnyCDN | Pull zone ID to purge |
PLUGIN_CDN_SIGNED_URL_SECRET | No | Secret for generating signed URLs (HMAC-SHA256) |
curl -X POST http://127.0.0.1:3036/cdn/purge \
-H "Content-Type: application/json" \
-d '{"urls": ["https://cdn.example.com/images/hero.png"]}'curl -X POST http://127.0.0.1:3036/cdn/sign \
-H "Content-Type: application/json" \
-d '{"path": "/private/report.pdf", "expires_in": "1h"}'| Endpoint | Method | Description |
|---|---|---|
/cdn/purge | POST | Purge URLs or cache tags from the CDN |
/cdn/purge/all | POST | Purge entire zone cache |
/cdn/sign | POST | Generate a time-limited signed URL |
/cdn/analytics | GET | Bandwidth, requests, and cache-hit ratio from the provider |
/health | GET | Plugin health check |
nself plugin remove cdnPort: 3036 | Category: Infrastructure | Last Updated: April 2026 | Plugin Version 1.1.1