Skip to content

Environment Variables

You can attach environment variables to any endpoint. These are injected into the command’s environment at runtime, alongside any managed secrets.

Open Dashboard → Endpoints, click an endpoint, and scroll to the Environment section. Add key-value pairs. Keys must be UPPER_SNAKE_CASE.

endpoints:
- name: deploy
method: POST
command: ./deploy.sh
env:
DEPLOY_ENV: production
REGION: us-east-1

When a command runs, environment variables are merged in this order (later values win):

  1. System environment — the agent process’s own environment
  2. Managed secrets — injected from the dashboard when the agent connects
  3. Endpoint env — the key-value pairs you defined on the endpoint
  4. Pipeline env — if the endpoint is running as a pipeline step, those vars override all others

You can reference managed secrets using the $wrapd: prefix. See Managed Secrets for details.