Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rootprint.io/llms.txt

Use this file to discover all available pages before exploring further.

If you lose access to the admin account, remove every admin user from the database and clear the first-admin setup flag, then let Rootprint guide you through creating a new admin via the setup wizard.
Rootprint stores its state in PostgreSQL, not SQLite. The bundled Docker Compose file runs a db service (database rootprint, user rootprint). Adjust the commands below if you point DATABASE_URL at an external Postgres instance.
If you still have access to a second admin account, you do not need any of this. Sign in with that account and use Settings → Users → Reset password instead — it clears the locked-out user’s password, signs them out, and gives you a fresh setup link to share so they can choose a new one.

How the setup wizard is gated

The first-admin setup wizard at /auth/setup-admin is served only while the first_admin_claimed row is absent from the app_settings table. Deleting your admin users alone is not enough — the flag persists, so the wizard stays closed. You must remove both.

Docker Compose (default install)

Run the two statements against the bundled db service. Deleting a user row cascades via foreign keys to everything that user owns — sessions, linked accounts, API keys, saved queries, views, shares, and preferences.
# 1. Remove every admin user.
docker compose exec db psql -U rootprint -d rootprint \
  -c "DELETE FROM \"user\" WHERE role = 'admin';"

# 2. Re-open the first-admin setup wizard.
docker compose exec db psql -U rootprint -d rootprint \
  -c "DELETE FROM app_settings WHERE key = 'first_admin_claimed';"
user is a reserved word in PostgreSQL, so it must be double-quoted ("user").

External PostgreSQL

If DATABASE_URL points at a managed or external database, run the same two statements with any psql client connected to that database:
psql "$DATABASE_URL" -c "DELETE FROM \"user\" WHERE role = 'admin';"
psql "$DATABASE_URL" -c "DELETE FROM app_settings WHERE key = 'first_admin_claimed';"

Finish in the UI

Open http://localhost:8282 in your browser. Because the setup flag is gone, Rootprint redirects you to /auth/setup-admin. Enter your desired admin credentials and submit the form.
The new admin account is active immediately — no restart is required. You can reuse the original admin email, since the old user row was deleted in step 1.