---
title: Deploy to Cloudflare buttons now support Worker environment variables, secrets, and Secrets Store secrets
description: Worker environment variables, secrets, and Secrets Store secrets can now be used in Workers templates
image: https://developers.cloudflare.com/changelog-preview.png
---

[Skip to content](#%5Ftop) 

# Changelog

New updates and improvements at Cloudflare.

[ Subscribe to RSS ](https://developers.cloudflare.com/changelog/rss/index.xml) [ View RSS feeds ](https://developers.cloudflare.com/fundamentals/new-features/available-rss-feeds/) 

![hero image](https://developers.cloudflare.com/_astro/hero.CVYJHPAd_26AMqX.svg) 

[ ← Back to all posts ](https://developers.cloudflare.com/changelog/) 

## Deploy to Cloudflare buttons now support Worker environment variables, secrets, and Secrets Store secrets

Jul 29, 2025 

[ Workers ](https://developers.cloudflare.com/workers/)[ Secrets Store ](https://developers.cloudflare.com/secrets-store/) 

Any template which uses [Worker environment variables](https://developers.cloudflare.com/workers/configuration/environment-variables/), [secrets](https://developers.cloudflare.com/workers/configuration/secrets/), or [Secrets Store secrets](https://developers.cloudflare.com/secrets-store/) can now be deployed using a [Deploy to Cloudflare button](https://developers.cloudflare.com/workers/platform/deploy-buttons/).

Define environment variables and secrets store bindings in your Wrangler configuration file as normal:

* [  wrangler.jsonc ](#tab-panel-1532)
* [  wrangler.toml ](#tab-panel-1533)

JSONC

```

{

  "name": "my-worker",

  "main": "./src/index.ts",

  // Set this to today's date

  "compatibility_date": "2026-04-23",

  "vars": {

    "API_HOST": "https://example.com",

  },

  "secrets_store_secrets": [

    {

      "binding": "API_KEY",

      "store_id": "demo",

      "secret_name": "api-key"

    }

  ]

}


```

Explain Code

TOML

```

name = "my-worker"

main = "./src/index.ts"

# Set this to today's date

compatibility_date = "2026-04-23"


[vars]

API_HOST = "https://example.com"


[[secrets_store_secrets]]

binding = "API_KEY"

store_id = "demo"

secret_name = "api-key"


```

Explain Code

Add secrets to a `.dev.vars.example` or `.env.example` file:

.dev.vars.example

```

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:

package.json

```

{

  "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`."

      }

    }

  }

}


```

Explain Code

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](https://developers.cloudflare.com/workers/platform/deploy-buttons/).