StarDomain

Environment Variables

Environment Variables

Configure your app with environment variables. All values are encrypted at rest.

Setting Variables

Go to Services > PaaS > [Your App] > Env Vars.

Click Add Variable, enter the key and value, and save. Your app will restart automatically.

System Variables

These are set automatically and cannot be modified:

VariableDescription
PORTThe port your app must listen on
DATABASE_URLPostgreSQL connection string (if database provisioned)

Best Practices

  • Never commit secrets to git — use env vars instead
  • Use descriptive key names: STRIPE_SECRET_KEY, not KEY1
  • Values are masked in the dashboard (only last 4 characters shown)
  • Admins can see full values in the admin panel

Bulk Import

You can set multiple variables at once via the API:

bash
curl -X POST https://your-domain.com/api/client/paas/{appId}/env \
  -H "Content-Type: application/json" \
  -d '{"vars": {"KEY1": "value1", "KEY2": "value2"}}'