Basic Authentication
Username and password authentication for Dagu.
Configuration
YAML Configuration
yaml
# ~/.config/dagu/config.yaml
auth:
mode: basic
basic:
username: admin
password: secure-passwordEnvironment Variables
bash
export DAGU_AUTH_MODE=basic
export DAGU_AUTH_BASIC_USERNAME=admin
export DAGU_AUTH_BASIC_PASSWORD=secure-password
dagu start-allTo read the password from a file, such as a mounted Docker or Kubernetes secret, set auth.basic.password_file or DAGU_AUTH_BASIC_PASSWORD_FILE instead of the password. See Secrets From Files.
Usage
CLI Access
bash
# Using environment variables
export DAGU_AUTH_MODE=basic
export DAGU_AUTH_BASIC_USERNAME=admin
export DAGU_AUTH_BASIC_PASSWORD=secure-password
dagu statusAPI Access
bash
# Basic auth header
curl -u admin:secure-password http://localhost:8080/api/v1/dags
# Or with Authorization header
curl -H "Authorization: Basic $(echo -n admin:secure-password | base64)" \
http://localhost:8080/api/v1/dagsNotes
- Basic authentication is active when
auth.modeis set tobasicand both username and password are configured - To disable authentication entirely, set
auth.mode: none - Basic mode provides a single shared credential. For multi-user support with RBAC, use
auth.mode: builtin. - Credentials are checked on every request

