diff --git a/api/config/app.ts b/api/config/app.ts index 30727220c3a..fd2951542ee 100644 --- a/api/config/app.ts +++ b/api/config/app.ts @@ -16,8 +16,8 @@ export const backupsDir: string = export const nvmBackupsDir: string = joinPath(backupsDir, 'nvm') export const storeBackupsDir: string = joinPath(backupsDir, 'store') -export const defaultUser: string = 'admin' -export const defaultPsw: string = 'zwave' +export const defaultUser: string = process.env.DEFAULT_USERNAME || 'admin' +export const defaultPsw: string = process.env.DEFAULT_PASSWORD || 'zwave' // lgtm [js/hardcoded-credentials] export const sessionSecret: string = process.env.SESSION_SECRET || 'DEFAULT_SESSION_SECRET_CHANGE_ME' diff --git a/docs/guide/env-vars.md b/docs/guide/env-vars.md index c0ff9a9fedc..e484daff16b 100644 --- a/docs/guide/env-vars.md +++ b/docs/guide/env-vars.md @@ -2,6 +2,8 @@ This is the list of the supported environment variables: +- `DEFAULT_USERNAME`: The default username when auth is enabled. +- `DEFAULT_PASSWORD`: The default password when auth is enabled. - `NETWORK_KEY`: Z-Wave S0 Network key. **Deprecated** - Network keys: - `KEY_S0_Legacy`