访问Dagu Web UI
- 打开浏览器并访问:
http://<SERVER_IP>:8080/login(HTTP) - 使用存储在以下位置的凭据登录:
/root/.dagu-credentials
港口
- 网页用户界面:
8080 - gRPC 协调员:
50055(内部的)
重要路径
系统配置:
/usr/local/bin/dagu # Binary
/etc/dagu/ # Env directory
/etc/systemd/system/dagu.service # Systemd service
服务模式(系统级):
/var/lib/dagu/
├── dags/ # Workflows
├── logs/ # Execution logs
├── data/ # History
├── suspend/ # Pause flags
└── base.yaml # Shared config
CLI 模式(用户级):
~/.config/dagu/
├── dags/ # Workflows
├── config.yaml # Configuration
└── base.yaml # Shared config
~/.local/share/dagu/
├── logs/ # Execution logs
├── data/ # History
└── suspend/ # Pause flags
服务管理
# Check service status
systemctl status dagu
# Start the service
systemctl start dagu
# Stop the service
systemctl stop dagu
# Restart the service
systemctl restart dagu
CLI 基本用法
# Show help / available commands
dagu --help
# Show installed version
dagu version
# Install Dagu skills (auto-detect supported tools)
dagu ai install
# Install non-interactively (auto-confirm all prompts)
dagu ai install --yes
# Install to a specific skills directory
dagu ai install --skills-dir ~/.agents/skills
# Start a DAG workflow from a file or named workflow
dagu start my-workflow.yaml
# Pass parameters to a DAG (after --)
dagu start my-workflow.yaml -- param1=value1 param2=value2
# Execute a command directly as a DAG step
dagu exec -- python script.py
# Example with arguments
dagu exec -- python script.py --input data.csv
创建您的第一个工作流程(CLI 模式)
创建 DAG 目录:
mkdir -p ~/.config/dagu/dags
创建一个名为 hello.yaml (/root/.config/dagu/dags/hello.yaml):
steps:
- name: hello
command: echo "Hello from Dagu"
运行工作流程:
dagu start hello
创建您的第一个工作流程(Web 模式)
创建工作流程文件:
vim /var/lib/dagu/dags/hello.yaml
添加以下内容:
steps:
- name: hello
command: echo "Hello from Dagu"
正在运行的服务将自动检测工作流程。
您可以从 Web UI 触发它。