Skip to content

Cloudflare Workers

Cloudflare Workers are extremely powerful, but dealing with env vars within them can be challenging. Varlock can simplify that, providing validation, type-safety, flexible multi-environment management, and extra security guardrails to ensure you never leak a secret.

If using a framework (like Next.js) deployed on Cloudflare Workers, you can use the integration for that framework.

However, to use varlock in a Cloudflare Workers app without a framework, you must use our Vite integration, along with the Cloudflare Vite plugin. If you are not yet using their Vite plugin, it is very easy to set up, and provides some great DX improvements to your workflow.

To set up varlock in a Cloudflare Workers application, follow the instructions for our Vite integration.