# Dokploy

> Deploy Grovs as a Docker Compose service on Dokploy with Traefik routing for every link host.

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

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

## When to use

You already run Dokploy with Traefik. Grovs runs as a **Docker Compose** service, not a Docker Swarm stack. Its template routes the dashboard, API and dynamic project-link hosts.

## Prerequisites

| Requirement                       | Notes                                                                          |
| --------------------------------- | ------------------------------------------------------------------------------ |
| Dokploy installation 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 the app, production links and test links domains. DNS-provider credentials belong to the proxy.

Dokploy's ordinary per-host HTTP challenge cannot issue wildcard certificates. Follow its [Traefik guide](https://docs.dokploy.com/docs/core/domains) and [certificate documentation](https://docs.dokploy.com/docs/core/certificates). You pass the resolver name to Grovs as `GROVS_CERT_RESOLVER`.

## 2. Create the app

In your project, create a **Compose** service:

| Setting               | Value                                                   |
| --------------------- | ------------------------------------------------------- |
| Source                | Git repository: `https://github.com/grovs-io/self-host` |
| Compose path          | `docker-compose.platform.yml`                           |
| Deployment type       | Docker Compose                                          |
| Automatic deployments | Disabled; upgrade deliberately                          |

- Keep the template's explicit network configuration. Disable automatic network isolation and rewriting for this manual routing setup.
- Leave **Domains** empty so Dokploy does not generate competing routers. The template follows Dokploy's [manual Compose routing model](https://docs.dokploy.com/docs/core/docker-compose/domains).

## 3. Configure environment

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 dokploy "$HOME/grovs-dokploy"
```

Setup writes `$HOME/grovs-dokploy/.env` for the latest completed release and prints the first admin login. Keep this file.

| 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). |

Paste the `.env` into **Environment**. Confirm the proxy settings match your installation:

```dotenv
GROVS_PROXY_NETWORK=dokploy-network
GROVS_HTTP_ENTRYPOINT=web
GROVS_HTTPS_ENTRYPOINT=websecure
GROVS_CERT_RESOLVER=letsencrypt
```

The resolver must use DNS-01. Keep `GROVS_ROUTER_PREFIX` unique per deployment.

## 4. Deploy and verify

1. Preview the Compose definition, then **Deploy**. The migration container should finish before the API starts.
2. Open `https://dashboard.example.com` with the generated admin login.
3. Check `https://api.example.com/up`.
4. Create and open a project link to verify wildcard routing and TLS.

## Upgrades

Select matching image versions, [back up](https://docs.grovs.io/docs/self-hosting/operate/backups) data, and rerun migrations before recreating the application services. See [Upgrades](https://docs.grovs.io/docs/self-hosting/operate/upgrades).

## Platform-specific gotchas

- Only `web` and `dashboard` join the proxy network. Databases stay on the stack's private network.
- Customer-owned custom domains need additional proxy routes and certificates.
- See [Troubleshooting](https://docs.grovs.io/docs/self-hosting/operate/troubleshooting#coolify-or-dokploy-reports-a-proxy-or-certificate-error).
