Environment variables
Configure secrets and settings per environment.
Environment variables are encrypted at rest and injected into both the build and the running app. Each variable targets production, preview, or all environments.
In the dashboard
Open the project's Settings → Environment Variables. To add many at once, paste the contents of a .env file into a key field: each line becomes its own row. You can also import a .env file.
With the CLI
clouzark env ls
clouzark env add DATABASE_URL "postgres://..." -t production
clouzark env add API_KEY # prompts for the value
clouzark env rm API_KEY -t preview
clouzark env pull # writes .env.local with the preview values
clouzark env pull .env.production -e production-t (--target) takes all, production, or preview.
Changes apply to the next deployment. Run clouzark redeploy to rebuild the latest deployment with the new values.
Never commit .env files. clouzark deploy --upload skips them on purpose.