
By Moritz Hein
A plugin to trigger Cloudflare Worker and Pages builds from Strapi.
released July 2, 2026
npm install strapi-plugin-cloudflare-deployA plugin to trigger Cloudflare Worker and Pages builds from Strapi.
Note: This plugin is inspired by strapi-plugin-cloudflare-pages. This version adds support for the newer Cloudflare Workers (in addition to Pages) and is built for Strapi v5.
scriptTag, Workers only)npm install strapi-plugin-cloudflare-deploy
# or
yarn add strapi-plugin-cloudflare-deployAfter installation, rebuild your Strapi admin panel:
npm run build
# or
yarn buildConfigure the plugin in your config/plugins.ts (examples shown for TypeScript):
export default ({ env }) => ({
'cloudflare-deploy': {
enabled: true,
config: {
// Account Id and Api Token are only required for Worker instances
accountId: env('CF_ACCOUNT_ID'),
apiToken: env('CF_API_TOKEN'),
instances: [
{
type: 'worker',
name: 'Production Worker',
triggerUuid: '1cf3cac4-some-trigger-uuid',
branch: 'main',
// Optional: enables the build history list in the admin panel
// (the Worker's tag / external_script_id, filled in by the generator script)
scriptTag: '7abd74b11f5d42c8b8f7456f02647987'
},
{
type: 'pages',
name: 'Production Site',
deployHookUrl: env('CF_PAGES_DEPLOY_HOOK')
}
]
}
}
});| Property | Type | Required | Description |
|---|---|---|---|
| accountId | string | For Workers | Cloudflare Account ID |
| apiToken | string | For Workers | API token with Workers Builds permission |
| instances | array | Yes | Array of deployment targets |
| Property | Type | Required | Description |
|---|---|---|---|
| type | 'worker' | Yes | Instance type |
| name | string | Yes | Display name in the admin panel |
| triggerUuid | string | Yes | Build trigger UUID from Cloudflare |
| branch | string | No | Git branch to deploy |
| scriptTag | string | No | Worker tag (external_script_id) — the 32-char hex id, not the display name. Enables the build history list in the admin panel. Filled in automatically by the generator script; uses the same API token — no extra permission needed. |
| Property | Type | Required | Description |
|---|---|---|---|
| type | 'pages' | Yes | Instance type |
| name | string | Yes | Display name in the admin panel |
| deployHookUrl | string | Yes | Full deploy hook URL from Cloudflare |
See Find account and zone IDs in the Cloudflare docs.
This plugin requires a user API token (account API tokens don't seem to work right now).
Use the helper script to generate the instance configuration. You can run it directly without cloning the repository:
curl -fsSL https://raw.githubusercontent.com/Kage0x3B/strapi-plugin-cloudflare-deploy/refs/heads/main/generate-cloudflare-worker-config.sh | shOr if you have the repository cloned:
./generate-cloudflare-worker-config.shSecurity Note: Before running scripts from the internet, you should review them first. You can view the script source here. The script only makes read-only requests to two Cloudflare APIs to list your Workers and fetch their build triggers — it does not modify anything.
The script will:
fzf for interactive selection)Example output:
{
name: "my-worker",
type: "worker",
triggerUuid: "abc123-def456-...",
branch: "main",
scriptTag: "7abd74b11f5d42c8b8f7456f02647987",
}Copy this into your plugin configuration's instances array. You may want to change the name to something more descriptive.
Note: The script requires
curlandjqto be installed. Only the 30 most recent Workers are shown.
Share your work with the community and get it listed in the Strapi ecosystem for everyone to discover and use.
Submit
