Client Area

Environment Variables

2 min readPublished 6 Apr 2026Updated 26 Apr 202649 views

In this article

  • 1Setting Variables
  • 2System Variables (Auto-Set)
  • 3Best Practices
  • 4Common Variables
  • 5Changing Variables

Environment Variables

Configure your app securely with environment variables. All values are encrypted at rest and injected at runtime.

Setting Variables

  1. Go to Services > PaaS > Your App > Env Vars
  2. Click Add Variable
  3. Enter the key (e.g., STRIPE_SECRET_KEY) and value
  4. Click Save — your app restarts automatically with the new value

System Variables (Auto-Set)

These are automatically configured — you cannot modify them:

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

Important: Your app must listen on process.env.PORT (Node.js), os.environ['PORT'] (Python), or equivalent. Do not hardcode a port number.

Best Practices

  • Never commit secrets to git — use env vars instead
  • Use descriptive names: STRIPE_SECRET_KEY not KEY1
  • Group by service: REDIS_URL, REDIS_PASSWORD
  • Values are masked in the dashboard (only last 4 characters shown for security)

Common Variables

VariableExample ValueUsed For
NODE_ENVproductionNode.js environment
DATABASE_URLpostgresql://...PostgreSQL connection
REDIS_URLredis://...Redis connection
JWT_SECRETyour-secret-keyJWT token signing
SMTP_HOSTsmtp.gmail.comEmail sending
AWS_ACCESS_KEY_IDAKIA...AWS services

Changing Variables

When you update or add a variable, your app automatically restarts to pick up the new values. This typically takes 5-10 seconds.

Bulk Import (API)

Set multiple variables at once:

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

Was this article helpful?

Your feedback helps us improve our documentation

Still need help? Submit a support ticket