> ## 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.

# Run Mono on Kubernetes

> Run a Mono Node in a cluster with the mono-node Helm chart: one Pod, a volume for the state and one for the backups, the first admin through the setup link.

On Kubernetes, every Node is a Helm release of the `mono-node` chart in its own namespace. It runs as one Pod with a volume for its state, because a Node has exactly one writer for its state, and a second volume `mono-<short name>-backups` for its own backups.

> [accordion] What you need
>
> * A cluster with Kubernetes 1.29 or later and a CSI StorageClass, for example k3s or Talos Linux on Raspberry Pis.
> * A Linux machine with `kubectl` and `helm` 3.14 or later that reaches the cluster. By hand, also `cosign` 2.6 or later.
> * A way to reach the Node from the internet: the key for Mono Edge from Mono, or your own Cloudflare or Tailscale account. Without the key, the installer shows “Mono Edge · Coming soon”; without Mono’s sign-in relay, “Sign in with Mono · Coming soon”, and the first admin uses a passkey through the setup link.
> * By hand: the Node’s settings file with its secret values, and your tunnel’s token.
> * For an IT partner’s Nodes, `pnpm mono render` writes the values, the settings file and the steps for each Node from a topology.

```mermaid theme={"system"}
flowchart LR
  subgraph ns[Namespace mono-muster]
    subgraph pod[Pod mono-muster-0]
      N[Node] --- T[Tunnel as sidecar]
    end
    pod --- V[(State, one writer)]
    pod --- B[(Backups)]
  end
  T -- outward only --> E[Your tunnel: Cloudflare or Tailscale]
```

## With one line from the Console

From Mono 0.4.3, the Console shows the “Installation in the cluster” line under “Start new” › “Self-Hosting” › “Kubernetes”. It runs on a Linux machine with `kubectl` and `helm`, without `sudo`:

```bash Linux with kubectl and helm 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 -- --kubernetes --name 'Muster AG' --slug muster --signin-admins anna.keller@example.ch --storage-class local-path
```

