# Self-host Dagu

> A workflow engine that runs DAGs defined in plain YAML files, with a web UI.

- Page: https://levelrail.com/templates/dagu/
- JSON: https://levelrail.com/templates/dagu.json
- Category: Automation
- Licence: GPL-3.0 (Copyleft license)
- Source: https://github.com/dagucloud/dagu
- Upstream docs: https://docs.dagu.sh/

## Requirements
- Memory: about 256 MiB
- amd64: unknown, arm64: unknown
- Needs configuration before start: no
- Pinned image tag: 2.25.4

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| dagu | ghcr.io/dagucloud/dagu | 2.25.4 | 8080 | dagu_data -> /var/lib/dagu |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| dagu | DAGU_AUTH_BASIC_PASSWORD | generated |
| dagu | DAGU_AUTH_BASIC_USERNAME | preset |
| dagu | DAGU_AUTH_MODE | preset |
| dagu | DAGU_HOST | preset |
| dagu | DAGU_PORT | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy dagu --name my-dagu
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/dagu/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Dagu on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id dagu for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image ghcr.io/dagucloud/dagu:2.25.4 is what you deploy there.

Self-host Dagu, Dagu docker compose file, deploy Dagu on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
