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-allUsage
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
