Search
Star
Feedback
Setup for Free
Ā© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
secrets: `.env.SECRET_NAME` or `context.env.SECRET_NAME` - Cloudflare Developers
CD
Cloudflare Developers
ā¢
3y ago
ā¢
2 replies
endymion1818
secrets: `.env.SECRET_NAME` or `context.env.SECRET_NAME`
I have a
.dev.vars
.dev.vars
locally with some secrets
, and Wrangler is telling me they
're available
, however in my worker I
've tried both
${env.SECRET_NAME}
${env.SECRET_NAME}
and
{context.env.SECRET_NAME}
{context.env.SECRET_NAME}
, neither of which is resolving
.
Does anyone know what might be the issue
? Since the documentation mentions both approaches
, I am suspicious that either might be incorrect
.
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Can't create secrets or env variables?
CD
Cloudflare Developers / workers-and-pages-help
10mo ago
Worker losing Secret from env
CD
Cloudflare Developers / workers-and-pages-help
6mo ago
Turnstile setting secret via env
CD
Cloudflare Developers / workers-and-pages-help
2y ago
Can Snippets access Environment Variables or Secrets?
CD
Cloudflare Developers / workers-and-pages-help
15mo ago