Environment Variables
Configure service variables and secrets for stable and preview deployments
Environment variables let you pass configuration, secrets, and credentials to your running services.
Manual Variables
Set your own key/value pairs — API keys, feature flags, configuration values.
- Open your service page
- Go to Configuration → Environment Variables
- Add key/value pairs
- Click Save
Saving triggers an automatic redeployment with the new configuration. Edit values inline or delete pairs and save to remove them.
Linked Variables
Link environment variables from other services in your project — databases, S3 storage, or other application services. Linked variables are resolved securely at deploy time.
- In the environment variables section, select a source service from the dropdown
- Choose which variable to link (e.g.,
HOST,PASSWORD,URL) - Rock8Cloud injects the value automatically when your service deploys
Credentials like database passwords and S3 secret keys are stored as secrets and never exposed as plain text — they're injected directly into your running container at deploy time.
When you link a variable that depends on other variables (e.g., URL depends on HOST, PORT, USER, PASSWORD, NAME), the dependencies are automatically included.
Preview Environments
Preview deployments use the same environment variables as your stable deployment. If you need isolation, create a separate project with its own database and credentials.
Troubleshooting
| Problem | Solution |
|---|---|
| Variable seems missing | Check the key spelling and confirm the latest deployment succeeded |
| Unexpected runtime behavior | Check deployment logs — the service may have failed to start with the new config |
| Changes not taking effect | Verify the deployment completed after saving |