Dagu
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Auth

Basic Authentication {#Basic Auth}

::: {.contents local=""} :::

To enable basic authentication for Dagu, follow these steps:

  1. Set the environment variables to configure basic authentication:

    export DAGU_IS_BASIC_AUTH=1
    export DAGU_BASIC_AUTH_USERNAME="<your-username>"
    export DAGU_BASIC_AUTH_PASSWORD="<your-password>"
    

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

  2. Alternatively, create an admin.yaml file in the $DAGU_HOME directory (default: $HOME/.dagu/) to override the default configuration values. Add the following lines under the # Basic Auth section:

    # 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 Configuration Options{.interpreted-text role=“ref”} for more information on the configuration file.