Deploy keys

A deploy key grants one SSH key access to one private repository. Use it when you cannot install a Git App or when repository-specific access is preferred.

Create a deploy key

Generate a key in Coolify

Open Keys & Tokens > Private Keys, select + Add, and generate an ED25519 or RSA key.

Give the key a name that identifies the repository. Copy the public key and save the private key in Coolify.

Add the public key to the repository

Open the repository's deploy-key or access-key settings and add the copied public key.

Keep write access disabled. Coolify only needs to clone and fetch the repository.

Copy the SSH repository URL

Use the provider's SSH clone URL:

[email protected]:coollabsio/coolify-examples.git

Do not use the HTTPS URL for Private Repository (with deploy key).

Create the application

Open a project, select + New, then Private Repository (with deploy key).

Choose the server, select the stored private key, paste the SSH URL, and configure the application.

Deploy and verify

Select Deploy. Confirm the repository clone and requested branch succeed in the deployment log.

Automatic deployments

The SSH key only provides repository access. Choose how the deployment starts.

Add a manual Git webhook, then enable Configuration > Advanced > Auto Deploy. The provider can then notify Coolify when the configured branch changes.

Use a GitHub App instead when you want GitHub repository selection and webhook configuration through one integration.

Key scope

Prefer a separate deploy key for each repository. If a key is exposed, remove it from the repository and Coolify, create a replacement, attach the new key under Configuration > Git Source, and redeploy.

On this page