Dagu

Productivity and workflow

Self-hostable workflow orchestrator for teams whose main work isn't orchestration. Declarative YAML over your scripts, SSH commands, containers, etc; keep workflows separate from business logic. One binary, no database, runs on limited H/W resources. Alternative to Airflow / Cron / Job Scheduler.

Your AI app calls the Dagu MCP server, which does the productivity and workflow work and sends the result back to the chat.

About Dagu

Dagu is a community MCP server from dagucloud, filed in our directory under productivity and workflow. Self-hostable workflow orchestrator for teams whose main work isn't orchestration. Declarative YAML over your scripts, SSH commands, containers, etc; keep workflows separate from business logic. One binary, no database, runs on limited H/W resources. Alternative to Airflow / Cron / Job Scheduler.

Dagu runs on your own machine: your AI app starts it with the command docker run -i --rm and talks to it over standard input and output.

At a glance

Publisher
dagucloud (community)
Runs
Locally on your machine
Install from
Docker image: ghcr.io/dagucloud/dagu:latest
Written in
Go
License
GPL-3.0
GitHub stars
4,741

How to set up Dagu

  1. Have Docker running on the machine that runs your AI app, because Dagu starts as a container.
  2. Check the Dagu README for keys or settings; the registry lists none that Dagu requires.
  3. Add Dagu to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Dagu tools to confirm the connection.
  5. Run one read-only task with Dagu first, and keep your app asking before each tool call until the results look right.

Dagu compared with similar servers

  • Notion by makenotion has fewer GitHub stars than Dagu (4.7k against 4.7k); Notion is official while Dagu is a community server, and both run locally.
  • Basic Memory by basicmachines-co has more GitHub stars than Dagu (4.8k against 4.7k); both are community servers, and both run locally.
  • Obsidian by MarkusPfundstein has fewer GitHub stars than Dagu (4.6k against 4.7k); both are community servers, and both run locally.

Before you connect Dagu

  • Give Dagu its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Dagu tool call until you trust what it does with them.
  • Treat text that Dagu fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Dagu on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Dagu

How marketing and sales teams put Dagu to work, by company size. Pick the size closest to yours and start Dagu on one use case.

Small business

  • A busy owner can use Dagu to turn a brain dump into tasks with due dates, and get a short list of what matters today.
  • Small marketing teams can ask Dagu what slipped last week and which campaign tasks have no owner yet.
  • Dagu runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing ops can connect Dagu to build launch checklists from a template and post status updates without a weekly meeting.
  • Team leads can use Dagu to see where work piles up across projects and move it before deadlines slip.
  • Start Dagu on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise PMOs can use Dagu to roll up status across many teams into one view for leadership, with links back to each source task.
  • Large orgs can give Dagu scoped access per workspace, so an agent helps one department without reading another's plans.
  • Dagu is a community server, so have security review the code and pin a version before Dagu touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Dagu README

From dagucloud/dagu on GitHub, shared under its GPL-3.0 license. Images are left out; the original has them.

README.md

Docs (docs.dagu.sh) · CLI · API · Examples · Live demo (username/password: demouser) · Discord

Dagu

Dagu is a local-first workflow engine for operations and internal automation. It is open source and self-hostable: a single binary with a built-in Web UI, no external database or message broker, running on Linux, macOS, and Windows. Define DAGs in a declarative YAML format. It natively supports shell commands, Docker containers, Kubernetes Jobs, remote commands via SSH, and more through Dagu Actions.

Dagu turns existing scripts and runbooks into production workflows with scheduling, retries, human tasks, and run history. It runs where your data and credentials live: on-prem, air-gapped, edge, or cloud, and scales from a single node to a fleet of workers.

