Documentation

Environment variables

Set configuration per environment from the site’s Environment settings in the dashboard.

Scopes

ScopeApplies to
productionProduction deploys only
previewPreview and pull-request deploys
sharedBoth production and preview

Secrets

Mark a variable as a secret to have it masked in the dashboard and in build logs.

When changes apply

Variables are read at build and start time, so changes take effect on the next deploy. Redeploy (push, use a deploy hook, or run avoca deploy) to pick them up.

Build-time variables in frontend apps

Frontend frameworks only expose variables with their own public prefix to browser code, for example VITE_ for Vite. Anything exposed this way ends up in the bundle that visitors download, so never put secrets in a public-prefixed variable.

Variables from a linked backend

When a site is linked to a Da8a backend, Chapong adds the backend’s URL and public (anon) key to the site’s environment and keeps them in sync if they change. By default they are named SUPABASE_URL and SUPABASE_ANON_KEY (also AVOCABASE_URL and ANON_KEY). Frameworks that only expose prefixed variables to the browser, like Vite, can map them to other names such as VITE_SUPABASE_URL and VITE_SUPABASE_ANON_KEY, which is what the templates use.