自托管/单一二进制/零依赖

不会演变成 SRE 项目的工作流引擎。

Dagu 是 Airflow 或 Cron 的轻量级替代方案,并带有 Web UI。使用简单的声明式 YAML 格式定义 DAG。支持 shell 命令、Docker 容器、k8s 作业、通过 SSH 执行的远程命令等。它的设计宗旨是易于使用、自包含且无需编码,非常适合小型团队。

Dagu专为希望实现强大工作流编排而无需运维负担的开发者而生。

试用在线演示demouser / demouser
daily-report.yaml
on schedule
# runs every night at 02:00
schedule: "0 2 * * *"
steps:
- name: fetch data
command: python fetch.py
retryPolicy:
limit: 3
- name: build report
command: python report.py
- name: notify
command: ./notify.sh
last run · 02:00:04 · exit 03/3 steps

Trusted by developers at

1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX
1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX
1Password
Intel
MongoDB
Baidu
ByteDance
Canonical
Grab
Douban
Debian
NASA / JPL
Gitee
Plaid
Geodis
Aleno
Mambu
Audibene
NINAnor
RUBIX GmbH
cynkra
DataLad
dandi
QNIB Solutions
modoolar
TTT Studios
vital-software
m3dev
Build On Technologies
Dalibo
InfoInnova
infront-quant
gfx-labs
t54-labs
sajo
ANZX

简单易用

用纯 YAML 定义工作流。一条命令安装,几分钟内跑起第一个 DAG。

可靠稳定

为生产环境而建:重试、超时、告警,以及每次运行的完整日志。

开源

GPLv3 协议,由社区驱动、公开开发。你的基础设施里没有黑盒。

控制平面

每个任务、每次运行,尽在一屏。

调度、状态与日志汇聚在同一个 Web UI。在浏览器里触发运行、跟踪每个步骤并直接查看输出。

Jobs
Run Job
NameScheduleStatusLast Run
daily-report0 2 * * *Success2m ago
data-sync*/15 * * * *Success7m ago
cleanup0 3 * * 0Success1h ago
weekly-summary0 4 * * 1RunningNow
dagu — zsh
$ dagu start daily-report
INFO[0000] Starting DAG daily-report
INFO[0001] Step 1/3: fetch data
INFO[0002] Step 2/3: build report
INFO[0003] Step 3/3: notify
INFO[0004] DAG daily-report finished ✓

用于工作流操作且不暴露密钥的内置 MCP 服务器

已授权且支持 MCP 的客户端可以通过 Dagu 查看并请求 DAG 操作。私有系统保留在安全边界之后:Dagu 在运行时注入凭据,不会把凭据传给 MCP 客户端。

MCP 客户端

请求已批准的操作,而不接收私有凭据。

请求

Dagu MCP

在任何工作流运行前执行细粒度访问控制。

授权

DAGs

运行你已经信任的脚本、容器、SQL、HTTP、SSH 或子工作流。

执行

私有系统

生产工具和数据保留在 Dagu 后面,而不是进入客户端上下文。

ShellSQLSSH

MCP 客户端通过 Dagu MCP 请求命名工作流操作,而不是接收 shell、数据库或 API 凭据。

Dagu 检查访问权限,只在运行时注入密钥,并可让敏感工作流等待人工审批。

每次运行都会保留日志、输出、状态、历史和审计证据,供人员和 MCP 客户端查看。

范围化访问

只暴露每个 MCP 客户端被允许运行的操作。

托管密钥

运行时注入凭据,不把凭据传给 MCP 客户端。

审计记录

跟踪谁或什么请求了每个工作流,以及使用了哪些输入。

审批

高风险操作可暂停等待人工审核。

安全结果

返回状态和输出,而不开放原始系统访问。

Agent 得到的是有边界的工具。密钥、日志、权限和操作历史都留在 Dagu。

部署模型

运行自托管实例,使用Dagu托管服务器,或将云控制平面与基础设施中的私有工作节点结合使用。

从一台机器开始,扩展到自托管、托管或 Hybrid。

本地

单服务器

在一台机器上运行 `dagu start-all`,并使用本地文件保存状态。不需要 database、broker 或 platform stack。

自托管

你的基础设施

将 Dagu server、workers、secrets、logs 和 execution 保留在自己的环境中。

Dagu

全托管服务器

使用由 Dagu 在 GKE isolated gVisor instance 中运营的 dedicated Dagu server。

混合

托管服务器,私有执行

让 Dagu 运营 server,同时 private workers 运行 Docker、private-network 或 data-local steps。

混合执行

托管 Dagu 服务器
通过 mTLS 连接的 private worker
Docker、private APIs、secrets 和 data-local work

