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.
vibe env shop # list namesvibe env shop STRIPE_KEY=sk_live_… MODE=prod # setvibe env shop --unset OLD_FLAG # removevibe env shop NEW=1 --unset OLD # both at onceSetting or removing variables restarts the app if it is running. You can also set them with the first deploy:
vibe deploy --env STRIPE_KEY=sk_live_… --env MODE=prodFor an agent the tool is set_env, or env in deploy_app.
Set by VibeDeploy
Section titled “Set by VibeDeploy”| 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 |
Build time vs. run time
Section titled “Build time vs. run time”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.