⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
---
title: Use drim with an existing deployment
description: Manage an existing Compose stack without replacing its database or regenerating its secrets.
---
The drim CLI runs Docker Compose commands in your deployment directory. You can use it with an existing stack; you do not need to run `drim setup` again.
## Adopt your existing Compose file
1. Install [drim](/core/installation/drim) and back up your [database, files, and configuration](/core/operations/backups).
2. Stay in the current deployment directory. Moving directories can change the Compose project name and cause Docker to create new volumes.
3. Ensure the main Compose file is named `docker-compose.yml`. drim 0.1.15 checks for that filename. If yours is `compose.yml`, rename it in the same directory and update any scripts that refer to it. Avoid keeping two competing default Compose files.
4. Keep the existing `.env`, `AUTH_SECRET`, database credentials, volumes, networks, and reverse proxy configuration.
5. Validate the configuration with `docker compose config --quiet`.
If your normal deployment uses `COMPOSE_FILE`, `COMPOSE_PROJECT_NAME`, profiles, or extra environment files, keep the same Compose context when running drim. For complex setups, direct Docker Compose commands may be clearer.
Run these commands from that directory when needed:
```bash
drim start # docker compose up -d
drim stop # docker compose stop
drim restart # restart existing containers
drim configure # edit .env and offer to apply changes
```
Use `drim restart --recreate` after an environment change. A plain restart retains the container’s old environment. `drim upgrade` pulls the images selected in your Compose file and applies them; it does not rewrite the file or change a pinned version for you.
## Replace an older two-container layout
If your Compose file still contains separate `usekaneo/api` and `usekaneo/web` images, follow [Move to the bundled container](/core/installation/migration). `drim upgrade` alone does not combine those services.
For a Caddy service on the same Docker network, the application upstream becomes:
```caddyfile
kaneo.example.com {
reverse_proxy kaneo:5173
encode gzip
}
```
Keep Caddy’s existing certificate volumes. If you replaced a bind-mounted Caddyfile, recreate the proxy container so it sees the current file:
```bash
docker compose up -d --force-recreate caddy
```
Use your actual proxy service name. A host-based proxy uses the published application port instead of Docker’s `kaneo` hostname.
## Check the result
Check `docker compose ps` and request `/api/health` through your public URL. Sign in, open existing tasks, and check an existing attachment. Confirm that the database is the original one before inviting anyone to use the instance.
| Problem | What to check |
| --- | --- |
| drim cannot find a deployment | Run it beside `docker-compose.yml`. |
| Kaneo looks like a new installation | Check the Compose project name, mounted database volume, and database URL. Stop the application before creating new data. |
| Database login fails | Use the original database credentials. Changing `.env` does not reset an existing PostgreSQL password. |
| Everyone was signed out | Check whether `AUTH_SECRET` changed. |
| Proxy cannot reach Kaneo | Check the service name, shared network, and port 5173. |
Keep the backup and original configuration until the deployment is verified. If a newer image migrated the database, [recovery](/core/operations/backups) requires its matching backup, not just an older Compose file.