Auto-injected variables
Vybe sets the following environment variables during deployment:| Variable | Description |
|---|---|
DATABASE_URL | PostgreSQL connection string for your app’s built-in database |
| External database credentials | Connection strings for any external databases you have connected (PostgreSQL, MySQL, Redshift) |
| Custom API credentials | Credentials for each custom API you have configured (e.g., CUSTOM_API_MY_SERVICE) |
| Integration credentials | Access tokens and keys for server-side integration access |
VYBE_SERVER_SECRET | Secret token for server-to-server authentication between your app and Vybe APIs |
| Vybe framework URLs | Internal URLs used by the Vybe platform for framework communication |
Accessing variables in your code
Environment variables are available in server-side code viaprocess.env:
Security
Environment variables are handled securely throughout the deployment pipeline:- Variables are encrypted at rest and in transit
- Variables are injected at build time and are only available on the server
- Variables are never exposed to the client side — they cannot be accessed from browser-side JavaScript
- Credentials are not visible in your app’s source code
When variables update
Environment variables are set at deployment time. If you make changes to your integrations or data connections after deploying, the updated credentials are not automatically applied to your running app. You need to redeploy in these situations:- You connect a new external database
- You add or update a custom API
- You connect a new integration that your app uses server-side
- You rotate or refresh credentials for an existing connection
After making changes to your integrations or custom APIs, click Deploy again to inject the updated environment variables into your app.
Built-in database
Every Vybe app gets its own PostgreSQL database. The connection string is automatically available asDATABASE_URL. The AI uses this to:
- Create and manage tables
- Run queries from API routes and server components
- Execute migrations when your schema changes
External databases
When you connect external databases through the Integrations page, their connection credentials are injected as environment variables during deployment. This lets your app query external databases directly from server-side code. Each external database gets its own environment variable with a name based on the connection you configured.Custom APIs
Custom API credentials you create on the Integrations page are injected as environment variables named after the API. For example, if you create a custom API called “My Service”, the credentials are available asCUSTOM_API_MY_SERVICE.
The AI references these variables when it generates code that calls your custom APIs.
Server secret
TheVYBE_SERVER_SECRET variable enables server-to-server authentication between your deployed app and Vybe platform APIs. This is used internally for features like:
- User authentication verification
- Accessing organization data
- Integration proxy calls
What is next
- Deploy your app and see these variables in action: Deploying Your App
- View usage data for your deployed app: App Analytics