Documentation/Troubleshooting

Troubleshooting

Solutions to common issues you might encounter when using DBCraft.

Container won't start

Symptoms

  • Container exits immediately
  • Port already in use
  • Permission denied errors

Solutions

  • Check that port 9000 (or the host port you mapped) is available
  • The container runs as uid 1000: make bind-mounted data directories writable with `chown -R 1000:1000 ./data`
  • Run `docker logs dbcraft` to see error messages
  • Ensure Docker has enough memory allocated (minimum 256MB)

Signed out after every restart, or data sources stop working

Symptoms

  • Everyone is logged out whenever the container restarts
  • Data sources fail to decrypt or Test Connection fails after a redeploy
  • Logs warn that secrets were generated

Solutions

  • Mount a persistent volume at `/app/data`: generated keys are saved to `/app/data/.dbcraft_secrets.json` and are lost without one
  • Set `DBCRAFT__AUTH__JWT_SECRET` and `DBCRAFT__SECURITY__ENCRYPTION_KEY` explicitly. Bare `JWT_SECRET` or `ENCRYPTION_KEY` env vars are ignored
  • If the encryption key changed, restore the original key from your backup
  • If the original key is gone, re-enter each data source's credentials: they cannot be recovered without it

Can't register a second user

Symptoms

  • Registration is refused after the first account
  • The sign-up page says registration is disabled

Solutions

  • This is expected: self-registration closes once the first admin exists
  • Invite teammates from the Organization page, or have an admin create their accounts
  • Only if anyone who can reach the URL should be able to join, set `DBCRAFT__AUTH__ALLOW_REGISTRATION=true`

SQL editor stuck on "Loading editor..."

Symptoms

  • The SQL editor never appears
  • Browser console shows a Content Security Policy error for cdn.jsdelivr.net

Solutions

  • Upgrade to `krishcdbry/dbcraft:v0.8.1-mcp` or later. In v0.8.0 the CSP blocked the editor's CDN loader; v0.8.1 serves it from DBCraft itself
  • Hard-refresh the page after upgrading to drop the cached bundle

Locked out or signed out unexpectedly

Symptoms

  • Signed out after a break
  • Sign-in refused after several wrong passwords

Solutions

  • Sessions end after 15 idle minutes (`DBCRAFT__AUTH__IDLE_TIMEOUT_MINUTES`)
  • Accounts lock for 30 minutes after 10 failed sign-ins (`DBCRAFT__AUTH__MAX_FAILED_LOGIN_ATTEMPTS`, `DBCRAFT__AUTH__LOCKOUT_MINUTES`)

Can't connect to database

Symptoms

  • Connection timeout
  • Authentication failed
  • SSL errors

Solutions

  • Verify database host is accessible from DBCraft container
  • Check credentials are correct (username, password)
  • Ensure the database is accepting connections from DBCraft's IP
  • For Docker, use `host.docker.internal` instead of `localhost`
  • Set the SSL mode to prefer or require if your database requires TLS
  • ClickHouse: use the HTTP port (8123, or 8443 with Secure on), not the native port 9000
  • MongoDB: put credentials and options such as `authSource` in the connection string

Query execution fails

Symptoms

  • Query timeout
  • Permission denied
  • Write statements rejected
  • Results cut off

Solutions

  • Check the database user has SELECT permissions
  • Verify the query syntax is correct for your database type
  • Write statements are blocked by read-only mode, which is on by default (`DBCRAFT__QUERY__READ_ONLY_MODE`)
  • For long queries, raise `DBCRAFT__QUERY__DEFAULT_TIMEOUT_MS` and `DBCRAFT__QUERY__MAX_TIMEOUT_MS`
  • Large results are capped at `DBCRAFT__QUERY__MAX_LIMIT` rows (100,000 by default)

Values show up masked

Symptoms

  • Names, emails, or postcodes appear as asterisks
  • Account numbers show only the last digits

Solutions

  • Personal data is masked in results and exports by default
  • Turn off personal-data masking with `DBCRAFT__SECURITY__MASK_PII_IN_RESULTS=false` if your policy allows it
  • Account numbers are always masked

Dashboard not loading

Symptoms

  • Blank dashboard
  • Charts show errors
  • Slow loading

Solutions

  • Clear browser cache and reload
  • Check browser console for JavaScript errors
  • Verify all data sources are connected
  • Ensure queries in charts are still valid

Still need help?

Drop us a line. Early-access users get a fast reply.