
Step 1: Clone the starter project
Step 2: Create your Doppler project
Step 3: Add your secrets to Doppler
Step 4: Cloudflare local development with Doppler
Step 5: Deploy the application and sync secrets to Cloudflare
Step 6: Set up GitHub Actions for CI/CD
Step 7: Rotating secrets
Step 8: Team collaboration
Troubleshooting common issues
What you've accomplished
Once your secrets are set up in the Doppler dashboard, ensure you’re signed in to the Doppler CLI and inside your cloned sample project folder. Then run:
This command links your project to Doppler and sets the dev environment as the default for all Doppler commands run in this directory.
Before deploying your application to production, you'll want to test locally. Cloudflare Workers present a unique challenge here. Unlike traditional Node.js applications that read secrets from process.env, Cloudflare Workers receive secrets through the env object passed to the fetch handler. This means tools like dotenv don't work out of the box.
Wrangler solves this with a .dev.vars file. During local development, Wrangler reads this file and injects the values into the env object. Instead of manually maintaining this file, you can generate it directly from Doppler by running the following command:
This command pulls all secrets from your current configuration(dev) and writes them in the format that Wrangler expects.
Now start the local development server:
You should see output indicating that Wrangler found and loaded your .dev.vars file:

Open http://localhost:8787/secrets in your browser, and you should see all secrets reporting as "configured":
Your local development environment is now pulling secrets from Doppler. Any team member with access to the Doppler project can generate the same .dev.vars file and get identical results. No more sharing secrets over Slack, no more stale .env files copied weeks ago, and no more debugging issues that turn out to be mismatched credentials.
To test with staging or production secrets locally, regenerate the .dev.vars file with a different configuration:
Now your local Worker runs with staging secrets.
Trusted by the world’s best DevOps and security teams. Doppler is the secrets manager developers love.
