Dagu is a self-contained, lightweight workflow engine for small teams. Define workflows in simple YAML, execute them anywhere with a single binary, compose complex pipelines from reusable sub-workflows, and distribute tasks across workers. All without requiring databases, message brokers, or code changes to your existing scripts.
Built for developers who want powerful workflow orchestration without the operational overhead. For a quick feel of how it works, take a look at the examples.
- Zero-Ops: Single binary, file-based storage, under 128MB, air-gapped ready
- Full-Power: Docker steps, SSH execution, DAG composition, distributed mode, Git-based version management for DAGs & docs, 19+ executors
- AI-Native: Built-in LLM agent creates, edits, and debugs workflows from natural language
- Legacy Script Friendly: Orchestrate existing shell commands, Python scripts, Docker containers, or HTTP calls without modification.
- Air-gapped Ready: Runs in isolated environments without external dependencies or network access
Try it live: Live Demo (credentials: demouser / demouser)
Traditional Orchestrator Dagu
┌────────────────────────┐ ┌──────────────────┐
│ Web Server │ │ │
│ Scheduler │ │ dagu server │
│ Worker(s) │ │ │
│ PostgreSQL │ └──────────────────┘
│ Redis / RabbitMQ │ Single binary.
│ Python runtime │ Zero dependencies.
└────────────────────────┘ Just run it.
6+ services to manage
One binary. No Postgres. No Redis. No Python. Just dagu server.
macOS/Linux:
curl -L https://raw.githubusercontent.com/dagu-org/dagu/main/scripts/installer.sh | bashHomebrew:
brew install daguWindows (PowerShell):
irm https://raw.githubusercontent.com/dagu-org/dagu/main/scripts/installer.ps1 | iexDocker:
docker run --rm -v ~/.dagu:/var/lib/dagu -p 8080:8080 ghcr.io/dagu-org/dagu:latest dagu start-allMore options (npm, custom paths, specific versions): Installation docs
When you first start Dagu with an empty DAGs directory, it automatically creates example workflows. Set
DAGU_SKIP_EXAMPLES=trueto skip this.
cat > ./hello.yaml << 'EOF'
steps:
- echo "Hello from Dagu!"
- echo "Running step 2"
EOFdagu start hello.yamldagu status hellodagu start-allVisit http://localhost:8080
Docker Compose: Clone the repo and run docker compose -f deploy/docker/compose.minimal.yaml up -d. See deployment docs for production setups.
Steps execute one after another:
type: chain
steps:
- command: echo "Hello, dagu!"
- command: echo "This is a second step"%%{init: {'theme': 'base', 'themeVariables': {'background': '#18181B', 'primaryTextColor': '#fff', 'lineColor': '#888'}}}%%
graph LR
A["Step 1"] --> B["Step 2"]
style A fill:#18181B,stroke:#22C55E,stroke-width:1.6px,color:#fff
style B fill:#18181B,stroke:#22C55E,stroke-width:1.6px,color:#fff
Steps with dependencies run in parallel:
type: graph
steps:
- id: step_1
command: echo "Step 1"
- id: step_2a
command: echo "Step 2a - runs in parallel"
depends: [step_1]
- id: step_2b
command: echo "Step 2b - runs in parallel"
depends: [step_1]
- id: step_3
command: echo "Step 3 - waits for parallel steps"
depends: [step_2a, step_2b]%%{init: {'theme': 'base', 'themeVariables': {'background': '#18181B', 'primaryTextColor': '#fff', 'lineColor': '#888'}}}%%
graph LR
A[step_1] --> B[step_2a]
A --> C[step_2b]
B --> D[step_3]
C --> D
style A fill:#18181B,stroke:#22C55E,stroke-width:1.6px,color:#fff
style B fill:#18181B,stroke:#22C55E,stroke-width:1.6px,color:#fff
style C fill:#18181B,stroke:#22C55E,stroke-width:1.6px,color:#fff
style D fill:#18181B,stroke:#3B82F6,stroke-width:1.6px,color:#fff
Run containers as workflow steps:
steps:
- name: build-app
container:
image: node:20-alpine
command: npm run buildRun commands on remote machines:
steps:
- name: deploy
type: ssh
config:
host: prod-server.example.com
user: deploy
key: ~/.ssh/id_rsa
command: cd /var/www && git pull && npm run buildInvoke other DAGs as steps for hierarchical workflows:
steps:
- name: extract
call: etl/extract
params: "SOURCE=s3://bucket/data.csv"
- name: transform
call: etl/transform
params: "INPUT=${extract.outputs.result}"
depends: [extract]
- name: load
call: etl/load
params: "DATA=${transform.outputs.result}"
depends: [transform]For more examples, see the Examples documentation.
- Single binary installation, under 128MB memory
- File-based storage — no PostgreSQL, no Redis, no message brokers
- Air-gapped / offline capable
- Cron scheduling with timezone support and zombie detection
- High availability with scheduler failover
- Docker executor — run containers as workflow steps
- SSH executor — execute commands on remote machines
- Git sync — version management for DAG definitions and documents
- Hierarchical DAG composition — nest workflows inside workflows
- Distributed execution — coordinator/worker mode across machines
- 19+ built-in executors — HTTP, SQL, Redis, S3, jq, mail, archive, and more
- RBAC with 5 roles, OIDC, API keys, and audit logging
- Human-in-the-loop approval gates
- Built-in AI agent — creates, edits, runs, and debugs workflows from natural language
- Agent and chat step types in DAGs with tool calling
- Multi-provider LLM support (Anthropic, OpenAI, Google Gemini, OpenRouter)
- Persistent memory, sub-agent delegation, and domain-specific skills
- Built-in document management with AI agent integration
See the full feature list for all capabilities.
Note: Configuration precedence: Command-line flags > Environment variables > Configuration file
| Environment Variable | Default | Description |
|---|---|---|
DAGU_HOST |
127.0.0.1 |
Web UI server host |
DAGU_PORT |
8080 |
Web UI server port |
DAGU_BASE_PATH |
- | Base path for reverse proxy setup |
DAGU_API_BASE_URL |
/api/v1 |
API endpoint base path |
DAGU_TZ |
- | Server timezone (e.g., Asia/Tokyo) |
DAGU_DEBUG |
false |
Enable debug mode |
DAGU_LOG_FORMAT |
text |
Log format (text or json) |
DAGU_HEADLESS |
false |
Run without Web UI |
DAGU_LATEST_STATUS_TODAY |
false |
Show only today's latest status |
DAGU_DEFAULT_SHELL |
- | Default shell for command execution |
DAGU_CERT_FILE |
- | TLS certificate file path |
DAGU_KEY_FILE |
- | TLS key file path |
| Environment Variable | Default | Description |
|---|---|---|
DAGU_HOME |
- | Base directory that overrides all path configurations |
DAGU_DAGS_DIR |
~/.config/dagu/dags |
Directory for DAG definitions |
DAGU_ALT_DAGS_DIR |
- | Additional directory to search for DAG definitions |
DAGU_LOG_DIR |
~/.local/share/dagu/logs |
Directory for log files |
DAGU_DATA_DIR |
~/.local/share/dagu/data |
Directory for application data |
DAGU_SUSPEND_FLAGS_DIR |
~/.local/share/dagu/suspend |
Directory for suspend flags |
DAGU_ADMIN_LOG_DIR |
~/.local/share/dagu/logs/admin |
Directory for admin logs |
DAGU_BASE_CONFIG |
~/.config/dagu/base.yaml |
Path to base configuration file |
DAGU_EXECUTABLE |
- | Path to dagu executable |
DAGU_DAG_RUNS_DIR |
{dataDir}/dag-runs |
Directory for DAG run data |
DAGU_PROC_DIR |
{dataDir}/proc |
Directory for process data |
DAGU_QUEUE_DIR |
{dataDir}/queue |
Directory for queue data |
DAGU_SERVICE_REGISTRY_DIR |
{dataDir}/service-registry |
Directory for service registry |
| Environment Variable | Default | Description |
|---|---|---|
DAGU_AUTH_MODE |
builtin |
Authentication mode: none, basic, or builtin |
DAGU_AUTH_BASIC_USERNAME |
- | Basic auth username |
DAGU_AUTH_BASIC_PASSWORD |
- | Basic auth password |
DAGU_AUTH_OIDC_CLIENT_ID |
- | OIDC client ID |
DAGU_AUTH_OIDC_CLIENT_SECRET |
- | OIDC client secret |
DAGU_AUTH_OIDC_CLIENT_URL |
- | OIDC client URL |
DAGU_AUTH_OIDC_ISSUER |
- | OIDC issuer URL |
DAGU_AUTH_OIDC_SCOPES |
- | OIDC scopes (comma-separated) |
DAGU_AUTH_OIDC_WHITELIST |
- | OIDC email whitelist (comma-separated) |
DAGU_AUTH_OIDC_AUTO_SIGNUP |
false |
Auto-create users on first OIDC login |
DAGU_AUTH_OIDC_DEFAULT_ROLE |
viewer |
Role for auto-created users |
DAGU_AUTH_OIDC_ALLOWED_DOMAINS |
- | Allowed email domains (comma-separated) |
DAGU_AUTH_OIDC_BUTTON_LABEL |
Login with SSO |
SSO login button text |
When DAGU_AUTH_MODE=builtin, a file-based user management system with role-based access control is enabled. Roles: admin, manager, developer, operator, viewer. On first startup, visit the web UI to create your admin account via the setup page.
| Environment Variable | Default | Description |
|---|---|---|
DAGU_AUTH_TOKEN_SECRET |
(auto-generated) | JWT token secret for signing (auto-generated if not set) |
DAGU_AUTH_TOKEN_TTL |
24h |
JWT token time-to-live |
DAGU_USERS_DIR |
{dataDir}/users |
Directory for user data files |
| Environment Variable | Default | Description |
|---|---|---|
DAGU_UI_NAVBAR_COLOR |
#1976d2 |
UI header color (hex or name) |
DAGU_UI_NAVBAR_TITLE |
Dagu |
UI header title |
DAGU_UI_LOG_ENCODING_CHARSET |
utf-8 |
Log file encoding |
DAGU_UI_MAX_DASHBOARD_PAGE_LIMIT |
100 |
Maximum items on dashboard |
DAGU_UI_DAGS_SORT_FIELD |
name |
Default DAGs sort field |
DAGU_UI_DAGS_SORT_ORDER |
asc |
Default DAGs sort order |
| Environment Variable | Default | Description |
|---|---|---|
DAGU_TERMINAL_ENABLED |
false |
Enable web-based terminal |
DAGU_AUDIT_ENABLED |
true |
Enable audit logging for security events |
Synchronize DAG definitions with a Git repository. See Git Sync for details.
| Environment Variable | Default | Description |
|---|---|---|
DAGU_GITSYNC_ENABLED |
false |
Enable Git sync |
DAGU_GITSYNC_REPOSITORY |
- | Repository URL (e.g., github.com/org/repo) |
DAGU_GITSYNC_BRANCH |
main |
Branch to sync |
DAGU_GITSYNC_PATH |
"" |
Subdirectory in repo for DAGs |
DAGU_GITSYNC_PUSH_ENABLED |
true |
Enable push/publish operations |
DAGU_GITSYNC_AUTH_TYPE |
token |
Auth type: token or ssh |
DAGU_GITSYNC_AUTH_TOKEN |
- | GitHub PAT for HTTPS auth |
DAGU_GITSYNC_AUTH_SSH_KEY_PATH |
- | SSH private key path |
DAGU_GITSYNC_AUTOSYNC_ENABLED |
false |
Enable automatic periodic pull |
DAGU_GITSYNC_AUTOSYNC_INTERVAL |
300 |
Auto-sync interval in seconds |
| Environment Variable | Default | Description |
|---|---|---|
DAGU_SCHEDULER_PORT |
8090 |
Health check server port |
DAGU_SCHEDULER_LOCK_STALE_THRESHOLD |
30s |
Scheduler lock stale threshold |
DAGU_SCHEDULER_LOCK_RETRY_INTERVAL |
5s |
Lock retry interval |
DAGU_SCHEDULER_ZOMBIE_DETECTION_INTERVAL |
45s |
Zombie DAG detection interval (0 to disable) |
DAGU_QUEUE_ENABLED |
true |
Enable queue system |
This configuration is used for worker instances that execute DAGs. See the Distributed Execution documentation for more details.
| Environment Variable | Default | Description |
|---|---|---|
DAGU_COORDINATOR_ENABLED |
true |
Enable coordinator service |
DAGU_COORDINATOR_HOST |
127.0.0.1 |
Coordinator gRPC server bind address |
DAGU_COORDINATOR_ADVERTISE |
(auto) | Address to advertise in service registry (default: hostname) |
DAGU_COORDINATOR_PORT |
50055 |
Coordinator gRPC server port |
DAGU_WORKER_ID |
- | Worker instance ID |
DAGU_WORKER_MAX_ACTIVE_RUNS |
100 |
Maximum concurrent runs per worker |
DAGU_WORKER_LABELS |
- | Worker labels (format: key1=value1,key2=value2, e.g., gpu=true,memory=64G) |
DAGU_SCHEDULER_PORT |
8090 |
Scheduler health check server port |
DAGU_SCHEDULER_LOCK_STALE_THRESHOLD |
30s |
Time after which scheduler lock is considered stale |
DAGU_SCHEDULER_LOCK_RETRY_INTERVAL |
5s |
Interval between lock acquisition attempts |
This configuration is used for communication between coordinator services and other services (e.g., scheduler, worker, web UI). See the Distributed Execution documentation for more details.
| Environment Variable | Default | Description |
|---|---|---|
DAGU_PEER_CERT_FILE |
- | Peer TLS certificate file |
DAGU_PEER_KEY_FILE |
- | Peer TLS key file |
DAGU_PEER_CLIENT_CA_FILE |
- | Peer CA certificate file for client verification |
DAGU_PEER_SKIP_TLS_VERIFY |
false |
Skip TLS certificate verification for peer connections |
DAGU_PEER_INSECURE |
true |
Use insecure connection (h2c) instead of TLS |
Full documentation at docs.dagu.sh.
- Getting Started — Installation and first workflow
- Examples — Feature walkthroughs with YAML samples
- AI Agent — Built-in AI assistant for workflow management
- Distributed Execution — Coordinator/worker setup
- Configuration — Environment variables and settings
- Changelog — Recent updates and releases
- Chat with us on Discord
- File bugs and feature requests on GitHub Issues
- Follow us on Bluesky
Prerequisites: Go 1.26+, Node.js, pnpm
git clone https://github.com/dagu-org/dagu.git && cd dagu
make buildSee CONTRIBUTING.md for development workflow, testing, and code standards.
We welcome contributions of all kinds. See our Contribution Guide for details.
GNU GPLv3 - See LICENSE