Highlights:

  • Single binary installation.
  • Self-contained: no external DBMS or message broker required.
  • Runs on Linux, macOS, and Windows.
  • Declarative YAML format for defining DAGs.
  • Run existing shell commands, Docker containers, Kubernetes Jobs, and remote commands over SSH without modifications.
  • Compose reusable Sub-DAGs and run work in parallel with concurrency controls.
  • Schedule workflows with cron syntax, timezones, overlap policies, and catch-up windows.
  • Keep logs, run history, retries, notifications, and webhook triggers in one place.
  • Built-in MCP server for inspecting workflows and runs, maintaining Wiki pages, applying changes, and controlling runs.
  • Optional monitoring in Dagu Console: every server's runs and trends in one place, and an email when a workflow fails or a server stops reporting. Opt-in, outbound HTTPS only, metadata only.

Quick Look

For a quick look at how workflows are defined, see the examples.

Run Details Step Logs Wiki

Try it live: Live Demo (credentials: demouser / demouser)

Why Dagu?

Orchestration is not your main work. You have scripts and containers that already work. You want a schedule, retries, dependencies, and a place to see logs. The usual options each have a cost:

  • cron runs commands, but gives you no dependencies, no retries, no history.
  • Airflow orchestrates, but you operate a platform for it (scheduler, metadata database, workers, a Python environment), and your jobs get rewritten as @dag/@task framework code.
  • Temporal gives durable execution, but your business logic moves into its SDK and programming model.

You wanted to schedule some jobs. Now you operate a second system, and the orchestrator lives inside the code it was supposed to serve.

Dagu treats workflow structure as configuration, not code. Order, dependencies, retries, schedules, and human tasks go in one YAML file next to your scripts; the engine that runs them is a single process:

  Traditional Orchestrator          Dagu
  ┌────────────────────────┐        ┌──────────────────┐
  │  Web Server            │        │                  │
  │  Scheduler             │        │  dagu start-all  │
  │  Worker(s)             │        │                  │
  │  PostgreSQL            │        └──────────────────┘
  │  Redis / RabbitMQ      │         Single binary.
  │  Python Runtime        │         Self-hosted.
  └────────────────────────┘         Adds scheduling, retries, and human tasks around existing automation.
    6+ services to manage

Your scripts never import the orchestrator. Delete the YAML and they run exactly as before. Keep it, and every run gets a dependency graph, retries, per-step logs, history, and a Web UI.

Performance

Dagu stores state in local files and reaches production throughput without external services.

  • Throughput: A single machine can run thousands of workflow runs per day. Actual capacity depends on CPU, memory, disk, and workflow shape.
  • Load control: Queues, concurrency limits, and resource limits control how many runs execute at once and where they run.
  • Scale out: Workers spread execution across machines when one node is not enough.

Real-World Use Cases

Use Case How Dagu Helps
ETL and data operations Turn data extraction scripts, SQL queries, dbt commands, and data-processing runbooks into observable pipelines with durable execution.
Legacy scripts and scheduled jobs Turn interdependent scripts into maintainable DAGs with a UI, automatic logging, retries, and notifications instead of opaque cron jobs.
Media conversion Run ffmpeg for video transcoding and format conversion. File-backed state allows workers to run heavy conversions in parallel without single-machine bottlenecks or external databases.
Infrastructure and server automation Run any command or script over SSH on remote servers, keeping logs, results, and notifications in one place.
GitHub-driven workflows Trigger workflows from GitHub events to run automation on private infrastructure without exposing servers to the public internet.
Container and Kubernetes workflows Run Docker containers and Kubernetes Jobs as steps in your workflows without building a custom control plane around containers.
Customer support automation Provide self-service workflows that non-engineering teams can run for diagnostics, database queries, and routine operations without escalating to engineering.
IoT and edge workflows Run sensor polling, local ML inference, data preprocessing, backups, offline sync, and health checks close to the data source with Web UI visibility.

Quick Start

Install

macOS/Linux:

curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash

Homebrew:

brew install dagu

npm:

npm install -g --ignore-scripts=false @dagucloud/dagu

Windows (installer):

Download and run dagu-windows-amd64-setup.exe.

Windows (PowerShell):

irm https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.ps1 | iex

Windows (Scoop):

scoop bucket add dagu https://github.com/dagucloud/scoop-bucket
scoop install dagu

