Admin & recovery commands
Some things are done on the server rather than in the app: giving the admin role, taking it away, and getting back in when nobody can sign in. Whoever runs the server can always run these commands.
The commands
Section titled “The commands”docker compose exec app npm run admin grant you@example.com # gives the admin roledocker compose exec app npm run admin demote someone@example.com # takes it awaydocker compose exec app npm run admin reset-password you@example.com # a new password, printed onceThey act on an existing account, by its email address: its owner signs up first.
| Where you run them | Command |
|---|---|
| With Docker Compose, in the Compose file’s folder | docker compose exec app npm run admin <command> <email> |
| In a terminal inside the app’s container, such as Coolify’s Terminal | npm run admin <command> <email> |
| From the sources, without a build | npm run admin:dev --workspace=@imprime/backend -- <command> <email> |
Gives the account the admin role: Administration appears in its avatar menu. Any number of accounts can be administrators.
demote
Section titled “demote”Takes the role away and signs the account out: from its next sign-in, the access rules apply to
it. Its API keys keep working, as a regular user’s. When no administrator is left, the command
says so: grant gives the role back.
reset-password
Section titled “reset-password”Gives the account a new password, and prints it once:
Password of you@example.com reset. Its address is marked verified; its sessions, API keys and MCP tokens were revoked.Password: 8Kq2…It is shown only once. Sign in with it, then replace it with "Forgot password?" once email works.- The address is marked as verified: whoever runs the server vouches for it.
- The account’s sessions, API keys and MCP tokens are revoked, in case someone else had access.
- An account created through single sign-on gets a password too.
Recovery
Section titled “Recovery”| Situation | What to do |
|---|---|
| A forgotten password, and no SMTP server for Forgot password? | reset-password |
| Single sign-on only, and the provider is down or was removed | reset-password for an administrator, who then signs in through Administrator sign-in |
| The only administrator is gone, or lost access to their address | grant another account |
| Two accounts signed up at the same instant on a new instance, and neither is administrator | grant yours |
| An account you think someone else has access to | reset-password: it revokes everything that opened it |
| An administrator who left | demote |