Locked out of a self-hosted installation? Recover access from the command line
Tight sign-in rules are good until they lock out the people who manage them. Picture this: you hid password sign-in behind SSO, and the identity provider's certificate expired on a Saturday. Or the one installation administrator dropped their phone in a lake. Or a lockout policy with no expiry has someone's account locked until "an administrator" unlocks it, and that someone is the administrator.
Self-hosted Requestarium has a break-glass tool for exactly this. It works from any machine that can reach the database, without signing in.
The commands
requestarium-admin auth status # values, where each comes from, locked accounts, findings
requestarium-admin auth reset # delete every saved TAIRI_AUTH_* value: the defaults apply
requestarium-admin auth reset TAIRI_AUTH_HIDE_PASSWORD_SIGN_IN
requestarium-admin auth unlock [email protected]
requestarium-admin auth reset-2fa [email protected] # lost authenticator; ends its sessionsThey need TAIRI_POSTGRES_DSN, and status also needs TAIRI_DATA_ENCRYPTION_KEY. Run them where those are already set: inside the backend container, or on an admin host with the same environment.
Which one to use
| Situation | Command |
|---|---|
| SSO is broken and password sign-in is hidden | auth reset TAIRI_AUTH_HIDE_PASSWORD_SIGN_IN, then sign in with a password |
| An administrator's account is locked after wrong passwords | auth unlock <email> |
| An administrator lost their authenticator | auth reset-2fa <email>; they set it up again after signing in |
| Nobody is sure what the policy is any more | auth status, then auth reset if needed |
Resetting one setting is better than resetting everything: the rest of your policy (sign-up rules, password length) stays in place.
Environment values aren't touched
The commands only delete values saved in the app. A setting that comes from the environment (.env, Helm values, a Kubernetes Secret) stays, because the environment always wins. If the problem is in an environment value, remove it from .env or the Helm values and restart the backend. auth status tells you which values come from where, so start there.
Logged, on purpose
Every command is written to Settings ▸ Installation ▸ Activity as requestarium-admin@<host>. Resetting a setting is recorded as auth.policy.break_glass, unlocking as auth.account.unlocked and a 2FA reset as user.mfa_reset. A tool that bypasses sign-in should leave a trail, and this one does. Restrict who can open a shell in the backend container or reach the database, as you would anyway.
Prevent the next one
- Keep two installation administrators (
TAIRI_ADMIN_EMAILS), both with two-step verification and recovery codes stored somewhere safe. - Prefer a lockout that expires (the default 15 minutes) over "until an administrator unlocks it".
- Run the doctor after changing authentication settings. It fails when password sign-in is hidden behind an SSO connection that can't be used: doctor and support bundle.