Environment Variables
How to configure your hosted deployment with API keys and settings.
What are environment variables?
Environment variables are settings that an app needs to run — things like API keys for external services, secret tokens, or configuration options. They're called "environment" variables because they're part of the server's environment, not the app's code.
When you deploy an app on Kyper, some environment variables are set automatically (like database connections), and others need to be provided by you (like third-party API keys).
Auto-injected variables
Kyper automatically provides these variables to every deployment. You don't need to set them — they're handled for you:
| Variable | What it does |
|---|---|
| DATABASE_URL | Connection string for the database (if the app uses PostgreSQL or MySQL) |
| REDIS_URL | Connection string for Redis (if the app uses it) |
| AWS_ACCESS_KEY_ID | S3 access key for the app's object storage (if the app uses the s3 dep) |
| AWS_SECRET_ACCESS_KEY | S3 secret key for the app's object storage (if the app uses the s3 dep) |
| AWS_BUCKET | "app" — the default bucket name (if the app uses the s3 dep) |
| AWS_ENDPOINT_URL | Endpoint for the S3-compatible storage service (if the app uses the s3 dep) |
| SECRET_KEY_BASE | A secure random key for encrypting sessions and cookies |
| PORT | The port the app should listen on |
| ORIGIN | The public URL of the deployment (e.g. https://abc123.apps.kyper.shop) — useful for WebAuthn, OAuth callbacks, and CORS configuration |
Required variables
Some apps require you to provide additional variables before the deployment can start. These are typically private API keys that Kyper cannot manage for you, such as an OpenAI key or another account-specific secret. Email, Google Maps, and Mapbox are provided by Kyper-managed services — including the email sender address, so you don't need to supply or verify one.
Required variables are shown on the deployment Configure page with a checklist. The deploy button is disabled until all required variables are set.
DATABASE_URL (auto-injected)
OPENAI_API_KEY (required — not set)
STRIPE_SECRET_KEY (set)
Optional variables
You can add any additional environment variables you want on the Configure page. These are merged with the auto-injected variables and the required variables you've already set. Enter them as KEY=value pairs, one per line.
OPENAI_API_KEY=sk-abc123... STRIPE_SECRET_KEY=sk_live_... CUSTOM_SETTING=myvalue
Updating variables
You can update environment variables at any time from the deployment Configure page. For running deployments, changes are hot-reloaded — the new values are applied and the app restarts automatically. No manual redeployment needed.
Security
Your environment variables are:
- Encrypted at rest using AES-256-GCM encryption
- Only injected at deploy time — they're not stored in the app's source code or Docker image
- Not visible to the app developer — only you and Kyper's infrastructure can access them
- Destroyed with your deployment — when your subscription ends and the deployment is destroyed, all variables are permanently deleted