Skip to content

Dagu Tutorial ​

Learn the basics of Dagu in about 40 minutes. Each lesson is one small workflow. Watch a recorded run of it on the page, then run it yourself and change it.

You need a terminal and basic shell skills. No Dagu knowledge is assumed.

Set up (2 minutes) ​

1. Install Dagu ​

bash
curl -fsSL https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.sh | bash
powershell
irm https://raw.githubusercontent.com/dagucloud/dagu/main/scripts/installer.ps1 | iex
bash
brew install dagu
bash
npm install -g --ignore-scripts=false @dagucloud/dagu

Other methods, including Docker: Installation.

2. Start Dagu in a tutorial folder ​

bash
mkdir dagu-tutorial && cd dagu-tutorial
dagu start-all --dags .

start-all runs the Web UI and the scheduler together. --dags . tells Dagu to load every workflow file in this folder. Leave it running, and open a second terminal in the same folder for the lessons.

Open http://localhost:8080. On first launch, create the admin account.

In an empty folder, Dagu also adds six example workflows, example-01 to example-06, and a wiki folder. They are not part of the tutorial. Keep or delete them.

Dagu already runs as a service?

If the installer set up a background service, Dagu is already at http://localhost:8080. Skip start-all and run the lesson commands from its DAGs folder instead, ~/.config/dagu/dags by default.

3. Get each lesson's workflow ​

Every lesson starts with one command that downloads its workflow into the current folder, for example:

bash
curl -fsSLO https://docs.dagu.sh/tutorial/dags/tutorial-01-first-workflow.yaml

The workflow appears in the Web UI under Workflows right away. You can also create a workflow in the Web UI and paste the YAML from the lesson page.

Start with lesson 1: Your first workflow →

Dagu is open source under the GNU General Public License v3.0.