Back to DocumentationApp Deployment

Environment Variables

Manage secrets and configuration with environment variables.

April 12, 20264 views

Environment Variables

Adding Variables

  • Go to your deployment settings
  • Click Environment Variables
  • Add key-value pairs
  • Save - a new deployment is triggered automatically
  • Best Practices

  • Never commit secrets - Use environment variables for API keys, database URLs, and passwords
  • Use descriptive names - DATABASE_URL, STRIPE_SECRET_KEY, API_BASE_URL
  • Separate environments - Use different values for staging and production
  • Common Variables

    VariablePurpose
    DATABASE_URLDatabase connection string
    NODE_ENVApplication environment (production)
    PORTApplication listening port
    API_KEYThird-party API credentials

    Security

    Environment variables are encrypted at rest and only exposed to your application during runtime. They are never visible in build logs.

    environmentvariablessecretsconfig