The line verifies the signed release and the chart, stores the settings and the tunnel’s token as Secrets in the namespace `mono-<short name>` and installs the chart with the image by digest. The person under `--signin-admins` becomes admin at their first sign-in, without a setup link, but only where a way in can confirm their address (“Sign in with Mono” or your organization’s sign-in). With passkeys only, the installer says that it does not enter the address, and the first admin uses the setup link. With an address reserved at Mono Edge, the line also contains the one-time code, see [Self-hosting from the Console](https://mono.mintlify.site/en/admins/self-hosting-from-console.md). On macOS, the line refuses. Without options, the installer asks in this order: “Tenant”, “What is your organisation called?”, “Country”, “Language”, “Way” (with what that way needs, for example “Tailnet machine name” or “Cloudflare tunnel token”), “Sign-in” and “E-mail address of the first admin (Enter: setup link)”. The lines here install 0.7.0-rc.2, the newest released version. Without a version (`https://releases.cloud.ask-mono.ch/install`) the line installs the newest stable version; you choose another version with `https://releases.cloud.ask-mono.ch/v/<version>/install`.

Run the same line again to change one value, for example `--console-origins`: it keeps every saved answer, including the StorageClass of the volume, and asks only what is missing. A StatefulSet never changes its volume; if you name another `--storage-class`, the installer stops before anything changes and says which one the volume uses. With `--tunnel local`, nothing reaches the Pod from the network: open it with `kubectl -n mono-muster port-forward pod/mono-muster-0 8787:8787`, and Claude.ai and ChatGPT cannot reach it. If port 8787 is taken on your machine, use another local port, for example `18787:8787`, and open `http://127.0.0.1:18787`. After the Pod restarts, start the port-forward again.

## Install the Node by hand

**1. Verify the release**

Download the chart `mono-node-chart-<version>.tgz` and the index `mono-node-<version>.index.json` with their signatures from the release host. Verify both with `cosign verify-blob`. The steps that `pnpm mono render` writes for each Node contain the exact commands. The SHA-256 of the index is the image’s digest.

**2. Create the namespace and secrets**

```bash Kubernetes theme={"system"}
kubectl create namespace mono-muster
kubectl label namespace mono-muster pod-security.kubernetes.io/enforce=restricted
kubectl -n mono-muster create secret generic mono-muster-settings --from-file=node.env=./node.env
kubectl -n mono-muster create secret generic mono-muster-tunnel --from-file=token=./tunnel-token
```

**3. Install the chart**

```bash Helm theme={"system"}
helm upgrade --install mono-muster "mono-node-chart-$V.tgz" -n mono-muster --wait \
  --set mandant=muster --set image.repository=releases.cloud.ask-mono.ch/mono-node \
  --set image.tag="$V" --set image.digest=sha256:<from the index> --set tunnel.kind=edge \
  --set storage.storageClass=local-path
```

**4. Set up the first admin**

You get the setup link (The one-time link with which the first person becomes admin of a new Node.) from the Pod. It is valid for 60 minutes and for one use.

```bash Kubernetes theme={"system"}
kubectl -n mono-muster exec mono-muster-0 -c node -- /nodejs/bin/node /app/setup-link.mjs
```

Give the link to exactly the person who becomes admin. Whoever signs in with it first becomes the first admin. Each run of this command gives a new link; the previous one, also the one the installer printed, stops working.

> [!TIP]
>
> `kubectl -n mono-muster port-forward pod/mono-muster-0 8787:8787` and `curl -fsS http://127.0.0.1:8787/readyz` report `"ready":true`. The first person is admin.

## What is different on Kubernetes

| Topic | In the cluster |
| - | - |
| Writer | A StatefulSet with one Pod and one `ReadWriteOnce` volume for the state (5 GiB by default). No cold standby, no active-active. |
| Access | No Service, no Ingress. A NetworkPolicy denies all inbound traffic. The tunnel runs as a sidecar in the same Pod. |
| Security | Pod Security “restricted”: no root, read-only file system, no capabilities. |
| Updates | By hand. Operations › Updates shows them as manual. |
| Backup | Mono backs the Node up itself every night into the second volume `mono-<short name>-backups` (5 GiB by default) and tests the restore every week. |

> [accordion] Updates by hand
>
> Verify your ring’s release as above, then run `helm upgrade` with the new `image.tag` and `image.digest`:
>
> ```bash theme={"system"}
> helm upgrade mono-muster "mono-node-chart-$V.tgz" -n mono-muster --wait --reset-then-reuse-values \
>   --set image.tag="$V" --set image.digest=sha256:<from the index>
> ```
>
> `--reset-then-reuse-values` keeps your values and adds the new chart’s defaults. With `--reuse-values`, a value that only the new chart knows is missing, and the update stops.
>
> You go back with `helm rollback mono-muster -n mono-muster`, but only where the release notes allow it. Operations › “Sites” updates a Mono Connector in the cluster with “Update by hand” and the exact line.

> [accordion] Backups
>
> Mono backs the Node up itself every night, encrypted and in generations, into the volume `mono-<short name>-backups`, and tests the restore every week. The “Backups” box in Operations shows when it last ran. Both volumes are kept when you remove the release. For a copy outside the cluster, snapshot the backups volume with a CSI VolumeSnapshot or Velero; that needs a StorageClass with snapshots, such as Longhorn (`local-path` has none). On Talos, use the local-path-provisioner or Longhorn, never `hostPath`. To bring a backup back, see [Backups](https://mono.mintlify.site/en/admins/backups.md) › “Bring one back without mono-update”.

> [accordion] Change settings
>
> Change the settings file in the Secret and restart: `kubectl -n mono-muster rollout restart statefulset/mono-muster`.

> [accordion] Address changed or passkey lost
>
> A passkey works only at the address it was made for. You change the Node's address in the settings file in the Secret and restart, as under “Change settings”. If the first admin signs in with a passkey, this line then prints a recovery link for a new one. The same line helps when they lost their passkey.
>
> ```bash theme={"system"}
> kubectl -n mono-muster exec mono-muster-0 -c node -- /nodejs/bin/node /app/setup-link.mjs request --recover
> ```
>
> The link is valid for 60 minutes and once, and only while that person is the only admin. Their earlier passkeys stop working then. If there is another admin, that admin signs in.

> [accordion] A Mono Connector in the cluster
>
> Under Operations › “Add” › “Pair a device at a site” there is the “Kubernetes” tab. Save the file as “mono-connector.yaml” and run `kubectl apply -f mono-connector.yaml`. The model server needs an address on the network, because 127.0.0.1 inside the Pod is the Pod itself.

> [accordion] If something does not work
>
> | What you see | What helps |
> | - | - |
> | `/readyz` reports `state: data_dir_not_writable` | The volume is read-only or belongs to someone else. Check the StorageClass. |
> | `/readyz` reports `idp: placeholder_left` | The settings file still contains a `<…>`. Replace it in the Secret and restart. |
> | “This setup link is not valid” | Get a new one with `setup-link.mjs`. |
> | “Something is still missing for Kubernetes” when pairing | The Node needs a container image, and the model server an address on the network. |
> | `helm upgrade` reports `UPGRADE FAILED: template: mono-node/templates/statefulset.yaml:81:26: … <.Values.ca.configMap>: nil pointer evaluating interface {}.configMap` | The update ran with `--reuse-values`. Nothing changed on your server. Run the same command again with `--reset-then-reuse-values` instead of `--reuse-values`. |

## Next

> [card] [Mono on your own hardware](https://mono.mintlify.site/en/admins/self-hosting.md)
>
> Docker, Linux, Raspberry Pi and GB10.

> [card] [Many Nodes from one topology](https://mono.mintlify.site/en/partners/topology.md)
>
> Values and steps with pnpm mono render.

> [card] [Health and diagnosis](https://mono.mintlify.site/en/admins/health-and-diagnosis.md)
>
> The codes of /readyz.

> [card] [Control updates](https://mono.mintlify.site/en/admins/updates.md)
>
> What Operations › Updates shows.


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