Docker:

docker run --rm -v ~/.dagu:/var/lib/dagu -p 8080:8080 ghcr.io/dagucloud/dagu:latest dagu start-all

This command does not expose the host Docker daemon to Dagu. Workflows that use container: or action: docker.run need the container-step Docker setup. Mounting the Docker socket grants workflows control of the host daemon.

Kubernetes (Helm):

helm repo add dagu https://dagucloud.github.io/dagu
helm repo update
helm install dagu dagu/dagu --set persistence.storageClass=<your-rwx-storage-class>

Replace <your-rwx-storage-class> with a StorageClass that supports ReadWriteMany. See charts/dagu/README.md for chart configuration.

The script installers run a guided wizard that can add Dagu to your PATH, set it up as a background service, and create the initial admin account. The Windows installer can add Dagu to your PATH and run it as a Windows service. Homebrew, npm, Scoop, Docker, and Helm install without a wizard. See the Installation documentation for all options.

Create and run a workflow

Create hello.yaml in an empty folder:

steps:
  - id: hello
    run: echo "hello from Dagu"

Run the workflow with:

dagu start hello.yaml
Start the server

From that folder, run:

dagu start-all --dags .

Open http://localhost:8080. On first launch, create the admin account unless a script installer already created one.

If an installer set Dagu up as a background service, it is already running (on port 8080 by default), so add workflows from the UI or put hello.yaml in its DAGs directory: the one the script installer printed, or C:\ProgramData\Dagu\dags for the Windows installer.

How You Run Dagu

Dagu runs on one machine, on temporary workers your platform creates for each run, or on workers you keep running. All three are self-hosted, and the same workflow YAML runs on any of them. Any of them can report to Dagu Console, which shows your servers together and emails you when a workflow fails or a server goes silent. See the Deployment Models guide.

Single server
Temporary workers
Distributed workers
Monitoring with Dagu Console
Topology Execution Best for
Single server dagu start-all runs the server, scheduler, and steps in one process on one machine. Development, single-machine scheduled workloads, edge jobs, and internal automation.
Temporary workers Cloud Run Jobs, Kubernetes Jobs, or CI provision a worker per run that invokes the binary and is destroyed when the run ends. The server reads run state from a shared volume. Ephemeral compute, capacity that falls to zero between jobs, and launchers you already operate.
Distributed workers Workers you keep running poll a coordinator over gRPC and are routed work by label. Docker and private-network steps, warm toolchains, and multiple execution hosts.
Licensing
  • Community self-host: No license key required. You operate the server, storage, upgrades, networking, and workers. One server can be monitored in Dagu Console for free. Start with the installation guide.
  • Self-host license: Adds SSO, RBAC, audit logging, incident SaaS integration, and monitoring in Dagu Console to Dagu. See self-host licensing.

Monitor Every Server from One Place

Connect your Dagu servers to Dagu Console and see all of them in one place: which servers report, what failed today, open alerts, and run and duration trends for each workflow. Alert emails go out when a workflow fails or recovers, and when a server stops reporting.

  • Opt-in: a server reports nothing until an administrator turns monitoring on in Settings, or sets cloud.report: runs.
  • Outbound only: the server reports over HTTPS every 60 seconds, or every 5 minutes on the free tier. No inbound port and no VPN.
  • Metadata only: run status, timing, and failed step names. Logs, outputs, parameters, and secrets are never sent, and the server shows the exact JSON it last sent.

Workflows keep running on your servers whether or not Dagu Console can be reached. Monitoring is in beta. It is free for one server on Dagu v2.19.2 or later, with lower limits; a Team or Pro plan, or a trial, covers every licensed server. See Monitoring.

