npx dotenvx set DEBUG "myapp:*" --env local --encrypt # This updates .env.vault.local
The .env.vault.local file is a specific implementation file used primarily when managing encrypted environment variables locally. .env.vault.local
Unlike a standard .env file, this file does not contain plaintext. It contains a JSON structure with encrypted blobs. npx dotenvx set DEBUG "myapp:*" --env local --encrypt
: On your server (Heroku, Vercel, etc.), you set a single environment variable— DOTENV_KEY . When the app starts, it uses this key to decrypt the .env.vault file and load the required secrets into memory. Comparison: Dotenv Vault vs. Other Tools Export secrets as environment variables with Vault Agent .env.vault.local
Your team shares an encrypted .env.vault containing production and staging secrets.