[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Feedback](/c/feedback/8)

# Improve environment variable management (supporting Dotenvx)

94 views · 0 likes · 1 post


Tim Molenaar (@timolenaar) · 2025-01-23

Many developers use a custom package or solution for managing environment variables. We, for example, use the package [Dotenvx](https://dotenvx.com/docs/). However, Vercel doesn't support custom env variable management tools on runtime. Especially when the application is not built within the Vercel infrastructure. We use our own CI/CD pipeline to build the Vercel application, and deploy it to Vercel using "vercel deploy --prebuilt".

Dotenvx allows us to include encrypted environment variables in our application, which is very nice, because only a single set of environment variables is needed for all platforms. At the moment we have environment variables all over the place (local / Gitlab / Vercel).

Currently, we found a workaround for this problem by injecting all individual .env variables from the .env file into the Vercel environment by using the "--env" flag of the Vercel-CLI. But once we perform a redeploy, all environment variables are gone (non-persistent)

It would be great if Vercel could support Dotenvx on runtime: automatically inject the pair of decryption keys on the start of the application, and load the variables again on a redeploy through the Vercel-UI.
I think this can be a very useful addition to the existing Vercel environment variable infrastructure