Environment Variables
Environment variables are encrypted at rest and injected into your containers at runtime or build time. Launchverse supports multiple environments per project and full version history for every variable.
Add or update a variable in the UI
- Open Project Settings → Environment Variables.
- Choose the target environment (Production, Preview, or Development).
- Enter the key and value.
- Mark Build-time only if the value is needed during
npm run buildbut not at runtime. - Save. The change is recorded in the version history and, for production, mirrored to the engine.
Scopes
Production— injected into the main production deployment.Preview— injected into PR preview deployments.Development— pulled locally or via the API for development.All— the legacy default; applies to production and preview unless scoped.
API
List variables
GET /api/projects/{projectId}/env
Response:
{
"environment": { "id": "uuid", "name": "Production", "is_default": true },
"variables": [
{ "id": "uuid", "key": "DATABASE_URL", "value": "••••••••", "is_build_time": false, "scope": "Production" }
]
}
Create or update a variable
POST /api/projects/{projectId}/env
{
"key": "API_KEY",
"value": "secret",
"is_build_time": false,
"scope": "Production",
"environment_id": "uuid"
}
If environment_id is omitted, the project's default environment is used.
Response:
{
"success": true,
"variable": {
"id": "uuid",
"key": "API_KEY",
"value": "••••••••",
"is_build_time": false,
"scope": "Production"
}
}
Bulk import
Paste a .env file:
POST /api/projects/{projectId}/env/bulk
{
"scope": "Production",
"variables": [
{ "key": "A", "value": "1", "is_build_time": false },
{ "key": "B", "value": "2", "is_build_time": true }
]
}
Delete a variable
DELETE /api/projects/{projectId}/env/{varId}
Version history
Every write is recorded. See Environment Variable Versioning for how to list and restore previous values.
[!CAUTION] Saving a variable triggers a debounced redeploy on the default environment. Wait for the deployment to finish before testing.