> For the complete documentation index, see [llms.txt](https://docs.bitcart.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitcart.ai/guides/account-security.md). Agents can also search and read this documentation through its [MCP server](https://docs.bitcart.ai/~gitbook/mcp).

# Account security

## Passwords

Passwords must be at least 8 characters long

## Two-factor authentication

You can protect your account with an authenticator app (TOTP), with security keys (FIDO2, for example a hardware key), or both. Set them up from your profile page.

{% hint style="success" %}
We highly recommend security keys over an authenticator app. A security key only works on the site it was registered on, so it can't be phished: a fake login page can't use it, while a code from an authenticator app can be typed into one.

You don't need a hardware key for it. Passkeys stored by your device or password manager work too, for example Apple's iCloud Keychain on a Mac, iPhone or iPad, Google Password Manager, or [KeePassXC](https://keepassxc.org) with its browser extension.
{% endhint %}

Security keys are tied to the domain you open the admin panel on, and stop working if the admin panel moves to another domain. If that happens, the server administrator can turn off two-factor authentication for your account with `./admin.sh disable-multifactor you@example.com`, and you can add your keys again.

* When an email server is configured on your instance, you need to verify your email before setting up two-factor authentication.
* Turning the authenticator app on or off, and adding or removing a security key, asks for your current password.
* After turning the authenticator app on, you get recovery codes. Each of them works once. Keep them in a safe place, they are the only way back into your account if you lose your device.

When logging in, after your password you'll be asked for a code from your authenticator app, a recovery code, or your security key.

## Security emails

When an email server is configured on your instance, you get an email when:

* your password was changed
* two-factor authentication was turned on or off
* a security key was added or removed
* someone entered a wrong two-factor code for your account

If it wasn't you, change your password and check your two-factor authentication settings. Server administrators can change the text of these emails, see [account emails](https://docs.bitcart.ai/guides/templates.md#account-emails).

## Password reset

Use the forgot password link on the login page to get a password reset link by email.

* If your account has two-factor authentication, you'll also be asked for a code, a recovery code or your security key.
* Disabled accounts don't get reset or verification emails.

### Server administrators

Superusers without two-factor authentication can't reset their password by email. Instead, the reset email contains a command to run on the server:

```bash
cd bitcart-docker
./admin.sh reset-password you@example.com
```

It asks for the new password twice. You can also pass it through standard input, for example `echo 'new password' | ./admin.sh reset-password you@example.com`. The account is logged out everywhere: all of its sessions and API keys are deleted.

We recommend turning on two-factor authentication for all superusers.
