© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
How to access secrets from .ENV file globally on local server ? - Cloudflare Developers
CD
Cloudflare Developers
•
3mo ago
•
1 reply
btzr.io
How to access secrets from .ENV file globally on local server ?
Wrangler
Workers
✅
Solved
I have a
.env file with some secrets to test my worker app
,
I tried to import env from
c
l
o
u
d
f
l
a
r
e
:workers but when I run
wrangler dev
wrangler dev
env is an empty object
. I can only access env from request handlers but not globally
.
Cloudflare Developers
Join
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
87,353
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
How to access local HTML file with Puppeteer?
CD
Cloudflare Developers / workers-and-pages-help
9mo ago
How am I supposed to access secrets??
CD
Cloudflare Developers / workers-and-pages-help
3y ago
How do we access production env vars and secrets with the vite-plugin?
CD
Cloudflare Developers / workers-and-pages-help
11mo ago
Unable to access build time secrets
CD
Cloudflare Developers / workers-and-pages-help
13mo ago