Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Merge origin/main into train/nov11-b

milind-soni8c507a595861
diff --cc apps/docs/content/docs/self-hosting/index.mdx
index 6c99d68296,7a9a8651ce..59bec40239
--- a/apps/docs/content/docs/self-hosting/index.mdx
+++ b/apps/docs/content/docs/self-hosting/index.mdx
@@@ -6,9 -6,17 +6,19 @@@ icon: Serve
MausBot is local-first by default: the harness listens on loopback, agent CLIs run on your machine, and application state lives under `~/.openmausbot`.
+If you only want to use a remote Docker desktop while MausBot and its agents stay on your current computer, follow [Your own VPS (BYO)](/docs/computers/byo-vps) instead.
+
- ## Typical self-hosted setup
+ ## On a server, with one command
+
+ On a fresh Ubuntu 22.04 or 24.04 server (x86-64) with a domain name pointing at it, the installer checks the server, installs MausBot with Docker under `/opt/openmausbot` and ends with HTTPS on your domain:
+
+ ```bash
+ curl -fsSL https://raw.githubusercontent.com/milind-soni/OpenMausBot/main/deploy/install.sh | sudo sh -s -- --domain maus.example.com
+ ```
+
+ Add `--check` to only check the server; it changes nothing. Run the command again to update or repair, and `--uninstall` to stop the server while keeping your data. [Deploy on a VPS](/docs/self-hosting/deploy-vps#quick-start-one-command-on-your-own-domain) lists every check, the files it writes and how the first admin signs in.
+
+ ## On your own computer, or by hand
1. Run MausBot on your personal macOS, Windows, or Ubuntu computer.
2. Install and authenticate the agent CLIs you want to use separately; the npm OpenMausBot package does not include them. Use the same operating-system account for setup and the running server.
diff --cc docs/deploy-vps.md
index ca6adc5776,151a58e42f..c1cb2e902f
--- a/docs/deploy-vps.md
+++ b/docs/deploy-vps.md
@@@ -1,11 -1,80 +1,84 @@@
# Deploy OpenMausBot on a VPS
+To keep MausBot and its agents on your current computer and use a VPS only as a
+bot’s remote desktop, see [Bring Your Own VPS](byo-vps.md) and the
+[published setup guide](https://docs.openmausbot.com/docs/computers/byo-vps).
+
From a blank Linux server to OpenMausBot running on it around the clock, reachable from your laptop, the desktop app and your phone, with your bots working while every laptop is closed. It assumes nothing beyond being able to open a terminal and paste commands. About twenty minutes, most of it waiting.
+ ## Quick start: one command on your own domain
+
+ For a fresh Ubuntu 22.04 or 24.04 server (x86-64, at least 2 CPUs, 4 GB of memory and 20 GB of free disk) and a domain name whose A record already points at it:
+
+ ```sh
+ curl -fsSL https://raw.githubusercontent.com/milind-soni/OpenMausBot/main/deploy/install.sh | sudo sh -s -- --domain maus.example.com
+ ```
+
+ The installer ([`deploy/install.sh`](https://github.com/milind-soni/OpenMausBot/blob/main/deploy/install.sh)) does path B below for you and ends with MausBot answering at `https://maus.example.com`.
+
+ **It checks the server first, and changes nothing while it checks.** Each check that fails prints one sentence saying what to fix, and nothing is installed until all pass:
+
+ | Check | Passes when |
+ |---|---|
+ | Operating system | Ubuntu 22.04 or 24.04 |
+ | Processor | x86-64, 2 cores or more |
+ | Memory | 4 GB or more (8 GB suggested) |
+ | Free disk | 20 GB or more, where the install and Docker keep their files |
+ | Docker | Docker 24 or newer with the Compose plugin, running, not rootless |
+ | Ports | 80 and 443 are free |
+ | DNS | the domain resolves to this server's public address |
+ | Outbound | HTTPS reaches the image registries (`ghcr.io`, `pkg-containers.githubusercontent.com`, Docker Hub), Let's Encrypt and `raw.githubusercontent.com` |
+ | User namespaces | switched on, for the bots' sandbox |
+ | Bots' sandbox | AppArmor is on with its tools, as it is on a stock Ubuntu |
+ | Clock | within five minutes of the internet's |
+ | Version | a MausBot release to install was found |
+
+ To run only the checks, add `--check`:
+
+ ```sh
+ curl -fsSL https://raw.githubusercontent.com/milind-soni/OpenMausBot/main/deploy/install.sh | sudo sh -s -- --check --domain maus.example.com
+ ```
+
+ If Docker is missing, the installer asks before installing it with Docker's official script (`get.docker.com`); `--install-docker` says yes ahead of time. It installs nothing else on the server.
+
+ **Then it installs** everything under one folder, `/opt/openmausbot` (`--dir` picks another):
+
+ | Path | What |
+ |---|---|
+ | `compose.yaml`, `Caddyfile` | the same server-plus-Caddy setup as path B, Caddy in its own container reaching the server over a socket; written again on every run |
+ | `.env` | your settings: `DOMAIN`, the pinned version (`OMB_IMAGE`) and anything you add, such as [who may sign in with an email](self-hosting.md#sign-in-with-your-email). The installer keeps your lines |
+ | `data/` | everything MausBot stores: chats, bots, engine sign-ins, paired devices. Never touched once it exists |
+ | `caddy/` | the HTTPS certificates |
+ | `update.sh` | the update command, once this repository has it (see below) |
+ | `compose.box.yaml`, `box/` | the sandbox's settings and the files that prepare the server for it |
+
+ `update.sh` and the sandbox's files are this repository's own, taken from the tag of the version being installed so they match it, and from `main` only when that tag does not have them. The installer says which it used.
+
+ It runs the newest release, pinned by its version; once a `stable` channel is published it follows that instead. If that version has no bots' sandbox, the checks (`--check` too) say so before anything is downloaded. It never runs `latest`, which follows every commit. It then waits until the server reports healthy and `https://maus.example.com` answers with a valid certificate, and prints the address.
+
+ **The bots' sandbox.** A MausBot version with the hardened profile runs every bot in a sandbox, away from the server's settings, keys and other bots' files, and Docker's defaults do not let a container build one. For such a version the installer prepares the server (a seccomp profile in `/etc/mausbot` and an AppArmor profile in `/etc/apparmor.d`, the two the MausBot connector installs), starts the server with the four security settings in `compose.box.yaml` (no `--privileged`, no added capability), and then runs the server's own self-check, which among other things confirms that a bot cannot read `config.json`. If a check fails that means a bot could reach something it must not, or that bots would not work, the installer names it and does not report success; so does a self-check that gives no answer, or a check the installer has never heard of. Five checks that are about neither (the kernel keyring, the sandbox's host name, the CPU list, a hosting provider's address, and reaching the public internet) only print a note. For a version without the hardened profile it says the sandbox is not there yet; run the install command again after updating to one that has it. `--no-sandbox` skips all of this, for a server only you sign in to on a host without AppArmor.
+
+ **Sign in as the first admin** with a one-time link made on the server. Run in a terminal, the installer makes one and prints it when it finishes. It does not when its output goes anywhere else, such as a log, because whoever reads the link can sign in as the admin until it is used or expires. To make one yourself:
+
+ ```sh
+ cd /opt/openmausbot && sudo docker compose exec omb openmausbot pair --label "First admin"
+ ```
+
+ Open the link it prints, or paste it into the desktop app under **+ → Connect to a server**. To sign in with an emailed code instead, run the installer with `--email [email protected]`.
+
+ - **Update:** `sudo /opt/openmausbot/update.sh`, which backs the data up, checks the new version's health and puts the old one back if it fails. The installer places it once this repository has it and prints the command when it finishes; until then, running the install command again moves to the newest release. `update.sh` pins the version by digest in `.env`, and a later run of the installer keeps that pin.
+ - **Repair:** run the install command again. It checks the server, rewrites its own files and leaves `.env` and `data/` alone. That also moves an install made before Caddy got its own container: Caddy then shared the server's network, and HTTPS went down whenever the server restarted without it.
+ - **Stop:** `--uninstall` stops the server and removes its containers. It deletes nothing: your data stays in `/opt/openmausbot/data`.
+ - **Every other command in this guide** that starts `docker compose` for path B works from `/opt/openmausbot`.
+ - **What the installer contacts:** the registries and Let's Encrypt from the table, GitHub's release list, this repository's files on `raw.githubusercontent.com`, and `cloudflare.com/cdn-cgi/trace` to learn the server's public address for the DNS check. It sends no telemetry.
+ - **Behind a load balancer or NAT** that forwards ports 80 and 443 to the server, set `OMB_INSTALL_SKIP_DNS=1` to skip the DNS check.
+
+ The installer also accepts the one-time code of a server connected to MausBot. That offering is not available yet.
+
+ Not on Ubuntu, or prefer to do it by hand? Use one of the three ways below.
+
+ ## Three ways in, by hand
+
Three ways to make the server reachable are covered. Pick one; the rest of the guide is the same. The short version of every path, including `--lan` and your own cloudflared or proxy (`--public-url`), is at the top of [Self-hosting](self-hosting.md#pick-a-way-in); this guide adds the server setup around it.
| | You need | Who can reach it | Best for |