Local development secret store

I have a worker definition which uses secrets store. I am trying to test my worker locally, so I figure I should be able to create a secret store locally which I can update the binding to use. However, wrangler secret store create says Local secrets stores are automatically created for you on use. To create a Secrets Store on your account, use the --remote flag., and wrangler secret store list says This command is not supported in local mode. What is the ID of the local secrets store automatically created?
3 Replies
FrozenFire
FrozenFireOP4w ago
https://stackoverflow.com/questions/71298357/local-development-with-secrets This post suggests using .dev.vars, but that creates worker environment variables, not a secret store
Stack Overflow
local development with secrets
I am following this guide to get secrets added to my prod environment with cloudflare workers: https://developers.cloudflare.com/workers/platform/environment-variables/#comparing-secrets-and-enviro...
FrozenFire
FrozenFireOP4w ago
The answer seems to be to use wrangler secrets-store secret create <store id> --name <secret_name> --scopes workers, where the store ID is the ID of the store you would have remotely
FrozenFire
FrozenFireOP4w ago
https://github.com/cloudflare/workers-sdk/issues/9354 This seems to be the thing that messes everything up
GitHub
'scopes' for Secret Store's secrets not retained in local developme...
What versions &amp; operating system are you using? Wrangler 4.16.1 | MacOS | Node v22.14.0 Please provide a link to a minimal reproduction No response Describe the Bug When creating a secret using...

Did you find this page helpful?