Skip to content

Accounts and roles

hytte has two roles: members and admins.

The first account created on a fresh server is automatically an admin.

If you need to promote someone from the server’s command line (for example, if the only admin lost access), run:

Terminal window
hytte --make-admin alice

Pass -d <data-dir> if your data directory isn’t the default .hytte. The command updates the database, records an entry in the audit log and exits. You can also promote or demote admins in the admin panel.

A server always keeps at least one active admin: hytte won’t let you demote, disable or delete the last one.

By default, sign-up is invite-only: the login page only lets existing accounts sign in, and an admin creates accounts with setup links.

You can switch to open sign-up in two ways:

  • In the admin panel: Settings → Sign-up → Anyone.
  • At startup with -r / --open-registration: this sets the value and locks it in the admin panel (set by flag) so it stays predictable across restarts.

Because hytte never handles passwords on the server, admins don’t set or reset passwords directly. Instead, hytte generates a one-time setup link valid for 24 hours.

When the user opens the link in their browser, they choose their password, and their browser generates (or recovers) their encryption keys.

  • From the admin panel: Users → Add user, enter the username, and copy the setup link.
  • From the command line:
Terminal window
hytte --create-user alice

This prints a URL like https://0.0.0.0:8000/auth/setup#<token>. Replace the host with the public address your team uses (such as your domain or tunnel URL) and send it to the user over a private channel.

If someone forgets their password, generate a new setup link for their account in Admin → Users → Setup link.

  • With their recovery key: they enter their recovery key on the setup page, keep their existing identity keys, and choose a new password. Contacts see no key-change warning.
  • Without their recovery key: they choose a new password and get a fresh identity key pair. Contacts see a “security key changed” warning, and online members’ browsers automatically re-share keys for shared conversations.

If a user loses both their authenticator/security key and their backup codes:

  • In the admin panel: Users → Reset 2FA.
  • From the command line:
Terminal window
hytte --reset-mfa alice

This removes all TOTP secrets, passkeys, security keys and backup codes for that account and logs them out everywhere. If the server requires 2FA, they will be prompted to set it up again on their next sign-in.

  • Disable (Users → Disable) is reversible. It immediately ends all active sessions and prevents the user from signing in until an admin clicks Enable. Their profile, memberships and messages stay untouched.
  • Delete (Users → Delete) is permanent. It removes the account, its keys, sessions, 2FA factors, avatar and 1:1 DMs. Messages the user wrote in channels and group conversations stay in place, shown as from a deleted user, and remaining members rotate the keys of private channels and groups they belonged to.