Basic Authentication

To enable basic authentication for Dagu, follow these steps:

  1. Set the environment variables to configure basic authentication:

    export DAGU_IS_BASICAUTH=1
    export DAGU_BASICAUTH_USERNAME="<your-username>"
    export DAGU_BASICAUTH_PASSWORD="<your-password>"
    

    Replace <your-username> and <your-password> with your desired username and password.

  2. Alternatively, create an admin.yaml file in $HOME/.config/dagu/ to override the default configuration values.

    # Basic Auth
    isBasicAuth: true
    basicAuthUsername: "<your-username>"
    basicAuthPassword: "<your-password>"
    
  3. You can enable HTTPS by configuring the following environment variables:

    export DAGU_CERT_FILE="<path-to-cert-file>"
    export DAGU_KEY_FILE="<path-to-key-file>"
    

    Replace <path-to-cert-file> and <path-to-key-file> with the paths to your certificate and key files.

    See Configurations for more information on the configuration file.