# Multi-User Administrator Guide

import { Steps, Tabs, TabItem, CardGrid, LinkCard } from '@astrojs/starlight/components';

Multi-user mode puts a sign-in in front of InvokeAI and gives every person their own account, projects, boards and workflows on one shared server. This guide is for the administrator who sets it up and runs it. For what everyone else sees, read the [Multi-User Guide](/configuration/multi-user-mode/user-guide/).

## Roles

There are two roles. Any number of accounts can be administrators.

| | Administrator | User |
| --- | --- | --- |
| Generate with every installed model | Yes | Yes |
| Open the Launchpad **Models** and **Nodes** pages to install and edit models and custom nodes | Yes | No: these pages are hidden from users |
| Manage accounts (Launchpad **Users**) | Yes | No |
| Server settings and maintenance (**Settings → Server**, database and gallery maintenance) | Yes | No |
| Queue | Sees every item in full, cancels anyone's, pauses and resumes the queue | Sees their own items in full and other users' with details hidden; cancels only their own |
| Boards | Opens and manages every user's boards | Their own, and boards others share with them |
| Library workflows | Sees every user's workflows | Their own and public ones |

Roles are read from the database on every request, so promoting or demoting someone takes effect on their next action. See [When changes take effect](#when-changes-take-effect).

## Set up multi-user mode

Multi-user mode is on by default. See [Upgrading from single-user mode](#upgrading-from-single-user-mode) if your install predates this default.

<Steps>

1. **Keep setup private.** Stop InvokeAI. On an existing install, [back up the installation](#backups). Disable any reverse proxy, tunnel or port forward that gives others access to InvokeAI. Configure [local-only access](#verify-local-only-access) for your installation. Anyone who can reach the setup page can create the first administrator, and that account also receives the [work made in single-user mode](#earlier-work-from-single-user-mode).

2. **Start in multi-user mode.** Set `multiuser: true` in `invokeai.yaml` or use the default. Remove any `INVOKEAI_MULTIUSER=false` environment override. To require strong passwords, set `strict_password_checking: true`. Start InvokeAI, verify the listener as described below, then open `http://localhost:9090` on the server. On a remote server, use a private SSH tunnel to its loopback address.

3. **Create the first administrator.** On **Set up Invoke**, enter:
   - **Email**: the sign-in name. It cannot be changed later. It must look like an email address, though `admin@localhost` also works; nothing is ever sent to it.
   - **Display name** (optional): shown to other users instead of the email.
   - **Password** and **Confirm password**.

   Select **Create administrator account**, then sign in. If an administrator already exists, sign in with that account. If the installation has work from single-user mode, a **Your earlier work comes with you** notice above the button says that the account you create receives it. See [Earlier work from single-user mode](#earlier-work-from-single-user-mode).

4. **Add the other users** from the Launchpad's **Users** page or with `invoke-useradd`. See [Manage users](#manage-users).

5. **Enable network access if needed.** After confirming administrator sign-in, configure [HTTPS](#https-and-internet-access) and enable the intended network route. With a reverse proxy on the same host, keep InvokeAI on loopback. For a direct LAN connection, bind to the server's LAN address and restart. If you change Docker's port mapping, reuse the data volume that contains the administrator account.

</Steps>

:::caution[Plain HTTP over the network]
Browsers turn off the clipboard and Web Locks for plain-HTTP pages at a network address such as `http://192.168.1.20:9090`, so copy buttons stop working and open tabs cannot be told apart. See [Known Bugs](/troubleshooting/known-bugs/#plain-http-access-another-tab-can-take-a-still-open-tabs-unsaved-changes). Serve InvokeAI over [HTTPS](#https-and-internet-access), or open it at `localhost` on the server itself.
:::

:::caution[Keep the administrator's password]
InvokeAI cannot recover a password. If you lose the last administrator's password, reset it from the command line with [`invoke-usermod`](#troubleshooting).
:::

### Verify local-only access

- **Native install.** Set `host: 127.0.0.1` in `invokeai.yaml`. The server process's `INVOKEAI_HOST` environment variable takes precedence, so unset it or set it to `127.0.0.1` in your launcher or service environment. After starting, inspect the listening socket for your port. For example, on Linux run `ss -ltn 'sport = :9090'`, on macOS run `lsof -nP -iTCP:9090 -sTCP:LISTEN`, or on Windows run `Get-NetTCPConnection -LocalPort 9090 -State Listen`. The local address should be loopback only (`127.0.0.1` or `::1`). A wildcard or LAN address accepts network connections.
- **Docker.** Leave the listener inside the container on `0.0.0.0`. With the supplied Compose file, set `HOST_INVOKEAI_IP=127.0.0.1` in `.env`. For older Compose files, set the port mapping itself to `127.0.0.1:9090:9090`. With `docker run`, use `--publish 127.0.0.1:9090:9090`. Keep untrusted containers off the same Docker network. After starting, run `docker port <container> 9090/tcp` on the host and confirm the published address is `127.0.0.1:9090`. Substitute your configured port in these checks.

### Single-user mode

Before disabling sign-in, disconnect external routes and [verify local-only access](#verify-local-only-access) with sign-in still enabled. Every visitor in single-user mode has full administrator control. Single-user mode lists only the work of the internal `system` account, so first return each account's work you want there with `invoke-usermod --email <your email> --return-to-single-user` (see [Return work to single-user mode](#return-work-to-single-user-mode)). Then set `multiuser: false` in `invokeai.yaml` or set `INVOKEAI_MULTIUSER=false` in the container environment. Restart with the same network configuration. Browsers that had InvokeAI open may need a hard refresh.

:::caution[Single-user mode is deprecated]
Single-user mode will be removed in a future release.
:::

### Upgrading from single-user mode

Earlier versions ran in single-user mode by default. Upgrading with no `multiuser` setting now enables sign-in, even on localhost. The administrator you create on **Set up Invoke** receives the [work made in single-user mode](#earlier-work-from-single-user-mode). To go back to single-user mode later, [return it](#return-work-to-single-user-mode) first. If you want to keep working without accounts, check that the effective setting is explicitly `multiuser: false` and keep the server [local only](#single-user-mode). Earlier versions dropped `multiuser: false` from `invokeai.yaml` when they rewrote it, so check the file even if you set it before. The current version keeps the line.

1. **Before switching, finish queued work.** Stop submitting jobs and let pending and running jobs finish in single-user mode. After the switch, the queue keeps running jobs even before an administrator exists, and they run as `system`. **Prompts from File** checks the submitting account when the node runs, and `system` has no administrator role in multi-user mode, so that node fails in such a job. Jobs that have not started when the administrator is created move to the administrator and run as that account. If a job is still running when you create the administrator, nothing moves: the account is created, the work stays with `system`, and the **Users** page offers it once the job finishes.
2. **Set up accounts privately.** Follow [Set up multi-user mode](#set-up-multi-user-mode) to back up, restart and create the administrator before allowing network access. Hard-refresh any browser tabs left open across the switch. Update API clients to [sign in and send a token](/configuration/multi-user-mode/api-guide/).
3. **Give other users copies if needed.** Projects, wildcards and private prompt templates belong to one account. To give another user a copy, sign in as the administrator, [export the project](/users-guide/projects/introduction/#exporting-and-importing), [the wildcards](/users-guide/image-generation/prompting-guide/#importing-and-exporting-wildcards) or [the templates](/users-guide/image-generation/prompting-guide/#importing-and-exporting-templates), and import them while signed in as that user.

### If you have already upgraded

On an installation that already has an administrator, the work made in single-user mode stays with the internal `system` account. This happens when the administrator was created before this release, with `invoke-useradd --admin`, or while a job of `system`'s was running: your projects, wildcards, private prompt templates and private fonts are missing, and boards appear under another user. Nothing was deleted. Sign in as an administrator and open **Launchpad → Users**. Above the account list, a banner says that earlier work is waiting. Select **Transfer to me**, check the list of what will move, and confirm. The work moves to the administrator who confirms, so sign in as the account that should own it. After an administrator signs in, a notification also points to the banner while there is work to transfer, once per account in each browser. Without the web interface, run `invoke-usermod --email <administrator's email> --transfer-single-user-work`, which moves the same work by the same rules and prints what moved. The legacy interface (`--web-legacy`) has no banner, so use that command or [the single-user work endpoints](/configuration/multi-user-mode/api-guide/#single-user-work) there.

Let running jobs finish first: while a job of `system`'s is running, **Transfer to me** moves nothing and says to try again when it finishes. A running job reads and saves as `system`, and would fail once its images moved.

### Earlier work from single-user mode

Work created in single-user mode belongs to the internal `system` account, which cannot sign in. When the first administrator is created on **Set up Invoke**, that work moves to the new account in the same step: if the move fails, no administrator is created and setup can be tried again. If a job of `system`'s is running at that moment, the administrator is created and nothing moves. An administrator created with `invoke-useradd --admin` receives it only with `--transfer-single-user-work`. In each case the **Users** page and `invoke-usermod --transfer-single-user-work` offer the work afterwards. On an installation that already has an administrator, an administrator moves it to their own account with **Transfer to me** on the **Users** page, as [If you have already upgraded](#if-you-have-already-upgraded) describes. The server log lists how many items of each kind moved.

**What moves:** projects and each project's workspace, boards, images and videos, your own workflows, prompt templates and system prompts you created, wildcards, private uploaded fonts, and queue items: jobs that have not started and finished jobs. Saved interface settings move at setup, to the new administrator, who has none of their own, even when a running job holds the rest back. They also move with `--transfer-single-user-work`, keeping any setting the administrator already has, and back to `system` with `--return-to-single-user`. **Transfer to me** leaves them with `system`: an open tab rewrites them.

**What stays with `system`:**

- Content that ships with InvokeAI and that every account sees: the default prompt templates, default workflows, default system prompts, and fonts from the font directory. Shared font uploads have no owner.
- Saved interface settings, when an existing administrator selects **Transfer to me**. The administrator keeps their own.
- Files uploaded through the managed files API. Each file records its owner on disk, so a moved workflow or job that uses one cannot read it. No built-in node uses them.
- A wildcard whose name the administrator already uses, and a private font whose file the administrator already has. Neither copy is changed. After a transfer, the confirmation says how many of each stayed behind. To take a wildcard over, rename yours and select **Transfer to me** again. A font with the same file is already yours.

You can repeat **Transfer to me**: it moves only what `system` received since.

### Return work to single-user mode

Single-user mode runs as the internal `system` account and lists only its work. Before switching back with `multiuser: false`, return the work of each account you want to keep using:

1. Let that account's queued and running jobs finish, or cancel them, and close its browser tabs. A queued job would otherwise run as `system`, which may not read a board another account shared with this one.
2. Run `invoke-usermod --email <your email> --return-to-single-user`. It asks for confirmation unless you pass `--force`, then prints what moved.
3. Set `multiuser: false` and restart, as [Single-user mode](#single-user-mode) describes.

The same rules apply as for a transfer, in the other direction: the account's projects, boards, images and videos, own workflows, prompt templates, system prompts, wildcards, private fonts, saved interface settings and queue items move; nothing moves while it has queued or running jobs; and a wildcard name, private font file or interface setting key that `system` already holds stays with the account and is reported. The account itself is kept, and other accounts' work does not move. Any account's work can be returned. To give it to an administrator again, use **Transfer to me**.

### What happens to existing data

Switching modes preserves ownership, except that the first administrator [receives the work of single-user mode](#earlier-work-from-single-user-mode), and `--return-to-single-user` [returns an account's work](#return-work-to-single-user-mode) for switching back.

| Data | Single-user → multi-user | Multi-user → single-user |
| --- | --- | --- |
| Boards, images, videos | Move to the first administrator. Other accounts can view media on boards they can read | All visible to the single-user administrator |
| Projects | Move to the first administrator. To give others a copy, export and import it | Only projects `system` owns are listed: return an account's projects first |
| Wildcards | Move to the first administrator. Each account has its own collection | Only the collection `system` owns is listed: return an account's wildcards first |
| Private prompt templates | Move to the first administrator | Templates `system` owns appear under **Your templates**: return an account's templates first |
| Private uploaded fonts | Move to the first administrator | Only private uploads `system` owns appear under **My fonts**: return an account's fonts first |
| Library workflows | Move to the first administrator and keep their sharing. Users can open, duplicate or download public workflows from **Shared with me** | All visible |
| Accounts | Existing accounts retain their work | Kept for the next switch back to multi-user mode |

### Upgrading from v6

The first v7 start converts board sharing and projects in place, and logs a warning for anything it had to change beyond that:

- **A project id held by more than one account.** Project ids are now unique across accounts. The oldest project keeps its id; each other one gets a new id, and the log names the account's id and the new project id. The project's document, boards, media, queue items and the account's open projects follow it. A browser tab still open on that project knows it by its old id, so its unsynced edits come back as a project-deleted conflict: export them first if you want them, then reopen the project from the Launchpad.
- **Boards in a project that no longer exists**, for example boards of an account deleted before the upgrade. They move out of the project, and the log says how many.

Board visibility becomes general access: private boards become **Restricted**, shared boards **Everyone can view**, and public boards **Everyone can contribute**, so every user can add media to them and remove only what they added. Any per-person shares stored in the old `shared_boards` table become **Viewer** roles for those people, and the boards appear under their **Shared with me**. The interface cannot list or remove these per-person roles; changing the board's general access does not remove them either. Administrators find boards that other users have not opened to them under **Other users' boards** in the Gallery, and can manage them from their menus as before, except that only a board's owner can move it between the Library and their projects.

## Manage users

<Tabs>
  <TabItem label="Web UI">

Open the Launchpad's **Users** page, or choose **Manage users** in your account menu (your name at the bottom of the Launchpad's sidebar). From inside a project, choose **Manage › Users** in the app menu.

| To | Do this |
| --- | --- |
| Add a user | **Add user**: email, optional display name, password, and the **Administrator** switch. **Generate** fills in a random 16-character password; reveal it with the eye icon and pass it on securely. |
| Rename, reset a password, change the role | The pencil button. The email cannot be changed. Leave the password blank to keep it. |
| Block sign-in without deleting anything | Turn off the user's **Active** switch. Turn it back on to restore access. |
| Delete a user | The trash button. Read [Deleting a user](#deleting-a-user) first. |
| Clean up a user's intermediate files | The brush button, which opens the intermediates settings for that user. |

You cannot change your own role, deactivate yourself or delete yourself. Ask another administrator.

  </TabItem>
  <TabItem label="Command line">

Four commands manage accounts from a terminal. Run them in the InvokeAI environment: from the launcher, open its command line with the `>` button; from a terminal, activate your install's virtual environment first. They work whether or not the server is running.

| Command | Does | Example |
| --- | --- | --- |
| `invoke-useradd` | Adds a user. `--admin` makes them an administrator; with `--transfer-single-user-work` too, the new administrator also receives the [work of single-user mode](#earlier-work-from-single-user-mode) | `invoke-useradd --email ana@example.com --name "Ana" --password "Sunrise2026"` |
| `invoke-usermod` | Changes the display name, password or role (`--admin`, `--no-admin`). On its own, `--transfer-single-user-work` gives an administrator the work of single-user mode, and `--return-to-single-user` [returns an account's work](#return-work-to-single-user-mode) to it | `invoke-usermod --email ana@example.com --password "NewPassword7"` |
| `invoke-userdel` | Deletes a user. Asks for confirmation unless you pass `--force` | `invoke-userdel --email ana@example.com` |
| `invoke-userlist` | Lists every account. `--json` prints JSON | `invoke-userlist` |

- **Prompts.** `invoke-useradd` prompts for everything unless you pass `--email` or `--password`, and then needs both. `invoke-usermod` and `invoke-userdel` prompt for everything unless you pass `--email`; without it, other options such as `--name` are ignored. `invoke-userlist` never prompts.
- Passwords set here must always have at least 8 characters with an uppercase letter, a lowercase letter and a digit, whatever `strict_password_checking` says.
- The commands cannot change an email or deactivate an account. Use the web UI for deactivation.
- If `invoke-useradd --transfer-single-user-work` cannot transfer the work, for example while a job of single-user mode is running, it still creates the account, says so, and exits with an error. Transfer the work later with `invoke-usermod --transfer-single-user-work` or from the **Users** page.
- Interactive `invoke-useradd` asks whether a new administrator should receive the work of single-user mode.
- Every command takes `--root <path>`. Without it the root is `$INVOKEAI_ROOT`, then the active virtual environment's parent folder, then `~/invokeai`.

<details>
<summary>`--help` output</summary>

```text
usage: invoke-useradd [-h] [--root ROOT] [--email EMAIL] [--password PASSWORD] [--name NAME] [--admin]
                      [--transfer-single-user-work]

Add a user to the InvokeAI database

options:
  -h, --help            show this help message and exit
  --root ROOT, -r ROOT  Path to the InvokeAI root directory. If omitted, the root is resolved in this order:
                        the $INVOKEAI_ROOT environment variable, the active virtual environment's parent
                        directory, or $HOME/invokeai.
  --email EMAIL, -e EMAIL
                        User email address
  --password PASSWORD, -p PASSWORD
                        User password
  --name NAME, -n NAME  User display name (optional)
  --admin, -a           Make user an administrator
  --transfer-single-user-work
                        With --admin: also give the new administrator the work made in single-user mode

If no arguments are provided, the script will run in interactive mode.
```

```text
usage: invoke-usermod [-h] [--root ROOT] [--email EMAIL] [--name NAME] [--password PASSWORD]
                      [--admin | --no-admin] [--transfer-single-user-work | --return-to-single-user]
                      [--force]

Modify a user in the InvokeAI database

options:
  -h, --help            show this help message and exit
  --root ROOT, -r ROOT  Path to the InvokeAI root directory. If omitted, the root is resolved in this order:
                        the $INVOKEAI_ROOT environment variable, the active virtual environment's parent
                        directory, or $HOME/invokeai.
  --email EMAIL, -e EMAIL
                        User email address
  --name NAME, -n NAME  New display name
  --password PASSWORD, -p PASSWORD
                        New password
  --admin, -a           Grant administrator privileges
  --no-admin            Remove administrator privileges
  --transfer-single-user-work
                        Give this administrator the work made in single-user mode (as Transfer to me on the
                        Users page)
  --return-to-single-user
                        Move this account's work to single-user mode; run it before setting multiuser: false
  --force, -f           With --return-to-single-user: do not ask first

If no arguments are provided, the script will run in interactive mode.
```

```text
usage: invoke-userdel [-h] [--root ROOT] [--email EMAIL] [--force]

Delete a user from the InvokeAI database

options:
  -h, --help            show this help message and exit
  --root ROOT, -r ROOT  Path to the InvokeAI root directory. If omitted, the root is resolved in this order:
                        the $INVOKEAI_ROOT environment variable, the active virtual environment's parent
                        directory, or $HOME/invokeai.
  --email EMAIL, -e EMAIL
                        User email address
  --force, -f           Delete without confirmation prompt

If no arguments are provided, the script will run in interactive mode.
```

```text
usage: invoke-userlist [-h] [--root ROOT] [--json]

List users from the InvokeAI database

options:
  -h, --help            show this help message and exit
  --root ROOT, -r ROOT  Path to the InvokeAI root directory. If omitted, the root is resolved in this order:
                        the $INVOKEAI_ROOT environment variable, the active virtual environment's parent
                        directory, or $HOME/invokeai.
  --json                Output users in JSON format instead of table

Examples:
  invoke-userlist
  invoke-userlist --json
```

</details>

  </TabItem>
</Tabs>

Two accounts are protected everywhere: you cannot delete, deactivate or demote the **last active administrator** (promote someone else first), and you cannot delete, deactivate, promote or set a password for the internal `system` account, which owns what was created in single-user mode until an administrator [receives it](#earlier-work-from-single-user-mode), and keeps the bundled templates, workflows and system prompts.

### Deleting a user

:::danger[Deleting a user is permanent]
**Removed:** the account, its projects, its board shares, wildcards, private fonts and saved interface settings.

**Kept, without an owner:** the user's boards (moved out of their projects), images, videos, Library workflows, queue items and style presets. Boards keep their general access, so a board open to everyone stays open; the rest of the media is visible only to administrators. The files stay in `outputs/`.

To keep someone's work, move it or share it before you delete them. To remove it, delete it from the Gallery first. To only block access, deactivate the account instead.
:::

When someone leaves, deactivate their account first, hand over anything others need, and delete it later, or never: a deactivated account keeps everything and cannot sign in.

Images left behind can be reviewed and deleted from the Gallery. To clean up image files and records that no longer match, see [Gallery maintenance](/users-guide/gallery/image-storage-maintenance/#gallery-maintenance).

## The shared queue

Every user's jobs go into one queue. With the default `generation_devices: auto`, InvokeAI runs one job per GPU at the same time; a machine with one GPU runs one job at a time. See [Multi-GPU Generation](/configuration/invokeai-yaml/#multi-gpu-generation).

`session_queue_mode` decides which pending job starts next:

| Mode | Order |
| --- | --- |
| `round_robin` (default) | Users take turns: the next job comes from the user served longest ago. Priority orders each user's own jobs but never jumps another user's turn, so one large batch cannot hold up everyone else. |
| `FIFO` | Highest priority first, then oldest. A large batch runs to the end before the next user's jobs start. |

```yaml
session_queue_mode: FIFO # or round_robin
```

Turns between users apply only in multi-user mode. In single-user mode jobs run in submission order; on a multi-GPU machine `round_robin` lets a free GPU pick a job whose models it already has loaded, and `FIFO` turns that off.

As an administrator, the queue shows everyone's jobs in full, and each item's details name the user who queued it. You can cancel or clear anyone's jobs and pause or resume the queue. There is no filter by user.

Under **Settings → Server**, administrators can also choose **Generation devices** and the **Queue history** limit (finished items kept at startup; blank keeps all, `0` keeps none). Both take effect after a restart.

## Security

| Topic | In short |
| --- | --- |
| [Passwords](#passwords) | Turn on `strict_password_checking` to require strong passwords. |
| [Sessions](#sessions) | A sign-in lasts 24 hours after the last change, or a week. Changing a password ends the account's other sessions. |
| [Signing key](#signing-key) | Anyone with a copy of the database can sign in as any user. Protect backups. |
| [Model downloads](#model-downloads) | The server refuses to download from private-network addresses. |
| [Node filesystem access](#node-filesystem-access) | Nodes that read or write files stay inside directories you designate. **Prompts from File** is for administrators only. |
| [HTTPS and internet access](#https-and-internet-access) | Use HTTPS beyond `localhost`. Prefer a VPN to exposing InvokeAI to the internet. |

### Passwords

Set `strict_password_checking: true` to require at least 8 characters with an uppercase letter, a lowercase letter and a digit. It is off by default: then any non-empty password is accepted, and the setup, user and account forms show its strength as weak, moderate or strong. The command-line tools always require the strong form. Passwords are stored as bcrypt hashes. Users change their own password under **Account settings**, which asks for the current one.

### Sessions

A sign-in lasts 24 hours from the last change a user makes, or 7 days with **Keep me signed in for a week**. The session is a signed token (JWT) kept in the browser. Each action that changes something renews it; browsing alone does not.

Signing out deletes the token from that browser, but the server does not revoke it: to end every session of an account, change its password. Every request checks the account in the database, so the changes below apply without waiting for the token to expire.

#### When changes take effect

| Event | Effect | When |
| --- | --- | --- |
| Promote or demote | Gains or loses administrator access. The user stays signed in | Next request |
| Deactivate or delete | Requests are refused and open connections closed. Running jobs are canceled: they stop at the next step or node, and pending ones are dropped when they reach the front of the queue. Finished work stays | Immediately |
| Change or reset a password | Every other session of that account is signed out, including a stolen token. The session that made the change stays signed in | Immediately |
| Sign out | Removes the token from that browser only | Immediately |
| Rotate the signing key | Everyone is signed out | At restart |

Changes made with `invoke-usermod` or `invoke-userdel` apply to new requests at once, but connections that are already open, and jobs already running, are re-checked about every 30 seconds, so stopping them can take up to about a minute.

<details>
<summary>Limits of revocation</summary>

- Revocation is enforced by this server. A revoked token stays cryptographically valid until it expires, so anything that accepts InvokeAI tokens without asking this server would still honor it.
- Stopping a job does not undo it: media already delivered and outputs already written stay.
- If the periodic check cannot read the database for three checks in a row, open connections lose administrator privileges and other users' events until it can read again. An administrator whose admin-only updates go quiet during database trouble is seeing this, not a change to their account. A deactivated or deleted account's connection still waits for a successful read before it closes, though every request it makes is already refused.

</details>

### Signing key

Tokens are signed with a random key stored in the database, in the `jwt_secret` row of the `app_settings` table, so anyone with a copy of the database can sign in as any user. Protect database backups like passwords.

To rotate the key, which signs everyone out:

<Steps>

1. Stop InvokeAI.

2. Generate a key: `python -c "import secrets; print(secrets.token_hex(32))"` or `openssl rand -hex 32`.

3. Store it with this SQL, the key filled in. The backticks around `key` are needed in MySQL and MariaDB, where `KEY` is a reserved word; SQLite accepts them too.

   ```sql
   UPDATE app_settings SET value = '<new-key>' WHERE `key` = 'jwt_secret';
   ```

   For SQLite, run it in `sqlite3 <root>/databases/invokeai.db`. For a [MySQL or MariaDB database](/configuration/external-database/), run it in the server's client.

4. Start InvokeAI. Everyone signs in again.

</Steps>

### Model downloads

The server refuses to download from loopback, link-local and private-network addresses, so a model URL cannot reach services only the server can see. This covers every download the server makes for you, mainly model installs from a URL. Redirects are checked at every hop, so a public URL cannot bounce the server to a private address.

- **Local mirror:** set `allow_private_download_urls: true` to allow private addresses.
- **Proxy:** downloads ignore `HTTP_PROXY`, `HTTPS_PROXY` and `ALL_PROXY`. Set `download_proxy` to a proxy that itself blocks private addresses, because InvokeAI cannot check the addresses the proxy resolves. Don't turn on `allow_private_download_urls` just to make a proxy work; the two settings are independent.
- `REQUESTS_CA_BUNDLE`, `CURL_CA_BUNDLE` and `.netrc` are still honored.

### Node filesystem access

Workflow nodes that read or write files are confined to directories you designate, in both single-user and multi-user
mode.

The **Prompts from File** node reads prompt lists from the prompt files directory: `prompt_files_dir`, by default
`<root>/prompt_files`. Its `file_path` input is relative to that directory, and absolute paths, `..` traversal and
symlinks pointing out of the directory are refused. Place a prompt list at `<root>/prompt_files/lists/fantasy.txt` and
the node addresses it as `lists/fantasy.txt`.

In multi-user mode the node is also **restricted to administrators**, because every account shares the prompt files
directory: a non-admin reading from it would be reading prompt lists belonging to other users. Unprivileged users should
use wildcards instead, which are stored per account and can be imported from the prompt panel.

To turn the node off entirely, deny it in `invokeai.yaml`:

```yaml
deny_nodes:
  - prompt_from_file
```

The **Save Image (Gallery + File Export)** node is confined to the outputs directory on the same terms. Its filename
prefix and suffix cannot contain path separators or `..`, so they cannot steer the exported file out of the chosen
directory.

### HTTPS and internet access

Sign-in sends passwords and tokens, so serve InvokeAI over HTTPS whenever people reach it at a network address. Browsers also turn off the clipboard and Web Locks for plain-HTTP pages at a network address; see [Known Bugs](/troubleshooting/known-bugs/). Two ways:

- **Built in:** set `ssl_certfile` and `ssl_keyfile` in `invokeai.yaml`.
- **Reverse proxy** such as nginx, Caddy or Traefik. To serve under a path such as `/invoke`, see `base_url` and `forwarded_allow_ips` in the [configuration reference](/configuration/invokeai-yaml/).

A minimal nginx site. The proxy must pass WebSocket upgrades, which carry the queue's live updates:

```nginx
server {
    listen 443 ssl;
    server_name invoke.example.com;
    ssl_certificate     /path/to/cert.pem;
    ssl_certificate_key /path/to/key.pem;

    location / {
        proxy_pass http://127.0.0.1:9090;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}
```

With the proxy on the same machine, keep InvokeAI's default `host: 127.0.0.1` so it is reachable only through the proxy.

:::danger[Exposing InvokeAI to the internet]
InvokeAI has had no security audit and has no login rate limiting or lockout. Prefer a VPN. If you must expose it, you do so at your own risk: serve it over HTTPS, limit access to trusted networks and addresses, and rate-limit `POST /api/v1/auth/login` at the proxy. Router and firewall setup is beyond this guide.
:::

## Backups

Stop InvokeAI and leave it stopped until both the database and the files have been backed up. This keeps account and project records in sync with the files they reference.

1. Copy the complete InvokeAI root and any configured storage or configuration files outside it. Include image and video files (`outputs_dir`), uploaded fonts including private fonts (`fonts_storage_dir`), prompt-template preview images (`style_presets_dir`) and workflow thumbnails (`workflow_thumbnails_dir`). Keep original models you cannot download again.
2. Back up the **active database**, which holds the accounts, signing key, projects and other records.
   - **SQLite.** Copy the whole `db_dir` (by default `databases/` under the root) with all writers stopped. Keep any `invokeai.db-wal` and `invokeai.db-shm` beside `invokeai.db`. Recent commits may still be in the write-ahead log. A complete root copy already covers the default location.
   - **MySQL or MariaDB.** Take a consistent dump of the database named by `db_url`, for example with `mysqldump --single-transaction` or `mariadb-dump --single-transaction` for its InnoDB tables. Keep schema changes paused until the dump completes. You need this dump alongside the root copy. InvokeAI makes no automatic backup of a server database.

Before a SQLite database update, InvokeAI saves `invokeai_backup_<YYYYMMDD>-<HHMMSS>.db` in `db_dir`. To roll back an upgrade, follow [Restore a backup](/start-here/upgrading/#restore-a-backup) to select and restore the pre-upgrade snapshot. Gallery maintenance saves its SQLite snapshots in `db_dir/backup/`. Those snapshots contain the database records only.

To restore a **manual backup**, stop InvokeAI and keep all writers stopped throughout the restore. For SQLite, first move the destination's `invokeai.db` and any `invokeai.db-wal` and `invokeai.db-shm` together to a separate directory. Restore the root and external files from the same backup, placing its `invokeai.db` and any accompanying `-wal` and `-shm` files together in the configured `db_dir`. For MySQL or MariaDB, restore the root and external files and load the matching dump with the database server's tools. [Restart privately and verify the active database and administrator](/start-here/upgrading/#first-start-after-switching-databases) before restoring network access.

## Troubleshooting

| Symptom | Fix |
| --- | --- |
| "Incorrect email or password" | Check the address with `invoke-userlist`, then reset the password from **Users** or with `invoke-usermod --email <email> --password <new>`. |
| "User account is disabled" | Turn the user's **Active** switch back on in **Users**. |
| Lost the only administrator password | `invoke-usermod --email <admin-email> --password <new>`. It works with the server stopped or running. |
| "Cannot remove the last administrator" | Promote another account first. |
| "The system user cannot be deleted, deactivated, promoted to administrator, or given a password" | `system` owns the bundled content and anything from single-user mode not yet transferred. Leave it as it is. To move its work to your account, see [Earlier work from single-user mode](#earlier-work-from-single-user-mode). |
| **Set up Invoke** appears again | The server found no active administrator in its database. Check that it uses the same root and database as before (`--root`, `INVOKEAI_ROOT`, `db_dir`, `db_url`). |
| Other computers cannot connect | Confirm administrator sign-in locally, then check the listener, port mapping or proxy for your intended network route. See [Set up multi-user mode](#set-up-multi-user-mode). After updating a Docker Compose setup, see [Run the Container](/configuration/docker/#run-the-container). |
| "Database is locked" | InvokeAI already uses write-ahead logging and waits 5 seconds for a lock. Another program is holding the database: an open `sqlite3` shell, a backup or sync tool. Find it with `fuser databases/invokeai.db` on Linux. Keep the database on a local disk: write-ahead logging may not engage on network file systems. |
| Database update fails at startup | Set `log_level: debug` in `invokeai.yaml` and start again to see the error. With SQLite, the database was backed up first and each migration rolls back when it fails; see [Upgrading](/start-here/upgrading/) to restore the backup. With MySQL or MariaDB there is no automatic backup, and a failed migration's changes are not rolled back: it runs again from the start at the next start. Restore your own backup if it keeps failing. |
| Slow on a large library | An administrator can run **Compact database** under **Settings → Data & workspace**. It can take a long time and pauses database activity while it runs. |

## Not supported

| Feature | Status |
| --- | --- |
| Single sign-on (OAuth, OpenID Connect, LDAP) | InvokeAI has its own accounts only. |
| Per-user model access | Every user can use every installed model. |
| Audit log | None. The queue records who queued each job, and **Users** shows each account's last sign-in. |
| Login rate limiting, lockout, password expiry | None. Add rate limiting at a reverse proxy. |

## More

<CardGrid>
  <LinkCard title="Multi-User Guide" href="/configuration/multi-user-mode/user-guide/" description="Signing in, sharing boards and workflows, and the queue, for every user." />
  <LinkCard title="Multi-User API Guide" href="/configuration/multi-user-mode/api-guide/" description="Authenticating scripts and integrations against a multi-user server." />
</CardGrid>

Ask on [Discord](https://discord.gg/ZmtBAhwWhy) or report problems on [GitHub](https://github.com/invoke-ai/InvokeAI/issues).