Skip to content

Basic Authentication ​

Username and password authentication for Dagu.

Configuration ​

YAML Configuration ​

yaml
# ~/.config/dagu/config.yaml
auth:
  mode: basic
  basic:
    username: admin
    password: secure-password

Environment Variables ​

bash
export DAGU_AUTH_MODE=basic
export DAGU_AUTH_BASIC_USERNAME=admin
export DAGU_AUTH_BASIC_PASSWORD=secure-password

dagu start-all

To 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 status

API 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/dags

Notes ​

  • Basic authentication is active when auth.mode is set to basic and 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

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