# First run: your admin account

> Create the first admin of a new Frame server with the one-time setup link from the log, turn on two-factor authentication, and add more admins.

Source: https://crow.sg/apps/frame/docs/first-run/

A new Frame server has no admin. On every start while that is true, it writes a one-time link to its log. The account you create with it is your normal Frame account and also the admin of the web panel at `/admin/`.

## Find the setup link

```text output
Create your admin account: https://frame.example.com/admin/setup#t=…
```

| Setup | Find the link |
|---|---|
| Linux installer (systemd) | `sudo journalctl -u frame \| grep "admin account"` |
| Docker Compose | `docker compose logs frame \| grep "admin account"` |
| A fresh link | `sudo frame-admin setup-link` or `docker compose exec frame frame-server admin setup-link` |

With the Caddy setup, add `-f docker-compose.caddy.yml` after `docker compose`. Each new link replaces the previous one.

- The link works **once** and expires after **24 hours**. The token is in the `#` part of the URL, which browsers never send to servers or proxies, and the server only stores a hash of it.
- The link uses `FRAME_ADMIN_LISTEN`'s address when that is set, else `FRAME_PUBLIC_URL`, else `http://localhost:<port>`: replace the host with however you reach the server.

## Create the account

Open the link and choose your name, a username, an e-mail address or phone number, and a password. Then:

1. Sign in to the Frame app with the same details (see [Connect the apps & invite](https://crow.sg/apps/frame/docs/connect/)).
2. In the panel, open **Security** and turn on two-factor authentication with an authenticator app such as Aegis, 1Password or Google Authenticator. Keep the eight recovery codes somewhere safe. The panel reminds you until you do.
3. Open **Invites → New invite** to get a link and QR code for each friend, or invite friends from the app.

Prefer the command line? This creates an admin account and prints a one-time password instead:

```sh
sudo frame-admin user create --email you@example.com --name "Your Name" --admin
```

With Docker: `docker compose exec frame frame-server admin user create --email you@example.com --name "Your Name" --admin`.

## More admins

Open a user in the panel and choose **Make admin**, or run `sudo frame-admin user promote <username>`. `demote` removes admin rights again; the last admin can't be removed.

## Locked out?

- **No admin yet and the link is lost:** `sudo frame-admin setup-link` prints a fresh one.
- **Forgot your password:** `sudo frame-admin user reset-password <you>` prints a one-time password.
- **Lost your authenticator and recovery codes:** `sudo frame-admin user reset-2fa <you>`.
- **Your account isn't an admin:** `sudo frame-admin user promote <you>`.

With Docker, use `docker compose exec frame frame-server admin …` for each of these.