Key Features

  • Observability: Shared workflows and scheduling with clear visualizations, status tracking, and logs in the Web UI.
  • Language-agnostic: No framework required. Define workflow steps using shell commands, Docker containers, Kubernetes Jobs, SQL queries, HTTP requests, and any other tool via official and third-party Dagu Actions.
  • Build workflows: Reuse a step's result when its command and files have not changed. Dagu can also infer dependencies from matching file paths.
  • Reproducibility: Reproducible runs with pinned tools, plus automatic installation and caching on workers, eliminating the need to manually install dependencies on the server or workers.
  • Human Tasks: Pause a workflow for acknowledgement or typed operator input, then expose the response to downstream steps.
  • Secret management: Built-in secret management with secure log masking, preventing credentials from leaking into logs or the Web UI.
  • Self-hosted: A single binary that runs on Linux, macOS, and Windows. Execution scales out to a fleet of workers.
  • Permission Control: RBAC and SSO support for team environments, controlling who can view, run, and edit workflows through granular permissions and audit logging.
  • MCP Server: Authenticated MCP clients can inspect workflows and runs, maintain Wiki pages, apply changes, and control runs.

Architecture

One binary carries every role. Which roles you start, and where, is what the deployment models differ on.

  • Server serves the Web UI and REST API.
  • Scheduler owns schedule: and drains the queue.
  • Coordinator is the gRPC endpoint workers poll. It also persists what they report: run status, streamed logs, and artifacts.
  • Worker polls a coordinator, executes dispatched runs locally, and reports back. Routed by labels.
  • dagu start-all runs the server, scheduler, and coordinator in one process.

Set DAGU_HEADLESS=true to run without the Web UI, which applies to any of the topologies and suits CI or CLI-only environments.

Single server:

  ┌─────────────────────────────────────────┐
  │  dagu start-all                         │
  │  ┌───────────┐ ┌───────────┐ ┌────────┐ │
  │  │ HTTP / UI │ │ Scheduler │ │Executor│ │
  │  └───────────┘ └───────────┘ └────────┘ │
  │  File-based storage (logs, state, queue)│
  └─────────────────────────────────────────┘

Distributed workers:

  ┌────────────┐                   ┌────────────┐
  │ Scheduler  │                   │ HTTP / UI  │
  │            │                   │            │
  │ ┌────────┐ │                   └─────┬──────┘
  │ │ Queue  │ │  Dispatch (gRPC)        │ Dispatch / GetWorkers
  │ │(file)  │ │─────────┐               │ (gRPC)
  │ └────────┘ │         │               │
  └────────────┘         ▼               ▼
                    ┌─────────────────────────┐
                    │      Coordinator        │
                    │  ┌───────────────────┐  │
                    │  │ Dispatch Task     │  │
                    │  │ Store (pending/   │  │
                    │  │ claimed)          │  │
                    │  └───────────────────┘  │
                    └────────▲────────────────┘
                             │
                   Worker poll / task response
                   Heartbeat / ReportStatus /
                   StreamLogs (gRPC)
                             │
               ┌─────────────┴─────────────┐
               │             │             │
          ┌────┴───┐    ┌────┴───┐    ┌────┴───┐
          │Worker 1│    │Worker 2│    │Worker N│ Sandbox execution of DAGs
          │        │    │        │    │        │
          └────────┘    └────────┘    └────────┘

Temporary workers:

  ┌────────────┐   provisions   ┌──────────────┐
  │  Launcher  │───────────────▶│  dagu start  │
  │ Cloud Run  │                │  exits when  │
  │ K8s Job/CI │                │ the run ends │
  └────────────┘                └──────┬───────┘
                                       │ writes
                                       ▼
  ┌────────────┐     reads      ┌──────────────────┐
  │ Dagu server│◀───────────────│  Shared volume   │
  │  UI / API  │                │ dags/state/logs  │
  └────────────┘                └──────────────────┘

  No coordinator, and no network path between the two.

Parameter Definition

Workflows can define parameters that render as typed input forms in the Web UI and can be referenced by steps.

params:
  - name: customer_id
    type: string
    description: Customer or account identifier
  - name: change_scope
    type: string
    description: What the repair is allowed to change
    enum:
      - metadata_only
      - permissions
      - full_account
    default: metadata_only
  - name: dry_run
    type: boolean
    default: true

