Skip to content

Environment variables

Environment variables are stored as a Kubernetes Secret of the app. Values are written once and never shown again: the CLI, the dashboard and the API list only the names.

Terminal window
vibe env shop # list names
vibe env shop STRIPE_KEY=sk_live_… MODE=prod # set
vibe env shop --unset OLD_FLAG # remove
vibe env shop NEW=1 --unset OLD # both at once

Setting or removing variables restarts the app if it is running. You can also set them with the first deploy:

Terminal window
vibe deploy --env STRIPE_KEY=sk_live_… --env MODE=prod

For an agent the tool is set_env, or env in deploy_app.

Variable When Value
PORT always the port to listen on, 8080 unless you set one
DATA_DIR app has a volume the volume’s mount path, /data by default
DATABASE_URL a PostgreSQL database is linked postgres://app:…@host:5432/db?sslmode=disable
REDIS_URL a Redis database is linked redis://default:…@host:6379

Variables are available to the running app. A static site built from package.json (Vite, React, Astro) is built once without them, so values it needs in the browser must be in the code or in a committed file. Only put public values there, such as an API’s public URL or a publishable key.