# Accounts and access

Source: https://docs.savorum.app/admin/accounts/

> Turn on sign-in, create the first administrator, and invite people to your library.

When you first start Savorum, there’s no sign-in: it opens straight to your library. That’s [local mode](https://docs.savorum.app/reference/glossary/), and it’s fine while only you, on the same computer, can reach it. Before anyone else uses Savorum, or you open it from another device, turn on sign-in. Your recipes, preferences, and history are kept.

In **People**, choose **Add user** to create an account with a login name and password. Choose **Manage** beside a user to reset their password or manage sign-in methods. Inside **Manage**, choose **Enable** or **Disable and revoke sessions** to control whether the user can sign in. Your own account links to **Sign-in and security**.

## Turn on sign-in

Nobody can claim Savorum from the web: you create the first administrator on the machine that runs it.

1. While Savorum is still in local mode, create the administrator. A native binary can also run this command while the server is stopped:

   Docker CLIComposeContainer managerNative binary`docker exec --user 65532:65532 -it savorum /savorum user create-admin --database /data/savorum.db --login chef`

   The command asks twice for a password, between 12 and 1024 bytes, and prints the account’s user ID. Note the ID: other account commands need it. This account takes over your existing library.

2. Start Savorum with sign-in on, and the address people will type:

   Docker CLIComposeContainer managerNative binaryAdd these options before the image name in your `docker run` command, then [replace the container](https://docs.savorum.app/admin/docker/#change-settings):`-e SAVORUM_AUTH_ENABLED=true \-e SAVORUM_PUBLIC_URL=https://recipes.example.com`

3. Sign in, then add a passkey and save recovery codes. See [Your account and sign-in](https://docs.savorum.app/guide/your-account/).

Container examples use the name `savorum`. Replace it with your container or Compose service name. The native examples use `/var/lib/savorum`; container examples use `/data`.

## Invite people

An account on its own reaches no library. Give each person a role in each library they need:

- **Viewer** reads recipes and books.
- **Editor** also adds and changes recipes.
- **Owner** also manages the library and who can use it.

To invite someone:

1. Open **More → Library settings**. Administrators can also choose **Invite by link** under **People**.
2. Under **Invitation links**, choose **Create link**, then **Viewer** or **Editor** and how many days the link lasts.
3. Copy or share the link. It’s shown once.

Set a public URL so links work outside your home network. Revoke unused links under **Invitation links**. To add an existing account, choose **Add member** under **Members**.

Recipients create an account or sign in, confirm the account shown, and join. A link grants the Viewer or Editor role, never administration. To make someone an owner, change their role after they join.

### Cloud libraries

The household owner invites people from **People & Access** on the Cloud dashboard or **Invite People** in the iOS app. Recipients sign in or create a Cloud account, and Savorum opens the library once access is ready. **Replace Invitation** creates a new link and disables the old one.

As administrator, you can also create an account yourself under **Instance administration**, or from the command line with your own user ID:

- Docker CLI
- Compose
- Container manager
- Native binary

```sh
docker exec --user 65532:65532 -it savorum /savorum user create --database /data/savorum.db --actor ADMIN_USER_ID \
  --login cook
```

Container commands ask for the account password. For unattended use, pass `--password-file` with a file readable by the Savorum user inside the container.

To grant roles from a company sign-in service’s groups, see [Single sign-on](https://docs.savorum.app/admin/single-sign-on/).

## Remove someone

**Remove from this library** keeps access to other libraries. In Cloud, **Remove from household** removes access to every library in the household.

Disabling an account is the normal first step. It stops sign-in and ends their sessions at once, and keeps their memberships and shared history.

Deleting an account first needs someone else to own any library they own alone. It removes their sign-in methods, sessions, preferences, and personal recipe state. Shared libraries show them as “Former user”. The last active administrator can be neither disabled nor deleted.

## Retire a library

When a library is no longer needed, its owner opens **Library settings**, chooses **Retire library**, and types the library name to confirm. Nobody can reach it after that. At least one other library must remain.

Retiring is not secure erasure. The content and its history stay in the database and in backups. Retiring never deletes an account or anything in another library.

## See who did what

Savorum records sign-ins, permission changes, and anything destructive, such as permanent deletions. Administrators read it in **Instance administration → Audit history**. Library owners see **Library activity** in **Library settings**.

Events are grouped by day. Each row groups the action, affected object, and result, with the person and time alongside. Use **By** to select a person or service. **More filters** includes a time range and exact identifiers. Open **Record details** to read or copy the original event, including its action code and request identifier. **Older activity** opens earlier records; **Previous** returns to the page you came from.

Events are kept indefinitely, and Savorum offers no way to edit or delete them. That doesn’t make the history tamper-proof: anyone who controls the server or its database can change it.

## Recover library ownership

When a library has no active owner, an administrator can assign one. Open **Instance administration → Libraries → Assign a library owner**, enter the library identifier from audit history, and choose an enabled account.

## Integrations and API tokens

People create their own personal API tokens; see [Your account and sign-in](https://docs.savorum.app/guide/your-account/#create-a-personal-api-token). You set how long tokens last with `--token-default-days` (90 by default) and `--token-maximum-days` (365). Tokens that never expire need `--token-allow-nonexpiring`. Disabling an account or removing a membership applies to its tokens at once, with no need to reissue them.

## Recover administrator access

If you lose the administrator’s sign-in, reset the password from the machine that runs Savorum:

- Docker CLI
- Compose
- Container manager
- Native binary

```sh
docker exec --user 65532:65532 -it savorum /savorum user reset-password --database /data/savorum.db \
  --user-id ADMIN_USER_ID
```

This replaces the password, signs that account out everywhere, and records it in the audit history. It doesn’t change anything at an outside sign-in service. Anyone who can reach the database can do this, so protect access to the server as you would the administrator’s password.

## Good to know

- Passkeys are tied to the hostname where you register them. The local URL and [Connect address](https://docs.savorum.app/admin/connect/) each need their own passkey. Keep a second way to sign in before changing either address.
- No email address or mail service is involved.
- Without a terminal, give the password from a file with `--password-file`; `-` reads standard input. There’s no password flag or password environment variable.
- Sessions last 30 idle days or 180 days in total. Change this with `--session-idle` and `--session-absolute`, using durations such as `720h`. The total must be at least the idle time. See [Configure an instance](https://docs.savorum.app/admin/configure/).
- Failed sign-ins slow down for a while, but nothing locks an account permanently.
- Checking a password takes a lot of memory, so Savorum handles at most two sign-ins at once. Others get `503 authentication-rate-limited` and can try again a moment later.
- An HTTPS public URL makes session cookies `Secure`. A password reset ends all of that person’s sessions.