steps:
  - id: extract
    run: >-
      ./scripts/extract.sh
      --customer "${params.customer_id}"
      --scope "${params.change_scope}"
      --dry-run="${params.dry_run}"
    retry_policy:
      limit: 3
      interval_sec: 30

Workflow Examples

Docker step

When Dagu itself runs in Docker, enable Docker daemon access before using container steps.

Pass standard docker run options directly in YAML, including the image, pull policy, platform, volume mounts, working directory, and resource limits:

resources:
  limits:
    cpu: 500m
    memory: 512Mi

steps:
  - id: report
    action: docker.run
    with:
      image: ghcr.io/acme/reporting:1.4.2
      pull: always
      platform: linux/amd64
      working_dir: /work
      volumes:
        - ~/orders:/work/data
      auto_remove: true
      command: python generate_report.py --input /work/data/orders.csv

See the Docker and DAG Run Resource Limits documentation for all configuration options.

Parallel Sub-DAG execution

The parent invokes the same child DAG for multiple targets and limits concurrent child runs:

steps:
  - id: patch
    action: dag.run
    with:
      dag: patch-host
      params:
        host: ${ITEM}
    parallel:
      items:
        - web-1.internal
        - web-2.internal
        - db-1.internal
      max_concurrent: 2

---

name: patch-host
params:
  - name: host
    type: string
ssh:
  user: deploy
  host: ${params.host}
steps:
  - id: apply
    run: apt-get update -q && apt-get upgrade -y

See the Sub-DAGs documentation for parameter passing and fan-out options.

SSH remote execution
ssh:
  user: deploy
  host: web-1.internal
  key: ~/.ssh/deploy_key

steps:
  - id: health
    run: curl -f http://localhost:8080/health
    retry_policy:
      limit: 3
      interval_sec: 10

  - id: restart
    run: systemctl restart myapp
    depends: health

See the SSH documentation for authentication and connection options.

Scheduling with overlap control and catch-up
schedule:
  - "0 */6 * * *"          # Every 6 hours
overlap_policy: skip       # Skip if previous run is still active
catchup_window: "5h"       # Catch up missed runs when scheduler is down for up to 5 hours

timeout_sec: 3600
handler_on:
  failure:
    run: notify-team.sh
  exit:
    run: cleanup.sh

See the Scheduling and Lifecycle Handlers documentation for all options.

Retry and error handling
steps:
  - name: flaky-api-call
    run: curl -f https://api.example.com/data
    retry_policy:
      limit: 3
      interval_sec: 10
    continue_on:
      failure: true

See the Durable Execution and Continue On documentation for retry policies and failure handling.

More Workflow Examples

Parallel executions
steps:
  - id: extract
    run: ./extract.sh

  - id: transform_a
    run: ./transform_a.sh
    depends: extract

  - id: transform_b
    run: ./transform_b.sh
    depends: extract

  - id: load
    run: ./load.sh
    depends: [transform_a, transform_b]
%%{init: {'theme': 'base', 'themeVariables': {'background': '#18181B', 'primaryTextColor': '#fff', 'lineColor': '#888'}}}%%
graph LR
    A[extract] --> B[transform_a]
    A --> C[transform_b]
    B --> D[load]
    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

See the Control Flow documentation for dependencies, conditions, and repetition.

Branching

router.route runs the steps listed for the value and skips the others.

params:
  - name: file
    default: data.csv

steps:
  - id: route
    action: router.route
    with:
      value: ${params.file}
      routes:
        "re:\\.csv$": [load_csv]
        "re:\\.json$": [load_json]

  - id: load_csv
    action: log.write
    with:
      message: Loading ${params.file} as CSV.

  - id: load_json
    action: log.write
    with:
      message: Loading ${params.file} as JSON.
Reuse unchanged results

Save this as workflow.yaml:

type: build
working_dir: .

steps:
  - id: uppercase
    inputs:
      - name: source
        path: source.txt
    outputs:
      - name: result
        path: uppercase.txt
    run: |
      #!/bin/sh
      tr '[:lower:]' '[:upper:]' < "${inputs.source}" > "${outputs.result}"

