Use a secret manager

Secret managers work with applications, Docker Compose services, and standalone databases. Application support includes Git and non-Git deployment methods.

  1. Add a supported provider under Keys & Tokens > Integration Tokens.

  2. Open the resource and select Environment Variables.

  3. Under Secret manager, choose an Integration token. For a Doppler service account, enter Project (required) and Config (required); a service token fixes these values. For Infisical, enter Project ID, Environment slug, and Secret path. For Vault, enter KV v2 mount and Secret path. Source fields save when you leave the field.

  4. Select Browse keys, then Add as variable beside a key or Import all keys. To refresh the list, select Reload keys. You can also add a variable manually with this value:

    API_KEY={{vault.API_KEY}}
  5. Deploy or restart the resource.

Always use {{vault.KEY}}, regardless of whether the provider is Doppler, Infisical, or HashiCorp Vault.

Coolify fetches values during deployment or startup. Values are held in memory and passed to the resource; Coolify does not save the fetched values in its database. A missing source or key stops the operation with a deployment error. Resolved secrets are redacted from deployment logs, including command failures.

Refresh a changed secret

Redeploy or restart the resource after changing a provider value. For application build variables, use a deployment rather than restart. Coolify skips build reuse when build-time secret references may have changed, so a deployment resolves current values rather than relying on a previously built image.

One source per resource

Each resource can link one secret-manager source. A Service-level source applies to the whole Compose stack.

Use the API or MCP

You can also link a secret manager through the API and the MCP server tool manage_secret_manager. The routes start with the resource type, applications, services or databases:

ActionRequest
View the source and the tokens you can linkGET /api/v1/{type}/{uuid}/secret-manager
Link a token or change its settingsPATCH /api/v1/{type}/{uuid}/secret-manager
Remove the sourceDELETE /api/v1/{type}/{uuid}/secret-manager
List the key namesGET /api/v1/{type}/{uuid}/secret-manager/keys
Add a {{vault.KEY}} variable for one keyPOST /api/v1/{type}/{uuid}/secret-manager/references
Add a variable for every key that has none yetPOST /api/v1/{type}/{uuid}/secret-manager/import

The API and MCP return key names only, never secret values. After you remove a source, existing {{vault.*}} variables fail the next deployment until you remove them.

If you have not created credentials yet, follow Secret manager credentials.

On this page