Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
docs: sign in with openmausbot login; the account moves to account login
milind-sonic89d6d7843c5
diff --git a/README.md b/README.mdindex 35fff6f617..59f51944ec 100644--- a/README.md+++ b/README.md@@ -532,7 +532,7 @@ For a server on a VPS or an always-on computer, run `npx openmausbot serve`with one way in: `--public-url` behind your own cloudflared, Caddy or nginx,`--domain` for a certificate on your own domain, `--tailscale` for yourtailnet, `--lan` for this network only, or `--tunnel` (after-`npx openmausbot login`) for a free MausBot web address. It prints one+`npx openmausbot account login`) for a free MausBot web address. It prints onepairing link; paste it into the desktop app under **+ → Connect to aserver**. The short path for each install method (npx, Docker, a service) isat the top of [docs/self-hosting.md](docs/self-hosting.md); a server fromdiff --git a/SECURITY.md b/SECURITY.mdindex 3c8dcf019b..7e665e945c 100644--- a/SECURITY.md+++ b/SECURITY.md@@ -25,6 +25,13 @@ You'll get a response as soon as possible, normally within a few days.guarded routes, so a bot's shell can post into an existing Full-access thread, or open one whileshared Full access is on, and get Full-access work done without a card. A worker-only relay tokenis the planned fix.+- `openmausbot login` asks through `POST /api/auth/cli-login`, which needs no session and grants+ nothing: only Allow in the owner's or an admin's window (an admin route behind the same gate)+ mints a session, and the terminal collects it once with a secret only it holds. A way to get a+ session from that route without a person pressing Allow is a vulnerability. Any program here,+ a bot's shell included, can ask, so the matching code on the card is the person's check. The+ saved session is in the macOS Keychain or a 0600 file, which a bot with Full access, running as+ the person, can read like any of their files.- API keys live in `~/.openmausbot/config.json` and are write-only through the API (`configured`booleans out, never values). The packaged desktop app keeps AI provider and service keys in anOS-encrypted store (`credentials.bin`) instead; OpenCode provider keys, per-engine `environment`diff --git a/apps/docs/content/docs/self-hosting/deploy-vps.mdx b/apps/docs/content/docs/self-hosting/deploy-vps.mdxindex 0694d20b56..3028b7e42b 100644--- a/apps/docs/content/docs/self-hosting/deploy-vps.mdx+++ b/apps/docs/content/docs/self-hosting/deploy-vps.mdx@@ -156,13 +156,13 @@ root, sign in again as `maus`; those accounts have different homes and credentiaNo domain, no proxy, no open port. The server gets an address like `https://c-7f3a9c.openmausbot.com` through a Cloudflare tunnel; only traffic through the tunnel reaches it, and that traffic still has to pair.```sh-npx openmausbot login # once: an emailed code signs this machine in and reserves its address+npx openmausbot account login # once: an emailed code signs this machine in and reserves its addressnpx openmausbot serve --tunnel # runs the server there and prints the pairing link with a QR code````login` asks for your email, sends an 8-digit code, and prints the address it reserved for this machine. `serve --tunnel` downloads `cloudflared` on the first run (a pinned version with a verified digest, into `~/.openmausbot`), starts the server, connects the tunnel, and after a few seconds prints `tunnel: live at https://…`. Leave it running; see "Keep it running" for a service.-The account credentials live in `~/.openmausbot/tunnel-account.json`, readable only by your user. `npx openmausbot logout` releases the address.+The account credentials live in `~/.openmausbot/tunnel-account.json`, readable only by your user. `npx openmausbot account logout` releases the address.Skip to "Install and sign the engines in".@@ -308,7 +308,7 @@ Every paired device is a session:```shnpx openmausbot devices # id, device, scope, last seen, expiresnpx openmausbot devices revoke ID # signs that device out and closes its stream at once-npx openmausbot status # what the server says about itself+npx openmausbot account status # what the server says about itself```## Keep it running@@ -725,11 +725,11 @@ Read this before putting anything else in front of the server.## Troubleshooting-**`serve --tunnel` says "no account on this machine yet".** Run `npx openmausbot login` on this machine first; the credentials are per machine.+**`serve --tunnel` says "no account on this machine yet".** Run `npx openmausbot account login` on this machine first; the credentials are per machine.**The server does not start and says its data "was written by a newer OpenMausBot".** An older version was started on data a newer one had already changed, which happens when a version is put back without its data. Nothing was changed. Install the version the message names (or a newer one), or put back the copy of the data from before that update.-**The tunnel stays on "retrying".** The server is running and usable locally; the public hop is not verified yet. Wait a minute (Cloudflare needs a moment on a fresh address), then check `journalctl`/the terminal for the reason. If it never comes up, `npx openmausbot logout && npx openmausbot login` issues a fresh address.+**The tunnel stays on "retrying".** The server is running and usable locally; the public hop is not verified yet. Wait a minute (Cloudflare needs a moment on a fresh address), then check `journalctl`/the terminal for the reason. If it never comes up, `npx openmausbot account logout && npx openmausbot account login` issues a fresh address.**Path B: the page never loads or shows a certificate error.** Caddy could not get a certificate. Check that the name resolves to the server and that ports 80 and 443 are open; `docker compose logs caddy` shows the reason.@@ -739,7 +739,7 @@ Read this before putting anything else in front of the server.**A bot says the engine is not signed in.** Sign that engine in again on the server.-**What does the server think it is?** `https://<address>/.well-known/openmausbot/environment` is public and shows its id, label, version and capabilities; `npx openmausbot status` prints the same on the server.+**What does the server think it is?** `https://<address>/.well-known/openmausbot/environment` is public and shows its id, label, version and capabilities; `npx openmausbot account status` prints the same on the server.**Something else.** `journalctl -u openmausbot --since -10m` (or `docker compose logs omb --tail 100`) shows the server's startup lines. Paste them with your question in the community channel.diff --git a/apps/docs/content/docs/self-hosting/index.mdx b/apps/docs/content/docs/self-hosting/index.mdxindex 59bec40239..3c12db04a7 100644--- a/apps/docs/content/docs/self-hosting/index.mdx+++ b/apps/docs/content/docs/self-hosting/index.mdx@@ -32,7 +32,7 @@ Add `--check` to only check the server; it changes nothing. Run the command agai| A domain name, ports 80 and 443 open | `npx openmausbot serve --domain maus.example.com` || Tailscale | `npx openmausbot serve --tailscale` || Only this network | `npx openmausbot serve --lan` |-| Nothing at all | `npx openmausbot login`, then `npx openmausbot serve --tunnel` |+| Nothing at all | `npx openmausbot account login`, then `npx openmausbot serve --tunnel` |A code works once, for 10 minutes. `npx openmausbot pair` makes another, and `npx openmausbot devices` lists the paired devices. See [Deploy on a VPS](/docs/self-hosting/deploy-vps) for a server from scratch, and [Networking](/docs/self-hosting/networking).diff --git a/docs/cli-onboarding.md b/docs/cli-onboarding.mdindex b55fe2a809..0b1b540752 100644--- a/docs/cli-onboarding.md+++ b/docs/cli-onboarding.md@@ -64,7 +64,7 @@ The examples below assume a global install; prefix them with `npx` otherwise.| `openmausbot pair` | Create another phone invitation while the configured workspace and HTTPS connection are running. || `openmausbot devices` | List paired devices; `openmausbot devices revoke ID` signs one out. || `openmausbot serve` | Start without onboarding prompts or automatic browser opening; specify remote-access flags explicitly for a service. |-| `openmausbot login` | Sign in to an OpenMausBot account for `--tunnel`; this does not sign in to an AI provider or start the tunnel. |+| `openmausbot account login` | Sign in to an OpenMausBot account for `--tunnel`; this does not sign in to an AI provider or start the tunnel. |`start` accepts the same server options as `serve`, including `--port`, `--data-dir`, `--tailscale`, `--tunnel`, and `--public-url`. Keep using your custom data directory and port when starting or pairing:diff --git a/docs/deploy-vps.md b/docs/deploy-vps.mdindex 69ee4960a8..bfc6696525 100644--- a/docs/deploy-vps.md+++ b/docs/deploy-vps.md@@ -153,7 +153,7 @@ No domain, no proxy, no open port. The server gets an address like `https://c-7f```shnpx openmausbot setup # once: choose AI access, connect, and choose a model-npx openmausbot login # once: an emailed code signs this machine in and reserves its address+npx openmausbot account login # once: an emailed code signs this machine in and reserves its addressnpx openmausbot serve --tunnel # runs the server there and prints the pairing link with a QR code```@@ -163,7 +163,7 @@ chat-only connection. More engines can be added later. See [CLI setup](cli-onboa`login` asks for your email, sends an 8-digit code, and prints the address it reserved for this machine. `serve --tunnel` downloads `cloudflared` on the first run (a pinned version with a verified digest, into `~/.openmausbot`), starts the server, connects the tunnel, and after a few seconds prints `tunnel: live at https://…`. Leave it running; see "Keep it running" for a service.-The account credentials live in `~/.openmausbot/tunnel-account.json`, readable only by your user. `npx openmausbot logout` releases the address.+The account credentials live in `~/.openmausbot/tunnel-account.json`, readable only by your user. `npx openmausbot account logout` releases the address.Skip to "Install and sign the engines in".@@ -292,7 +292,7 @@ Every paired device is a session:```shnpx openmausbot devices # id, device, scope, last seen, expiresnpx openmausbot devices revoke ID # signs that device out and closes its stream at once-npx openmausbot status # the address others use, and whether it answers as this server+npx openmausbot account status # the address others use, and whether it answers as this server```## Keep it running@@ -714,11 +714,11 @@ Read this before putting anything else in front of the server.## Troubleshooting-**`serve --tunnel` says "no account on this machine yet".** Run `npx openmausbot login` on this machine first; the credentials are per machine.+**`serve --tunnel` says "no account on this machine yet".** Run `npx openmausbot account login` on this machine first; the credentials are per machine.**The server does not start and says its data "was written by a newer OpenMausBot".** An older version was started on data a newer one had already changed, which happens when a version is put back without its data. Nothing was changed. Install the version the message names (or a newer one), or put back the copy of the data from before that update.-**The tunnel stays on "retrying".** The server is running and usable locally; the public hop is not verified yet. Wait a minute (Cloudflare needs a moment on a fresh address), then check `journalctl`/the terminal for the reason. If it never comes up, `npx openmausbot logout && npx openmausbot login` issues a fresh address.+**The tunnel stays on "retrying".** The server is running and usable locally; the public hop is not verified yet. Wait a minute (Cloudflare needs a moment on a fresh address), then check `journalctl`/the terminal for the reason. If it never comes up, `npx openmausbot account logout && npx openmausbot account login` issues a fresh address.**Path B: the page never loads or shows a certificate error.** Caddy could not get a certificate. Check that the name resolves to the server and that ports 80 and 443 are open; `docker compose logs caddy` shows the reason.@@ -730,7 +730,7 @@ Read this before putting anything else in front of the server.**A bot says the engine is not signed in.** Sign that engine in again on the server.-**What does the server think it is?** `https://<address>/.well-known/openmausbot/environment` is public and shows its id, label, version and capabilities; `npx openmausbot status` prints the same on the server.+**What does the server think it is?** `https://<address>/.well-known/openmausbot/environment` is public and shows its id, label, version and capabilities; `npx openmausbot account status` prints the same on the server.**Something else.** `journalctl -u openmausbot --since -10m` (or `docker compose logs omb --tail 100`) shows the server's startup lines. Paste them with your question in the community channel.diff --git a/docs/headless-cli.md b/docs/headless-cli.mdindex 916a94d14a..2d5f8a5ba2 100644--- a/docs/headless-cli.md+++ b/docs/headless-cli.md@@ -18,17 +18,60 @@ openmausbot run "Room Lead" "Rehearse the launch of https://example.com" --expor`run` prints progress as it goes, then the Room Lead's final reply and thefiles it links, and writes everything to `./rehearsal`.+## Sign in once++```sh+openmausbot login # the MausBot app on this computer+openmausbot login https://maus.example.com # a Cloud or a server elsewhere+```++`login` asks the server, and the person allows it with one click. On this+computer the MausBot app shows a card, "A terminal wants to control MausBot",+with a short code; the same code is printed in the terminal, so you allow the+terminal you are looking at. For a Cloud or a server elsewhere your browser+opens the server's page, where the same card waits (sign in there first if it+asks). On a server you started yourself with `openmausbot serve`, a command on+the same computer is its owner, so `login` signs in without a card.++The sign-in lasts 30 days and renews while you use it. It is kept in the macOS+Keychain, or on Linux and Windows in a file only you can read+(`~/.config/openmausbot/`), and it is never printed or taken on the command+line. `--scope chat` signs in for chat only. Every command then goes to that+server, with that sign-in, and the sign-in is sent only to the exact address+it was made at.++| Command | What it does |+|---|---|+| `login [SERVER] [--scope chat] [--name NAME]` | Sign in (above); the server becomes the current one. |+| `logout [NAME]` | End the sign-in on the server and remove it here. |+| `whoami` | The server the commands go to, and who you are to it. |+| `servers` | The servers you signed in to; `*` marks the current one. |+| `use NAME` | Make another saved server the current one. |++Nothing on the computer gets your access for free: a program, a web page or a+bot can only ask, and only a person pressing Allow in the app (or in a browser+signed in to the server) lets a terminal in.++**Inside a bot's own shell** the command acts as that bot. It never uses your+saved sign-in, and `login` refuses there. So one bot cannot delete or stop the+others through your session by accident. It is not a wall against a bot with+Full access, which runs as you.+## Which workspace, and as whom- `--url URL` or `OPENMAUSBOT_URL`: a workspace somewhere else. `https://`works anywhere; plain `http://` works only on this computer or a privatenetwork (a LAN address, Tailscale's 100.x or `*.ts.net`, `*.local`).- `--port N` or `OMB_PORT`: this computer, on that port.-- Otherwise the command looks on this computer's usual ports (8799, 18799,- 28799), as the desktop app uses them.+- Otherwise the server you signed in to with `login`, or else the command+ looks on this computer's usual ports (8799, 18799, 28799), as the desktop+ app uses them.-On this computer a headless server treats you as its owner, and no token is-needed. Anywhere else you need a token:+Without a sign-in, a command on this computer can read from the desktop app+(`bots`, `status`, `messages`, `export`, `events`) but every change is refused+until you run `openmausbot login`. A server you started with `openmausbot+serve` treats a command on its own computer as its owner, and needs no+sign-in. For scripts and CI, a token in a file works anywhere:```shopenmausbot connect https://maus.example.com --code 7KQ2-M9XD-H4TP --out ~/.openmausbot-token@@ -37,11 +80,11 @@ openmausbot doctor --url https://maus.example.com --token-file ~/.openmausbot-to`connect` also takes the whole link the server printed(`https://maus.example.com/pair#code=…`), so `--code` can be left out then.-Make the pairing code on the server with `openmausbot pair` (add-`--client --ttl 24h` for a chat-only code that stays open up to a day; a code-works once). On this-computer's own server, `connect` makes the code itself (`--client` gives a-token that can chat but not change settings). The token goes to a file only+Make the pairing code in the app's Settings → Phone & devices, or on a server+with `openmausbot pair` (add `--client --ttl 24h` for a chat-only code that+stays open up to a day; a code works once). On a server you started with+`openmausbot serve`, `connect` makes the code itself (`--client` gives a token+that can chat but not change settings). The token goes to a file onlyyou can read, and is never printed. Pass it with `--token-file FILE` or`OPENMAUSBOT_TOKEN`; there is no `--token` flag, because a command line can beread by other programs. A token is never sent while the command is still@@ -55,7 +98,7 @@ openmausbot token list # name, scope, end date, last used (nopenmausbot token revoke ID # it stops working at once```-A `connect` session renews itself while it is used, up to 180 days; an access+A `login` or `connect` session renews itself while it is used, up to 180 days; an accesstoken never renews and ends on its date. `--expires` is at most the server'ssession limit (180 days unless `OMB_SESSION_MAX_DAYS` says otherwise), and`--scope client`, the default, can chat and answer approvals but not change@@ -73,13 +116,13 @@ redaction the transcript uses). Durations are written `90`, `90s`, `5m`, `2h` or| Exit code | Meaning ||---|---|| 0 | Done |-| 1 | Failed, stopped or stalled, or a step was refused |-| 2 | The command line or a file is wrong |+| 1 | Failed, stopped or stalled, or you answered no |+| 2 | The command line or a file is wrong, or a script left out `--yes` || 3 | Someone must answer (a question or an approval card) |-| 4 | Timed out (the work keeps running) |-| 5 | Cannot reach the server, not allowed, or the server is too old |-| 6 | `team apply --check` found changes |-| 7 | `doctor --host`: this machine is missing something the server needs |+| 4 | Needs you signed in (`openmausbot login`); for `run` and `wait`, also timed out (the work keeps running) |+| 5 | Not allowed, cannot reach the server, or the server is too old |+| 6 | Busy (stop it first); for `team apply --check`, it found changes |+| 7 | Not found; for `doctor --host`, this machine is missing something the server needs || 8 | `doctor --data`: the data folder has a problem left (after `--fix`, one it could not repair) || 130 | Ctrl-C (the work keeps running) |@@ -94,7 +137,14 @@ one of its conversations.| `doctor [--wait 2m]` | Checks the server answers, is new enough, who you are to it (and when your session expires), that an engine is ready, and whether bots have a browser. On a shared server without a session (`docker compose exec omb openmausbot doctor`), it learns only how many engines are ready, not which (`GET /api/health/engines`). || `doctor --host` | Checks this Linux machine can run the server and the bots' sandbox (below). || `doctor --data [--fix] [--data-dir DIR]` | Checks this computer's data folder without the server; `--fix` applies the repairs that cannot lose data, while no server uses it ([self-hosting](self-hosting.md#the-doctor-checking-and-repairing-the-data)). |+| `status` | Every bot at a glance: working, waiting on you, waiting on teammates, paused, failed or idle, with its computer and team. || `bots`, `channels`, `models` | Your bots and what each is doing, your rooms, the engines and the models each offers. |+| `bots get BOT` | One bot: its team, state, computer, model, approvals and conversations. |+| `bots delete BOTS` | Deletes bots with their conversations (below). The MausBot bot and a busy bot are refused. |+| `bots pause BOTS`, `bots resume BOTS` | Pauses bots: their work stops and nothing new starts, across restarts, until resumed. `--team` pauses the team itself, so bots added to it later are paused too; `--all` pauses every bot. |+| `stop BOTS` (or `bots stop`) | Stops the work these bots are doing now, and pauses nothing: a new message or routine starts them again. |+| `threads list BOT`, `threads clear BOT`, `threads delete BOT THREAD…` | A bot's conversations; `clear` deletes all of them and the bot starts one new, empty one. A conversation that is working is kept. |+| `computers list`, `computers start BOT`, `computers sleep BOT` | Where each bot works and its cloud computer's state; create or wake a bot's cloud computer (the bot must be set to Cloud computer), or put it to sleep. || `messages TARGET [--limit 30]` | The latest messages of a conversation. || `send TARGET TEXT` | Sends one message and returns at once, to the conversation the bot or room has open. `--task new` starts a new conversation for it (`--title` names it, else the message's first line), and `--task ID` picks one. It says which conversation it went to. `--send-id ID` makes a retry safe: the same id never sends twice. || `run TARGET TEXT` | Gives a bot or room one job and waits until it is done (below). |@@ -112,6 +162,22 @@ one of its conversations.The message for `send` and `run` can be the next word, `--text TEXT`,`--message-file FILE`, or `-` to read it from stdin.+BOTS is one or more bot names or ids, `--team NAME`, or `--all`. The commands+that delete or stop many things (`bots delete`, `threads clear`, `threads+delete`, `stop --all`) first print exactly what they would touch, then ask. A+script passes `--yes` instead (without it they exit 2), and `--dry-run` only+prints the list. They need a named server: the one you signed in to, or+`--url`/`--port`. There is no flag that skips a permission or an approval.++```text+$ openmausbot bots delete --team QA --dry-run+Would delete 3 bots on "Studio" (http://127.0.0.1:8799), with their conversations and files:+ QA Tester 3 (35d41705…), team QA+ QA Tester 2 (53cbe304…), team QA+ QA Tester 1 (2edb5834…), team QA+Nothing was changed (--dry-run).+```+## doctor --hostBefore you install a server, check the machine it will run on:diff --git a/docs/mcp-server.md b/docs/mcp-server.mdindex ceb7604a03..0f749f1c0e 100644--- a/docs/mcp-server.md+++ b/docs/mcp-server.md@@ -52,8 +52,9 @@ loopback without one. A hosted or shared server with service loopback trustsession for almost every tool, reads included. To authorize an external MCPclient:-1. In OpenMausBot, open **Settings → Phone → Set up a phone** and reveal the- one-time pairing code.+1. In OpenMausBot, open **Settings → Phone & devices**, press **Pair** and+ reveal the one-time pairing code (keep the access at everything for tools+ that change settings).2. Exchange it locally (remove spaces from the displayed code):```sh@@ -74,8 +75,9 @@ client:}```-The paired client appears with phones under **Settings → Phone** and can be-revoked there. Do not share the token or commit it to a repository.+The paired client appears under **Settings → Phone & devices** and can be+revoked there (or with `openmausbot devices revoke ID` once you signed the+terminal in with `openmausbot login`). Do not share the token or commit it to a repository.## From the installed desktop appdiff --git a/docs/pausing-bots.md b/docs/pausing-bots.mdindex 0bcfa24ba1..bd4f1098dc 100644--- a/docs/pausing-bots.md+++ b/docs/pausing-bots.md@@ -46,3 +46,8 @@ resumed for each in its own place.- `POST /api/paused` with `{ "kind": "bot" | "department", "id": "<bot id or department name>", "paused": true | false }`:answers with the new state and `stopped`, how many conversations it stopped.- `POST /api/paused` with `{ "kind": "all", "paused": true | false }` pauses or resumes every bot, with the same answer.+- `POST /api/turns/stop` with `{ "all": true }` or `{ "botIds": [...] }` stops the work those bots are doing now and+ pauses nothing; it answers `{ botIds, stopped }`.++All of these are admin requests. From a terminal: `openmausbot bots pause | resume (BOT… | --team NAME | --all)` and+`openmausbot stop (BOT… | --team NAME | --all)` ([the command line](headless-cli.md)).diff --git a/docs/phone-push.md b/docs/phone-push.mdindex 4d7df0168d..069534b4bd 100644--- a/docs/phone-push.md+++ b/docs/phone-push.md@@ -172,7 +172,7 @@ would only send that person the same names and ids it can already read.## Cloud homesA desktop has an installation credential once its owner turns on "Use your-phone anywhere", and `openmausbot serve` has one after `openmausbot login` or+phone anywhere", and `openmausbot serve` has one after `openmausbot account login` orfrom `OMB_INSTALLATION_CREDENTIAL`. A Cloud home has none, so today it cannotsend.diff --git a/docs/phone-relay-server.md b/docs/phone-relay-server.mdindex a92f0c690a..6751c7d559 100644--- a/docs/phone-relay-server.md+++ b/docs/phone-relay-server.md@@ -19,7 +19,7 @@ installation that took a relay token in the last two days and then refuses it atunnel for good, and a server may be pointed at one. So the server still keepsthe relay off, and says why, when it serves `--tunnel`, runs on a fleetcredential (`OMB_INSTALLATION_CREDENTIAL`), or holds a tunnel address from a-plain `openmausbot login`.+plain `openmausbot account login`.## Use it@@ -127,7 +127,7 @@ declarations only.## The control plane-`openmausbot login` registers the server as an installation (its platform, and+`openmausbot account login` registers the server as an installation (its platform, and`appVersion` the npm package's version) and keeps its `omb_install_…`credential in `tunnel-account.json`, mode 0600. Plain `login` also reserves atunnel address; `login --relay` reserves none (the account service's on-demand@@ -151,7 +151,7 @@ A server qualifies today; no control plane change is needed to get a token:**Servers keep their tunnel.** A server's tunnel serves browsers and thedesktop app, not only phones. The server sends `kind: "server"` on`POST /v1/installations`, `POST .../self/endpoint` and `POST .../self/relay-token`-(`openmausbot login`, `serve --tunnel`, a fleet container and `serve --relay`+(`openmausbot account login`, `serve --tunnel`, a fleet container and `serve --relay`alike); the desktop app sends nothing new. The hosted control plane stores it,never marks a server's tunnel for the relay (`relay_proven`, `legacy_cutoff`)and never answers a server `relay_capable` (its README, "Self-hosted servers").diff --git a/docs/self-hosting.md b/docs/self-hosting.mdindex bf60b68f86..7ccfe8ec86 100644--- a/docs/self-hosting.md+++ b/docs/self-hosting.md@@ -27,7 +27,7 @@ For server feature switches, defaults and configuration-file instructions, see| A domain name, and ports 80 and 443 open | `npx openmausbot serve --domain maus.example.com` | `https://maus.example.com/pair#code=…` || Tailscale on the server and your devices | `npx openmausbot serve --tailscale` | `https://<machine>.<tailnet>.ts.net/pair#code=…` || Only this network (home or office) | `npx openmausbot serve --lan` | `http://192.168.1.20:8799/pair#code=…` |-| Nothing at all | `npx openmausbot login`, then `npx openmausbot serve --tunnel` | `https://c-….openmausbot.com/pair#code=…` |+| Nothing at all | `npx openmausbot account login`, then `npx openmausbot serve --tunnel` | `https://c-….openmausbot.com/pair#code=…` || Only the phone app, from anywhere (a machine with no tunnel address, for now) | `npx openmausbot login --relay`, then `npx openmausbot serve --relay` | a QR for the MausBot app ([MausBot Relay](phone-relay-server.md)) |`--lan` can be added to any of the others. Plain `http://` is only for a@@ -95,7 +95,7 @@ npx openmausbot serve --public-url https://maus.example.comSetting `OMB_PUBLIC_URL=https://maus.example.com` in the environment works thesame way. If the Reach line says`✗ https://maus.example.com doesn't reach this server`, the tunnel points-somewhere else. Fix that, then run `npx openmausbot status` to check again.+somewhere else. Fix that, then run `npx openmausbot account status` to check again.### Docker on your computer or home network@@ -283,7 +283,7 @@ Debian 13 and Fedora), SELinux hosts and ARM64 have not been tried.| "That address answers, but it isn't a MausBot server." | Something else answers there, often a proxy pointing at the wrong port. | Point it at `http://127.0.0.1:8799`. || "That's a sign-in code from an email…" / "That code is for the phone app…" / "That's a script key…" | The wrong kind of code. | On the server, run `openmausbot pair` for a 12-character pairing code. || "Too many wrong codes. Try again at 11:19." | Five wrong codes in five minutes from one address. | Wait until then, or make a new code. |-| `Reach ✗ https://… doesn't reach this server (connection refused).` | Your tunnel or proxy doesn't reach port 8799. | Point it at `http://127.0.0.1:8799`, then run `openmausbot status`. |+| `Reach ✗ https://… doesn't reach this server (connection refused).` | Your tunnel or proxy doesn't reach port 8799. | Point it at `http://127.0.0.1:8799`, then run `openmausbot account status`. || `Reach ✗ https://… answers as a different server.` | The address leads to another MausBot server. | Point the tunnel at this machine's port. || `Reach … https://… doesn't answer yet` (`--domain`) | DNS isn't pointing here yet, or ports 80 and 443 are closed. | Fix the A record and open the ports; the certificate follows. || `--lan: this machine has no private network address…` | A VPS with only a public address. | Use `--public-url`, `--domain` or `--tailscale`. |@@ -366,7 +366,7 @@ too.networks and VPN tunnels are skipped. A machine with no private addresssays so and stays on loopback. Plain http travels in clear, so use it onlyon a network you trust.-- **`--tunnel`**: `npx openmausbot login` reserves an address like+- **`--tunnel`**: `npx openmausbot account login` reserves an address like`https://c-….openmausbot.com` for this machine (an emailed code signs itin). `serve --tunnel` connects it through a Cloudflare tunnel, the same onethe desktop app uses for its companion. The first run downloads@@ -375,7 +375,7 @@ too.lands on a separate listener that the server treats as "through a proxy",never as the owner. That listener gzips JSON replies of 1 KB or more whenthe client accepts gzip; the loopback port never compresses.- `npx openmausbot logout` releases the address. The account credentials+ `npx openmausbot account logout` releases the address. The account credentialslive in `~/.openmausbot/tunnel-account.json` (mode 0600). Started from afleet or a container, where nobody can type an emailed code? Set`OMB_INSTALLATION_CREDENTIAL` to the installation credential the fleet@@ -1911,11 +1911,19 @@ is paused, so <bot> takes no new work. Resume every bot from any bot's menu inthe sidebar." A message to a bot is refused with the same line. Resuming leavesa bot or department that was paused by itself paused.-From a terminal on the server, to stop spending at once (an admin route like-any other: see "Loopback trust: owner or service"):+From a terminal, to stop spending at once:```sh-curl -X POST http://127.0.0.1:8799/api/paused \+openmausbot bots pause --all # openmausbot bots resume --all undoes it+openmausbot stop --all # or only stop the work running now, pausing nothing+```++Both are admin requests, so they need you signed in (`openmausbot login`),+except on a server you started with `openmausbot serve` whose loopback trust is+`owner` (see "Loopback trust: owner or service"). With a token instead:++```sh+curl -X POST http://127.0.0.1:8799/api/paused -H "Authorization: Bearer $(cat ~/omb-admin.token)" \-H 'content-type: application/json' -d '{"kind":"all","paused":true}'```