Run it:

printf 'alpha\n' > source.txt
dagu start workflow.yaml

Run dagu start workflow.yaml again and Dagu reuses uppercase.txt. Change source.txt and the step runs again. ${outputs.result} is a temporary path that Dagu publishes as uppercase.txt after the command succeeds.

Build workflows currently run locally. See Build Workflows for dependency inference and reuse rules.

External tools with pinning and caching
tools:
  - jqlang/jq@jq-1.7.1

steps:
  - id: inspect
    run: jq --version

  - id: summarize
    action: python-script@v1
    with:
      input:
        rows: [42, 8]
      script: |
        return {"total": sum(input["rows"])}

Dagu installs declared portable CLIs before the DAG run, exposes them on PATH for host command steps, and caches them on each worker. Tool provisioning uses aqua as the default provider; the standard registry resolves to the latest aqua-registry release automatically. Pin a specific artifact with package@version#sha256:<hex> when the release tag alone is not a strong enough guarantee. See the Tools documentation and Dagu Actions for more details.

Third-party Dagu Actions
params:
  - BUILD_ID

steps:
  - id: notify
    action: acme/dagu-action-notify@v1.2.0
    with:
      text: "Build ${params.BUILD_ID} finished"

  - id: audit
    depends: notify
    run: 'echo "Notification result: ${steps.notify.outputs.messageId}"'

A third-party Dagu Action package contains a DAG, manifest, schemas, and helper files behind an action: reference. See the Dagu Actions and Third-Party Actions documentation for details.

Kubernetes Pod execution
steps:
  - name: batch-job
    action: kubernetes.run
    with:
      namespace: production
      image: my-registry/batch-processor:latest
      resources:
        requests:
          cpu: "2"
          memory: "4Gi"
      command: ./process.sh

See the Kubernetes documentation for Job configuration options.

For more examples, see the Examples documentation.

MCP

Dagu includes a built-in MCP server at http://localhost:8080/mcp. MCP clients can inspect workflows and run state, maintain Dagu's built-in Wiki pages, preview and apply DAG or Wiki page changes, and control runs through the same authenticated server boundary as the REST API.

See the MCP overview and quickstart.

Built-in Actions

Dagu includes built-in actions that run within the Dagu process or on the selected worker. Local shell commands use the run: field; structured work uses action:.

Action Purpose
run: field Local shell commands and scripts (bash, sh, PowerShell, custom shells)
exec Direct process execution without shell parsing
noop Output-only or approval-only placeholder step
log.write Write structured log messages
docker.run / container.run Run containers with registry auth, volume mounts, and resource limits
kubernetes.run / k8s.run Execute Kubernetes Jobs with namespace, image, and resource settings
ssh.run Remote command execution over SSH
sftp.upload / sftp.download File transfer over SFTP
http.request HTTP requests with headers, auth, and request bodies
mcp.call Call a tool on a remote MCP server over Streamable HTTP
a2a.send / a2a.get_task Delegate a task to a remote A2A agent and read its state and artifacts
chat.completion Run an LLM chat completion step
harness.run Run external coding-agent CLIs such as Claude Code, Codex, Gemini CLI, Cursor, and DeepSeek Harness, or managed OpenCode sessions
browser.extract / browser.run Automate websites in a local Chrome with natural-language actions, structured extraction, and human input
computer.extract / computer.run Automate desktop applications on macOS and Windows workers with natural-language tasks, screen extraction, and human input
postgres.query / postgres.import PostgreSQL queries and imports
sqlite.query / sqlite.import SQLite queries and imports
clickhouse.query ClickHouse queries and statements over the HTTP interface
redis.<operation> Redis commands, pipelines, and Lua scripts
s3.upload / s3.download / s3.list / s3.delete Upload, download, list, and delete S3 objects
file.stat / file.read / file.write / file.copy / file.move / file.delete / file.mkdir / file.list Local file operations without shell commands
artifact.write / artifact.read / artifact.list Write, read, and list DAG-run artifacts
state.get / state.set / state.delete / state.list / state.diff Persistent JSON state across DAG runs
data.convert / data.pick Convert and select structured data
jq.filter JSON transformation using jq expressions
js.run JavaScript transforms in an embedded sandbox, no Node.js needed
archive.create / archive.extract / archive.list Create, extract, and list zip/tar archives
wait.duration / wait.until / wait.file / wait.http Wait for time, file state, or HTTP readiness
human.task Wait for acknowledgement or typed operator input before downstream steps continue
mail.send Send email via SMTP
mail.search Find email in an IMAP or Gmail mailbox
mail.organize Mark, move, archive, or trash email
xlsx.read / xlsx.info / xlsx.list_sheets Read typed rows and describe .xlsx workbooks without a spreadsheet application
xlsx.write / xlsx.append / xlsx.update_rows Write reports, append rows, and write per-row results back into a workbook
xlsx.validate / xlsx.write_cells / xlsx.sheet / xlsx.convert Check rows against rules, fill template cells and formulas, manage sheets, and export a sheet to CSV, JSON, or JSONL
xlsx.extract Read fields out of a form-like sheet: a model names the cells, the engine reads their typed values, and a layout seen before with the same instruction and fields is read from a cache without a model call
template.render Text generation with template rendering
router.route Conditional step routing based on values and patterns
dag.run Invoke another DAG as a sub-workflow with params and dependencies
dag.enqueue Queue another DAG asynchronously and continue after enqueue
git.checkout Clone or update Git repositories
outputs.write Publish DAG or Dagu Action outputs for callers

