Skip to Content
ConceptsLogin modes

Login modes

DBLoom has two login modes. You choose one with DBLOOM_LOGIN_MODE, or leave it unset and let the setup wizard choose.

Comparison

Account modeDirect mode
Set withDBLOOM_LOGIN_MODE=accountDBLOOM_LOGIN_MODE=direct
Who signs inDBLoom accountsDatabase user name and password
Server keyRequired: DBLOOM_SECRET_KEY or DBLOOM_SECRET_KEY_FILENot needed
Public originRequired: DBLOOM_PUBLIC_ORIGINOptional, recommended: DBLOOM_PUBLIC_ORIGIN
Target serversCovered in the variable referenceListed in DBLOOM_DIRECT_TARGETS, or free-form with DBLOOM_DIRECT_FREE_FORM_ACK=true
Admin pages (users, audit, exposure, settings)YesNo
Audit log viewerYes, at /admin/auditNo. Audit lines go to stdout and any file sink
Maintenance modeYesNo
Sign-in noticeSet on the settings page, default from DBLOOM_LOGIN_NOTICEDBLOOM_LOGIN_NOTICE only
Login page memoryNoDBLOOM_LOGIN_RECALL=true remembers the last server and user name in the browser
Stateless (DBLOOM_STORE=none)Refused at startupAllowed
AI assistant conversationsKept per user, without result rows or tokensKept in server memory for the session only

Choose account mode when

  • Several people share one DBLoom and each needs their own sign-in.
  • You want administrators, an audit log and a settings page.
  • You can keep a server key safe and back it up.

Account mode needs a server key. Set one of these, never both:

DBLOOM_SECRET_KEY=<base64 key> DBLOOM_SECRET_KEY_FILE=/run/secrets/dbloom_key

Never commit the server key. Keep the backup of the key in a different place from the /data volume. See Storage.

Choose direct mode when

  • One person or a small group signs in with database credentials they already have.
  • You do not need DBLoom accounts or an admin area.
  • You want nothing on disk. Set DBLOOM_STORE=none.

Direct mode needs a list of servers users may reach, or an explicit opt-in to free-form targets:

DBLOOM_DIRECT_TARGETS=db1.internal:3306,db2.internal:3306

or

DBLOOM_DIRECT_FREE_FORM_ACK=true

DBLOOM_DIRECT_FREE_FORM_ACK=true lets users type any server. Use it only behind other protections, such as a proxy with mTLS or an identity-aware proxy and enforced 2FA. Free-form targets raise a warning in the exposure report. See Security model.

Set either DBLOOM_DIRECT_TARGETS or DBLOOM_DIRECT_FREE_FORM_ACK. Direct mode needs one of them.

Last updated on