Workers, Secrets Store - Deploy to Cloudflare buttons now support Worker environment variables, secrets, and Secrets Store secrets
11mo ago
Source
CloudflareWorkers, Secrets Store - Deploy to Cloudflare buttons now support Worker environment variables, secrets, and Secrets Store secretscloudflare.comAny template which uses Worker environment variables , secrets , or Secrets Store secrets can now be deployed using a Deploy to Cloudflare button . Define environment variables and secrets store bindings in your Wrangler configuration file as normal: wrangler.jsonc { " name " : "my-worker" , " main " : "./src/index.ts" , // Set this to today's date " compatibility_date " : "2026-07-03" , " vars " : { " API_HOST " : " , }, " secrets_store_secrets " : [ { " binding " : "API_KEY" , " store_id " : "demo" , " secret_name " : "api-key" } ] } wrangler.toml name = "my-worker" main = "./src/index.ts" # Set this to today's date compatibility_date = "2026-07-03" [ vars ] API_HOST = " [[ secrets_store_secrets ]] binding = "API_KEY" store_id = "demo" secret_name = "api-key" Add secrets to a .dev.vars.example or .env.example file: COOKIE_SIGNING_KEY = my-secret # comment And optionally, you can add a description for these bindings in your template's package.json to help users understand how to configure each value: { " name " : "my-worker" , " private " : true , " cloudflare " : { " bindings " : { " API_KEY " : { " description " : "Select your company's API key for connecting to the example service." }, " COOKIE_SIGNING_KEY " : { " description " : "Generate a random string using `openssl rand -hex 32`." } } } } These secrets and environment variables will be presented to users in the dashboard as they deploy this template, allowing them to configure each value. Additional information about creating templates and Deploy to Cloudflare buttons can be found in our documentation .
You might also wanna read
Cloudflare expands AI bot management tools with granular traffic controls for all customers
Cloudflare is celebrating the second "Content Independence Day" by expanding AI traffic management options for all website owners. Building
Workers - Simpler runtime types with @cloudflare/workers-types v5
Cloudflare·1d ago
AI Search - Manage AI Search sync jobs with Wrangler CLI
Cloudflare·2d ago
Workers - Work across multiple accounts with Wrangler auth profiles
Cloudflare·2d ago
Cache - Cache multiple versions of a URL with Vary
Cloudflare·2d ago
Cloudflare One - Hostname routing for Cloudflare Mesh
Cloudflare·2d ago

Comments
Sign in to join the conversation.
No comments yet. Be the first.