Custom Actions

Custom Actions are inline reusable wrappers defined with the top-level actions field. They expand to built-in actions during DAG load, so you can wrap a common shell, HTTP, SQL, or other pattern behind a typed interface with validated input.

actions:
  webhook.send:
    input_schema:
      type: object
      additionalProperties: false
      required: [url, text]
      properties:
        url:
          type: string
        text:
          type: string
    template:
      action: http.request
      with:
        method: POST
        url: '{{ .input.url }}'
        headers:
          Content-Type: application/json
        body: |
          {"text": {{ json .input.text }}}

steps:
  - action: webhook.send
    with:
      url: https://hooks.example.com/ops
      text: deploy complete

See Custom Actions and the YAML Specification for the exact actions, action, and run field behavior.

Official Dagu Actions

Dagu Actions are official action packages maintained in the dagucloud GitHub organization. They use the same action package runtime as third-party action packages, but callers use the short form action: name@version.

Dagu Action Purpose
node-script@v1 Run small JavaScript transforms or glue code with action-owned Node.js
python-script@v1 Run small Python transforms or glue code with action-owned Python and optional requirements
dbt@v1 Run dbt Core commands with action-owned Python and adapter requirements
duckdb@v1 Run DuckDB SQL through the DuckDB CLI without adding DuckDB to the core binary
ffmpeg@v1 Run FFmpeg conversion, transcoding, probing, and stream-processing tasks
github-cli@v1 Run GitHub issue, pull request, release, repository, and API automation through gh
rclone@v1 Run portable copy, sync, check, list, and storage-management workflows through rclone

Versions are required. Pin production workflows to a version tag or commit SHA. See Official Dagu Actions for the current Dagu Action list and exact input/output contracts.

For non-official packages, use Third-Party Actions such as action: owner/repo@version. They contain a dagu-action.yaml manifest and a DAG entrypoint, run as sub-DAGs, and are transferred to distributed workers as workspace bundles after the reference is resolved. See the documentation for package layout and reference formats.

Security and Access Control

Authentication

Dagu supports three top-level authentication modes, configured via DAGU_AUTH_MODE:

  • none: No authentication
  • basic: HTTP Basic authentication
  • builtin: JWT-based authentication with user management, API keys, per-DAG webhook tokens, and optional OIDC/SSO integration
Role-Based Access Control

When using builtin auth, five roles control access:

