Documentation Index
Fetch the complete documentation index at: https://docs.ardor.cloud/llms.txt
Use this file to discover all available pages before exploring further.

Overview
Every application needs configuration — API endpoints, feature flags, database passwords, third-party API keys. Variables & Secrets let you manage all of this without hardcoding values in your code.Variables
Plain text configuration visible in the UI. Use for non-sensitive settings like endpoints, flags, and paths.
Secrets
Encrypted values hidden from view. Use for passwords, API keys, tokens, and anything sensitive.
Variables and Secrets are configured per service and injected as environment variables at runtime — both in dev containers and production deployments.
Why Use Variables & Secrets
Keep secrets out of code
Never commit passwords or API keys to your repository. Store them securely in Ardor.
Environment-specific config
Same code, different configs. Switch between dev/staging/prod without changing code.
Easy updates
Change a value once in the UI — no redeployment needed for dev containers.
Team-friendly
Share configuration without sharing actual secret values. Team members see masked data.
Variables vs Secrets
| Variables | Secrets | |
|---|---|---|
| Visibility | Visible in UI | Masked (••••••••) |
| Storage | Plain text | Encrypted |
| Use for | Endpoints, flags, paths | Passwords, API keys, tokens |
| Editable | View and edit freely | Edit without seeing current value |
System Variables
At runtime, Ardor may add system variables based on your service settings. These variables are managed by Ardor and cannot be edited or overridden from Variables & Secrets. Common system variables include:| Variable | Description |
|---|---|
ARDOR_SERVICE_ID | ID of the current service |
ARDOR_ENVIRONMENT_ID | ID of the current environment |
ARDOR_PRIVATE_HOST | Private hostname for reaching the service inside the environment |
System variables are injected automatically when they apply to the service. They may not all be present for every service configuration.
Adding Variables & Secrets
Variable References
A variable or secret value can include references to variables from the current service or another service. Type@ in the value field and select a variable from the list. Ardor inserts a reference token for you, including references to system variables such as ARDOR_PRIVATE_HOST.

DATABASE_URL can be assembled from database credentials and the database service private host:
References are resolved when Ardor injects environment variables at runtime, so the consuming service receives one final value.
Naming Conventions
Environment variable names should be:- UPPERCASE with underscores:
DATABASE_URL,API_KEY,DEBUG_MODE - Descriptive:
POSTGRES_PASSWORDnotPW - Prefixed for clarity:
REDIS_HOST,REDIS_PORT,REDIS_PASSWORD
Common Use Cases
- Database Connection
- Third-Party APIs
- Feature Flags
- Service URLs
Connect to PostgreSQL, MySQL, or other databases:
| Variable | Type | Example |
|---|---|---|
DATABASE_HOST | Variable | postgres-service.internal |
DATABASE_PORT | Variable | 5432 |
DATABASE_NAME | Variable | myapp |
DATABASE_USER | Variable | admin |
DATABASE_PASSWORD | Secret | •••••••• |
Reading Variables in Code
Variables and Secrets are injected as environment variables. Here’s how to read them:- Python
- Node.js
- Go
Frontend Services
For frontend services (React, Vue, Next.js, etc.), variables and secrets are composed into a
.env file at build time. Use them in your Dockerfile:- Vite:
VITE_ - Create React App:
REACT_APP_ - Next.js:
NEXT_PUBLIC_
When Changes Apply
| In | Variables | Secrets |
|---|---|---|
| Dev Container | Restart container | Restart container |
| Deployment | Redeploy service | Redeploy service |
Dev containers restart automatically when you save variable changes. For deployed service, you need to trigger a new deployment.
Security
How Secrets Are Protected
- Encrypted at rest — Secrets are stored encrypted
- Masked by default — Shown as
••••••••, but you can reveal them by clicking the eye icon
Best Practices
Use secrets for anything sensitive
Use secrets for anything sensitive
API keys, passwords, tokens, private keys — if it grants access to something, it’s a secret.
Don't log secrets
Don't log secrets
Be careful with debug logging. Never print environment variables that might contain secrets.
Rotate regularly
Rotate regularly
Change passwords and API keys periodically. Update the secret in Ardor, redeploy, done.
Use descriptive names
Use descriptive names
STRIPE_SECRET_KEY is better than KEY1. Future you will thank present you.Minimum access principle
Minimum access principle
Only add secrets that a service actually needs. Don’t share database passwords with services that don’t use the database.
Troubleshooting
Variable not available in my code
Variable not available in my code
Cause: Container hasn’t restarted after adding the variable.Solution: Restart the dev container or redeploy the service.
Variable has wrong value
Variable has wrong value
Cause: Typo in variable name or old cached value.Solution:
- Check the exact variable name (case-sensitive!)
- Restart container to pick up latest values
Secret visible in logs
Secret visible in logs
Cause: Your code is logging environment variables.Solution: Review your logging code. Never log
os.environ or similar dumps.Frontend can't access variable
Frontend can't access variable
Cause: Missing framework prefix or variable added after build.Solution:
- Add required prefix (
VITE_,REACT_APP_, etc.) - Rebuild and redeploy the frontend
What’s Next
Service Configuration
Learn about all service settings including resources and networking
Development Container
Use the dev container to test your variables in real-time
Connecting Services
Connect multiple services and share configuration
Build with Cerebrum
Let Cerebrum set up variables and secrets for you automatically

