# Coolify

> Deploy Grovs as a Raw Compose application on a Coolify server that uses the Traefik proxy.

Source: https://docs.grovs.io/docs/self-hosting/platforms/coolify

[Set up Coolify](https://docs.grovs.io/docs/self-hosting/platforms/coolify)

## When to use

You already run Coolify with a **Traefik** proxy. This guide uses the repository's Compose template in **Raw Compose Deployment** mode, because Grovs needs explicit routing for its dynamic project-link hostnames. It does not apply to a Coolify server that uses the Caddy proxy.

## Prerequisites

| Requirement                 | Notes                                                                          |
| --------------------------- | ------------------------------------------------------------------------------ |
| Coolify server with Traefik | Meets the [requirements](https://docs.grovs.io/docs/self-hosting#requirements) |
| A domain you control        | With a DNS provider token for DNS-01 validation                                |
| A workstation with Git      | To generate the environment file                                               |

## 1. Prepare DNS and proxy

1. Point the [Grovs DNS records](https://docs.grovs.io/docs/self-hosting/get-started/deployment#dns) at the server.
2. Configure a Traefik certificate resolver with **DNS-01 validation** for your app, production links and test links domains. Keep the DNS-provider token in the proxy's configuration, not in the Grovs environment.

Follow Coolify's [DNS challenge](https://coolify.io/docs/core/networking/proxy/traefik/dns-challenge) and [wildcard certificate](https://coolify.io/docs/core/networking/proxy/traefik/wildcard-certs) guides. A wildcard DNS record alone does not give you a wildcard certificate.

## 2. Create the app

In Coolify, select **New → Public Repository** with `https://github.com/grovs-io/self-host`:

| Setting                 | Value                          |
| ----------------------- | ------------------------------ |
| Build Pack              | Docker Compose                 |
| Base Directory          | `/`                            |
| Docker Compose Location | `/docker-compose.platform.yml` |
| Raw Compose Deployment  | Enabled                        |
| Automatic deployments   | Disabled; upgrade deliberately |

Leave the per-service **Domains** fields empty. The template supplies its own Traefik labels. It does not start the standalone Caddy proxy or publish database ports.

## 3. Configure environment

On your workstation, generate the environment file:

```bash
git clone https://github.com/grovs-io/self-host.git
cd self-host
GROVS_RELEASE_URL="$(curl -fsSL -o /dev/null -w '%{url_effective}' https://github.com/grovs-io/self-host/releases/latest)"
GROVS_VERSION="${GROVS_RELEASE_URL##*/}" \
  GROVS_DOMAIN=example.com GROVS_ADMIN_EMAIL=admin@example.com \
  ./scripts/prepare-platform.sh coolify "$HOME/grovs-coolify"
```

This writes `$HOME/grovs-coolify/.env` for the latest completed release, generates credentials and prints your admin login. It keeps existing files.

| Option                     | How                                                                                                                                                        |
| -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Another release            | Set `GROVS_VERSION`                                                                                                                                        |
| Separate short-link domain | Set `GROVS_LINKS_DOMAIN`                                                                                                                                   |
| Follow moving image tags   | Change the generated file to `GROVS_VERSION=latest` before importing. See [Images and releases](https://docs.grovs.io/docs/self-hosting/configure/images). |

Import the `.env` into the application's environment editor. Then confirm:

| Variable                                                     | Must match                                                 |
| ------------------------------------------------------------ | ---------------------------------------------------------- |
| `GROVS_PROXY_NETWORK=coolify`                                | The actual Traefik Docker network                          |
| `GROVS_HTTP_ENTRYPOINT=http`, `GROVS_HTTPS_ENTRYPOINT=https` | Your proxy's entrypoints                                   |
| `GROVS_CERT_RESOLVER=letsencrypt`                            | The resolver you configured for DNS-01                     |
| `GROVS_VERSION`                                              | The same numbered release or `latest` for both GHCR images |

Keep the generated `GROVS_ROUTER_PREFIX` unique per deployment.

## 4. Deploy and verify

1. Select **Deploy** and watch the service logs. The migration container exits with code 0, then the API, workers and dashboard start.
2. Open `https://dashboard.example.com` and log in.
3. Check `https://api.example.com/up`.
4. Create a project and open its link. A working dashboard alone does not prove the wildcard link route or certificate.

## Upgrades

Back up the platform environment and persistent volumes ([Backups](https://docs.grovs.io/docs/self-hosting/operate/backups)). Then follow [Upgrades](https://docs.grovs.io/docs/self-hosting/operate/upgrades) through Coolify's deployment controls, using the platform Compose file and imported environment.

## Platform-specific gotchas

- If your Coolify version counts one-shot services in aggregate health, exclude `migrate` from that health check.
- New customer-owned custom domains need their own proxy routes and certificates. The template covers only the configured Grovs domains.
- See [Troubleshooting](https://docs.grovs.io/docs/self-hosting/operate/troubleshooting#coolify-or-dokploy-reports-a-proxy-or-certificate-error) and Coolify's [Compose guide](https://coolify.io/docs/applications/builds/docker-compose).