Role Capabilities
admin Full access including user management
manager Create, edit, delete, run, stop DAGs; view audit logs
developer Create, edit, delete, run, stop DAGs
operator Run and stop DAGs only (no editing)
viewer Read-only access

API keys can be created with independent role assignments. Audit logging tracks all actions.

TLS and Secrets
  • TLS for the HTTP server (DAGU_CERT_FILE, DAGU_KEY_FILE)
  • Mutual TLS for gRPC coordinator/worker communication (DAGU_PEER_CERT_FILE, DAGU_PEER_KEY_FILE, DAGU_PEER_CLIENT_CA_FILE)
  • Secret management with environment variables, files, Kubernetes Secrets, HashiCorp Vault, and cloud-provider secret stores
Production Hardening

For self-hosted production deployments, treat network exposure and execution boundaries as the primary controls:

  • Prefer auth.mode: builtin for any shared or network-exposed instance. Use basic only for simple private setups, and avoid none outside isolated local development.
  • Keep metrics: private unless the metrics endpoint is reachable only on a trusted private network.
  • Bind Dagu to loopback or a private interface when possible. If you must use 0.0.0.0, place it behind a trusted reverse proxy, TLS, and network-level access controls.
  • Leave terminal.enabled: false unless the instance is admin-only and tightly scoped.
  • In distributed deployments, set peer.insecure=false and configure peer TLS when coordinator and workers communicate across host or network boundaries.
  • Treat Docker socket mounts, root containers, and host-level executors as privileged access to the underlying machine.

See Server Configuration, Docker deployment, and Distributed execution for operator-focused guidance.

Observability

Prometheus Metrics

Dagu exposes Prometheus-compatible metrics:

  • dagu_info: Build information (version, Go version)
  • dagu_uptime_seconds: Server uptime
  • dagu_dag_runs_total: Total DAG runs by status
  • dagu_dag_runs_total_by_dag: Per-DAG run counts
  • dagu_dag_run_duration_seconds: Histogram of run durations
  • dagu_dag_runs_currently_running: Active DAG runs
  • dagu_dag_runs_queued_total: Queued runs
  • dagu_workers_registered: Registered distributed workers
  • dagu_worker_info: Worker heartbeat labels as key/value metadata
  • dagu_worker_heartbeat_timestamp_seconds: Last worker heartbeat timestamp
  • dagu_worker_health_status: Worker health by heartbeat freshness
  • dagu_worker_pollers: Worker poller capacity by state
  • dagu_worker_running_tasks: Running tasks per worker
  • dagu_worker_oldest_running_task_age_seconds: Age of the oldest running task per worker
Dagu Console Monitoring

Connected servers can report their health and run status to Dagu Console for one view across servers, trends, and alert emails. See Monitor Every Server from One Place.

Structured Logging

JSON or text format logging (DAGU_LOG_FORMAT). Logs are stored per-run with separate stdout/stderr capture per step.

Read the rest of the Dagu README on GitHub

Questions about Dagu

What is the Dagu MCP server?

Self-hostable workflow orchestrator for teams whose main work isn't orchestration. Declarative YAML over your scripts, SSH commands, containers, etc; keep workflows separate from business logic. One binary, no database, runs on limited H/W resources. Alternative to Airflow / Cron / Job Scheduler. Dagu is maintained by dagucloud on GitHub at dagucloud/dagu, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Dagu MCP server?

Add Dagu to your AI app's MCP config with the command docker run -i --rm ghcr.io/dagucloud/dagu:latest. In Claude Code, run claude mcp add --transport stdio dagu -- docker run -i --rm ghcr.io/dagucloud/dagu:latest. To run Dagu this way you need Docker running.

Does Dagu need an API key?

The registry lists no required keys for Dagu. Check the Dagu README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Dagu an official MCP server?

No. Dagu is a community server maintained by dagucloud. Community servers can be excellent; read the code and the open issues before you give Dagu access to company data.

What license is Dagu under?

Dagu is released under the GPL-3.0 license, according to its GitHub repository. The license covers the code of Dagu; the service it connects to has its own terms.