Hybrid 让 Dagu server 保持托管,同时需要你的 network、runtime 或 data 的 execution 仍由你控制。

生产级工作流引擎功能

经过实战检验的工作流引擎功能,让你专注于核心价值,无需担心编排问题。

性能

根据硬件、工作流形态、步骤耗时和队列配置,在一台机器上每天运行数千次工作流。

分布式执行

使用队列、并发限制和分布式 workers 控制负载,并把 jobs 分散到多台机器。

通知

定期调度、补跑、持久执行、超时、重跑、通知,以及将事故路由给响应人员。

认证与RBAC

用户管理、RBAC、工作区、审批步骤、内置密钥管理、API密钥和Webhook。

真实使用场景

01

客户支持自动化

将重复的工程请求转化为自助服务工作流。业务团队可以独立运行,工程师无需介入。

02

Cron 和遗留脚本管理

把现有 shell 脚本、Python 脚本、HTTP 调用和定时任务带入 Dagu,无需重写。

03

基础设施与服务器自动化

编排 SSH 备份、清理任务、部署脚本、补丁窗口、前置检查和生命周期钩子。

04

ETL 与数据运维

运行 PostgreSQL 或 SQLite 查询、S3 传输、jq 转换、验证步骤和可复用子工作流。

05

容器与 Kubernetes 工作流

组合每一步都能运行 Docker 镜像、Kubernetes Job、shell 命令或验证步骤的工作流。

06

媒体转换

在 worker 上运行 ffmpeg、缩略图提取、音频归一化、图像处理和其他重计算任务。

07

IoT 与边缘工作流

在小型设备上运行传感器采集、本地清理、离线同步、健康检查和设备维护任务。

08

Agent Harness 工作流

运行任何工具链,通过清晰的上下文和自动重试与故障转移来自动化特定的开发工作流。

常见模式

Health Check
SSH Backup
Notify

私有脚本工作流

把私有脚本、内部 CLI、可复用 actions、固定工具和产物变成其他团队可安全请求或运行的工作流。

  • 1保留现有脚本和命令
  • 2公开狭窄参数,而不是广泛生产访问权限
  • 3调用带类型输出的版本化 Dagu Actions
  • 4把报告和日志作为一等产物保存
workflow.yaml
tools:
  - jqlang/jq@jq-1.7.1

steps:
  - id: collect
    action: acme/dagu-action-export@v1.4.2
    with:
      dataset: customers

  - id: transform
    run: jq '.items[] | {id, email}' ${steps.collect.outputs.path}
    stdout:
      artifact: reports/customers.json
    depends: [collect]

  - id: publish
    action: outputs.write
    with:
      values:
        report: reports/customers.json
        rows: ${steps.collect.outputs.rows}
    depends: [transform]

类型化参数

Dagu自动在Web UI中将其渲染为类型化参数输入表单,适合构建自助服务工作流或供非工程师操作使用。

workflow.yaml
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 默认使用 aqua 来准备 tools。

完整的工作流功能

Dagu配备了生产级工作流引擎功能。

深受开发者喜爱

来自 Dagu GitHub 社区的真实评论。

最近一直在找 Agent Dynamic Workflow 的替代方案。 一开始是沿着 Temporal 这条线找的。Temporal 很强,但如果只是想把 agent、脚本、数据处理、运维任务动态串起来,有时候会觉得整套体系有点重。 然后翻到了 Dagu,感觉方向很对。 单个 binary 就能跑,流程用 YAML 写,本地文件管理,带 Web UI,也不用额外起 DB 或 broker。 内置动作也挺多:shell、Docker、K8s Job、SSH 这些都有。比较惊喜的是还有 harness.run,可以直接把外部 coding agent CLI 接进流程里。 我喜欢它的点是:流程本身就是文件,状态、日志、重试、依赖和界面都帮你兜住了。 对小团队、私有环境、个人自动化,还有 agent workflow 来说,Dagu 这种本地优先的路线反而很舒服。
支付宝工程师

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

This is literally my dream project. I have set up GitLab at some point just to run some commands and this project is perfect for all my use case. Thank you very much!

@vnghia

Developer

#827

Dagu is really a gem in the open source world! ❤️ What a release — with GitHub Actions as well. Thanks guys.

@borestad

Elk Studios

#1313

Dagu is an amazing tool!! It works perfectly now, thank you so much! 💖

@jarnik

Freelance developer

#1294

I've been exploring Dagu for a few weeks and really love the Zero-Ops philosophy. The declarative YAML approach is exactly what the workflow orchestration space needs.

@vincent067

Developer

#1814

Amazing! I did not expect this to be delivered that fast! Multiple schedulers do not compete and the locking mechanism works as expected. Good job!

@jonasban

Developer

#1130

