Adding variables
1
Open repository settings
Go to Settings → Repositories and select your repository.
2
Add variables
In the Environment Variables section, click Add Variable. Enter a name and value.
3
Save
Click Save. The variable is encrypted and stored securely.
Uploading .env files
To add multiple variables at once, upload a.env file:
- In repository settings, click Upload .env
- Select your
.envfile - Review the parsed variables
- Click Import
Required variables
If your repository needs specific variables to run, mark them as required:- Add the variable name without a value
- Check Required
Variable scope
| Scope | Description |
|---|---|
| Repository | Available to all tasks for that repository |
| Organization | Shared across all repositories in the organization (coming soon) |
Security
- Variables are encrypted at rest
- Values are only decrypted when injected into a sandbox
- Variables never appear in logs or task output
- You can delete variables at any time
Common variables
| Variable | Purpose |
|---|---|
DATABASE_URL | Database connection string |
API_KEY | Third-party API credentials |
NODE_ENV | Node.js environment (usually development) |
NEXT_PUBLIC_* | Next.js public environment variables |