Skip to main content
Environment variables inject secrets and configuration into task sandboxes. Add API keys, database URLs, and other values your repository needs to run.

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.
Variables are available in all tasks for that repository as standard environment variables.

Uploading .env files

To add multiple variables at once, upload a .env file:
  1. In repository settings, click Upload .env
  2. Select your .env file
  3. Review the parsed variables
  4. Click Import
Existing variables with the same name are overwritten.

Required variables

If your repository needs specific variables to run, mark them as required:
  1. Add the variable name without a value
  2. Check Required
When creating a task, Niteshift blocks task creation if required variables are missing. This prevents tasks from failing due to missing configuration.

Variable scope

ScopeDescription
RepositoryAvailable to all tasks for that repository
OrganizationShared 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
Don’t commit secrets to your repository. Use environment variables instead.

Common variables

VariablePurpose
DATABASE_URLDatabase connection string
API_KEYThird-party API credentials
NODE_ENVNode.js environment (usually development)
NEXT_PUBLIC_*Next.js public environment variables