You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow account recovery without access to an admin account #1043
It's possible that the only admin loses their password. Gotify should provide a way to recover the admin account, or create a new admin account.
Options
CLI commands for changing the password, creating a new user, changing admin status on user
Consume a username:passwordhash file, and then update the username:passwordhash pairs
I think we can ignore the possibility of losing the last admin due to OIDC login demoting a user. If permissions are handled by the IdP, then the admin should be able to configure the IdP to give a user admin permissions on next login.
Hi @jmattheis, I'd like to work on this. I'd start with the CLI option: subcommands to reset a user's password, create a user, and set or unset admin on a user, operating directly on the database. Does that sound like the right direction, or would you prefer the username:passwordhash file approach?
gotify user create [--admin] <name> [password]
# prompts for password if [password] isn't set
gotify user set-password <name> [password]
# prompts for password if [password] isn't set
gotify user set-admin <name> true|false
Thanks @jmattheis, that design works for me. I'll implement gotify user create [--admin] <name> [password], gotify user set-password <name> [password] and gotify user set-admin <name> true|false, with an interactive password prompt when the password isn't given, operating on the configured database, plus tests and docs. Could you assign this to me? I'll open a PR within the next week.
Activity
Shrinet82 commentedon Nov 19, 2026
Hi @jmattheis, I'd like to work on this. I'd start with the CLI option: subcommands to reset a user's password, create a user, and set or unset admin on a user, operating directly on the database. Does that sound like the right direction, or would you prefer the username:passwordhash file approach?
jmattheis commentedon Nov 21, 2026
CLI options sound good. I'd propose this:
Shrinet82 commentedon Nov 22, 2026
Thanks @jmattheis, that design works for me. I'll implement
gotify user create [--admin] <name> [password],gotify user set-password <name> [password]andgotify user set-admin <name> true|false, with an interactive password prompt when the password isn't given, operating on the configured database, plus tests and docs. Could you assign this to me? I'll open a PR within the next week.Shrinet82 commentedon Nov 23, 2026
@jmattheis I've opened #1095 for this with the three
gotify usercommands as you proposed. Could you take a look when you have time?