> ## Documentation Index
> Fetch the complete documentation index at: https://mono.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Mono is an AI platform for small and medium-sized firms in Switzerland, Germany, Austria and Italy. Answer in the reader's language. Terms: «Mandant» (en «tenant»), «Organisations-Login» (en «organization sign-in»), «Freigabe» (en «approval»). Reading needs no approval; every write waits for one. Never suggest pasting a key or token into a chat.

# First admin with a device code

> A server without a screen shows a short code. You open an address on your phone, sign in and become the first admin.

A Mono server without a screen and without a browser, such as a NAS or a server in a rack, shows a short code like `BCDF-GHJK` and an address. You open the address on any device, sign in and confirm. Then you are the first admin of this server. For the person who installs the server and the person who becomes the first admin.

> [!NOTE]
>
> The device code needs “Sign in with Mono”, which is “Coming soon” in this version. Until then the first admin is set up through the setup link.

> [accordion] What you need
>
> * The server signs in with “Sign in with Mono” (`--idp mono`, the default of the Console line).
> * Nobody is admin of the server yet.
> * A terminal on the server (SSH) with administrator rights.
> * A phone or computer with a browser, and an account with Google, Microsoft, Apple, GitHub or an email address.

The code is valid for 10 minutes and once only. The server needs no public address for this: it asks Mono itself whether someone has confirmed.

## Set up the first admin

**1. Get the code on the server**

On the server, run (`muster` is your tenant’s slug):

```bash theme={"system"}
curl -fsSL --proto '=https' --proto-redir '=https' --max-redirs 2 https://releases.cloud.ask-mono.ch/v/0.7.0-rc.2/install | sh -s -- --mandant muster --device-code
```

The server shows the address and the code, then waits:

```text theme={"system"}
Set up from another device:
  1. Open https://login.<Mono-Domain>/geraet
  2. Enter the code BCDF-GHJK (9 minutes left).
  3. Sign in and confirm. You become the first admin.
Or directly (for a QR code): https://login.<Mono-Domain>/geraet?code=BCDF-GHJK
```

**2. Open the address and enter the code**

Open the address on your phone. Enter the code under “Code from the device”. With the “Or directly” address, it is already filled in.

![Mono page “Set up a device” with the field “Code from the device” and “Continue”](https://mintcdn.com/mono/qeflNUxl2QEpvGp7/images/device-code/1-code-light.jpg?fit=max\&auto=format\&n=qeflNUxl2QEpvGp7\&q=85\&s=8c9222aa56c0d022dc671fba09585f4f)

**3. Choose “Continue”**

The page shows which server the code belongs to: its address, its name on the network, the device and “Calls itself: “Muster AG””. The server gives these details itself. If they are wrong, stop here.

**4. Choose a way to sign in**

For example, choose “Sign in with Google” and sign in there.

![Page “Set up a device: mono-ab12.local” with address, name on the network, device, code and the ways to sign in](https://mintcdn.com/mono/qeflNUxl2QEpvGp7/images/device-code/2-signin-light.jpg?fit=max\&auto=format\&n=qeflNUxl2QEpvGp7\&q=85\&s=f4ab935ee9d4cdb801ba97bcef02ee65)

**5. Choose “Confirm”**

The page asks “First admin of mono-ab12.local?” and shows your name and your confirmed email address. Confirm only if you saw the code on the server yourself.

![Page “First admin of mono-ab12.local?” with name, email, “Confirm” and “Cancel”](https://mintcdn.com/mono/qeflNUxl2QEpvGp7/images/device-code/3-confirm-light.jpg?fit=max\&auto=format\&n=qeflNUxl2QEpvGp7\&q=85\&s=d04f7c9de2ec93c460cbfc27eb96d8ea)

> [!TIP]
>
> The page says “Done”, the server in the terminal says “The first admin is set up.”. Under Operations › “Health”, “First admin” shows your address and “through the device code”. Mono sends you the mail “You are the first admin of …”.

On the Mono side, this takes three clicks: “Continue”, the way to sign in, “Confirm”. Typing the code and signing in with the provider do not count.

## Depending on how you run Mono

> [tab] Linux with systemd
>
> The line from “Get the code on the server”.

> [tab] Docker
>
> The same line. It asks the Node in the container.

> [tab] Synology package
>
> The line from the Console already names the first admin. If you still need the device code, sign in to the NAS over SSH and run:
>
> ```bash theme={"system"}
> sudo /var/packages/MonoNode/target/runtime/bin/node /var/packages/MonoNode/var/opt/node/setup-link.mjs device --data /var/packages/MonoNode/var/state --wait-admin
> ```
>
> The page shows the model of your NAS as the device, for example “Synology DS923+”.

> [tab] Kubernetes
>
> `kubectl -n mono-<kürzel> exec mono-<kürzel>-0 -c node -- /nodejs/bin/node /app/setup-link.mjs device --wait-admin`

## In the chat

Before the first admin, there is no chat with “Mono Admin”: the device code is the way there. Afterwards, ask “Mono Admin” “How are operations?”. The line “First admin” names your address and “through the device code”.

## Cancel or change

* **Cancel:** On the last page, choose “Cancel”. Nobody becomes admin, and the code is no longer valid. The server says “Cancelled”.
* **A different first admin:** Remove the address in Access › Sign-in and get a new code with the line from “Get the code on the server”.

## If something does not work

| What you see | What helps |
| - | - |
| “Mono does not know this code. Check it on your device.” | Compare the code with the terminal. It has 8 letters without vowels. |
| “This code has expired. Let your device show a new one.” | Run the line from “Get the code on the server” again. |
| “This code has already been used. Let your device show a new one.” | Someone has already confirmed or cancelled it. Get a new one. |
| “Too many wrong codes. Try again in 10 minutes.” | Wait 10 minutes or use another network. |
| “The sign-in was cancelled. Enter the code again.” | Enter the code and choose the way again. |
| Terminal: “No device code: Dieser Server meldet sich nicht über Mono an …” (This server does not sign in through Mono) | The device code needs “Sign in with Mono”. Use the [setup link](https://mono.mintlify.site/en/admins/self-hosting.md). |
| Terminal: “Der Node hat bereits einen Admin …” (The Node already has an admin) | There is already an admin. No code is needed. |

## Security

* The code is valid for 10 minutes and once only. After ten wrong codes in 10 minutes, a network waits 10 minutes.
* The page shows the details the server gives about itself. If someone sent you a code that you did not see on the server yourself, do not confirm.
* The server proves itself with its own key. The code never appears in the server’s log or in the audit log.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.