I've recently played around with Dagu for private stuff and think it could also be worth introducing at work.

@DarkWiiPlayer

Developer

#924

Awesome, it works like a charm! I second the update of the doc on this one.

@thibmart1

Developer

#1320

That's very impressive. The exit code dictionary will make these DAGs even further sophisticated. Once again, very good features. 🫡

@ghansham

Developer

#1076

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

I love how simple this is now.

@n3storm

Estudio Nexos

#1593

Fantastic! Thanks for the quick reply — keep up the great project!

@mitchplze

Developer

#1359

Amazing support! Thank you!

@kacamific

Developer

#760

It works perfectly with v2.6.1. Thank you very much for the correction.

@napnap75

Developer

#1638

Thanks for the fix. Works great now.

@triole

Developer

#831

As always, appreciate the great work — just sharing feedback to help shape the roadmap.

@jonnochoo

Developer

#770

it's awesome you keep working on it 👍

@fishnux

Developer

#328

Thank you so much for the quick fix! I tested it, and it now correctly stores the files where it should.

@IngwiePhoenix

Developer

#423

在您自己的基础设施上自托管

Dagu 是 GPLv3 授权的永久免费软件。请考虑购买许可证以支持开源的可持续发展。付费许可证可解锁团队使用的实用功能。

社区版
永久免费
无限服务器,无限工作节点
  • 完整的工作流自动化和监控
  • 带 DAG 可视化的 Web UI
  • Docker、SSH 和 HTTP 执行器
  • Cron 调度和重试
  • 最多 2 个用于自动化的 API 密钥
Minimum
$50 / 月

3 个自托管 Dagu 服务器许可证

3 个许可证 = 3 台服务器,worker 不限
开始免费许可证试用
Pro
$150 / 月

15 个自托管 Dagu 服务器许可证

15 个许可证 = 15 台服务器,worker 不限
开始免费许可证试用
企业版
定制

适合在复杂环境中构建事件驱动工作流基础设施的团队

自定义授权服务器数量
  • 分布式架构咨询
  • 定制实施
  • MCP OIDC/SSO 设置指导
  • 初始迁移支持
  • 专属会议
我们构建什么
  • 定制解决方案

    针对特定公司需求构建量身定制的功能。

  • 交钥匙解决方案

    打造开箱即用的配置,帮助团队轻松扩展 Dagu,而无需消耗大量技术或服务器资源。

联系我们

几分钟内创建 14 天自托管许可证试用14 天, 无需信用卡. 开始免费许可证试用

与你共建

随着项目的发展,维护它需要更多的时间和资源。为了让 Dagu 长期蓬勃发展,我们正在慢慢探索让项目实现财务可持续的方式。

我们的目标是构建一种商业模式,为核心开发提供资金,同时不限制你已经喜爱的功能。

我们希望与你共同构建这个未来。如果你有想法、反馈,或想分享你的团队愿意为哪些功能付费,请在 #feedback 频道中留言。感谢你成为这个了不起的社区的一员!🚀

Solution partner focus

Build the operational control plane around your workflows.

Work with the Dagu team on deployment, security, scale, and workflow design for production use cases.

Dagu 最适合包住真实运维工作:脚本、容器、SQL、API 调用、审批和 Agent Harness 工作流。

联系我们

OIDC/SSO, RBAC, workspaces, and tenant isolation

MCP, distributed workers, queues, and high-volume run history

Persistence and backup strategy for production operations

Secrets, auditability, and least-privilege execution

Event routing, webhooks, notifications, and incident workflows

Container isolation and private worker deployment

快速开始

先用引导式安装器安装 Dagu,再继续查看完整安装指南或快速开始文档。

1

安装 dagu 命令

脚本安装器是最推荐的方式。Homebrew、npm 和 Docker 也可用,但它们只提供二进制或容器安装。

Mac/Linux 终端
$curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash
✓ 引导式安装器已就绪
可选

连接 AI 工具

安装 Dagu 技能用于编写 workflow,或将 MCP 客户端连接到正在运行的 Dagu 服务器。

Dagu 技能
$gh skill install dagucloud/dagu dagu

帮助 Claude Code、Codex、Gemini CLI 等 AI 编程工具编写 Dagu YAML。

Dagu MCP 端点
URLhttp://localhost:8080/mcp

让支持 MCP 的客户端读取 Dagu 状态、预览更改并控制 DAG 运行。

基于 OIDC/SSO 的 MCP 访问适用于企业部署。请联系我们讨论配置。

2

下一步

引导式安装器可以帮你完成首次启动配置。

# 安装器可以完成的内容
把 Dagu 加入 PATH
配置后台服务
创建并验证首个管理员

联系

有问题、企业需求或反馈?

期待您的来信。