Introduction
Dagu is a lightweight, local-first workflow engine that uses directed acyclic graphs (DAGs) defined in YAML to orchestrate tasks. It provides a built-in web UI for managing, monitoring, and debugging workflows without requiring an external database or message broker — making it ideal for small teams and individual developers who need cron-like automation with visibility.
What Dagu Does
- Executes multi-step workflows defined as DAGs in declarative YAML files
- Provides a web-based dashboard for scheduling, monitoring, and manual triggering
- Handles step dependencies, retries, conditional execution, and parallel steps
- Sends notifications on success or failure via email, Slack, or webhook
- Logs execution history with stdout/stderr capture for each step
Architecture Overview
Dagu is a single Go binary with no external dependencies. It reads DAG definitions from a local directory, schedules them based on cron expressions, and executes steps as subprocesses. Execution state and history are stored as local JSON files, eliminating the need for a database. The embedded web server provides the management UI using server-rendered HTML.
Self-Hosting & Configuration
- Single binary deployment with no database, Redis, or message queue required
- DAG definitions are YAML files stored in a configurable directory
- Schedule workflows using standard cron expressions within the YAML
- Configure global settings via a single config file or environment variables
- Runs on Linux, macOS, and in Docker containers
Key Features
- Zero-dependency single binary with embedded web UI
- YAML-based DAG definitions with step dependencies and parallelism
- Built-in scheduler with cron expression support
- Execution history with log viewing and manual retry from the UI
- Parameterized workflows with environment variable passing between steps
Comparison with Similar Tools
- Apache Airflow — Python-based with heavy infrastructure needs; Dagu is a single binary
- Cron — no dependency graph or UI; Dagu adds DAG execution and a dashboard
- Temporal — distributed workflow platform; Dagu targets local-first simplicity
- n8n — visual node-based automation; Dagu uses code-first YAML definitions
FAQ
Q: Does Dagu require a database? A: No. Dagu stores all state as local files. No PostgreSQL, MySQL, or Redis needed.
Q: Can Dagu run Docker containers as steps? A: Yes. Steps can execute any command, including docker run, making it easy to run containerized tasks.
Q: How does it handle failures? A: You can configure per-step retry policies, and the UI lets you manually retry failed steps or restart entire DAGs from a specific point.
Q: Is there an API for programmatic access? A: Yes. Dagu exposes a REST API for triggering, stopping, and querying workflow status.