Create Service Environment Variable
coolify_create_service_envAdd environment variables to Coolify docker-compose services with options for buildtime, runtime, preview, and instance targeting.
Instructions
Add a new environment variable to a Coolify service (Flavor C / docker-compose apps). Use this for multi-container compose services — NOT for single-container applications.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Variable name (e.g. DATABASE_URL) | |
| uuid | Yes | Service UUID | |
| value | Yes | Variable value | |
| reveal | No | Reveal redacted secret values in the response (default false; the call is audited) | |
| instance | Yes | REQUIRED — which Coolify instance to mutate: 'prod' (Hetzner VPS) or 'dev' (local OrbStack VM). No default: state the target explicitly so a write never lands on prod by accident. | |
| is_preview | No | Only for preview deployments (default: false) | |
| is_runtime | No | Available at runtime (default: true) | |
| is_buildtime | No | Available during build phase (default: false) |