MengBotDocs
Self-hosting

Self-hosting MengBot

Run the harness and desktop app on infrastructure you control.

MengBot is local-first by default: the harness listens on loopback, agent CLIs run on your machine, and application state lives under ~/.mengbot.

Typical self-hosted setup

  1. Run MengBot on your personal macOS, Windows, or Ubuntu computer.
  2. Install and authenticate the agent CLIs you want to use separately; the npm MengBot package does not include them. Use the same operating-system account for setup and the running server.
  3. Add optional third-party keys only for the services you need.
  4. Keep the harness on loopback.
  5. Use it from other devices by pairing them: a browser, the desktop app or the phone, over a public address, your own domain or your tailnet. See Deploy on a VPS.

For a Linux service, the VPS guide covers account setup, browser installation, and unattended startup. Installing browser libraries as administrator still requires installing the browser in the service user's home. The service runs an installed, chosen release; upgrading it is an explicit step.

Stop the server before a filesystem backup. Application state under .mengbot is only part of a complete backup: preserve the service user's engine credentials, browser state, and external workspaces too. See Data and backups.

What is still third party

Self-hosting MengBot does not self-host every optional provider:

  • Agent providers authenticate and bill through their own CLI or API.
  • Composio owns connected-app OAuth grants unless you replace that integration.
  • Boat owns managed cloud computers.
  • ElevenLabs or Fish Audio synthesizes speech when its hosted voice engine is enabled.

These services are optional. Local chat through a locally installed agent CLI does not require them.

Run headless during development

pnpm install --frozen-lockfile
pnpm dev:server

The main harness listens on 127.0.0.1:8799 by default. Keep it private; it owns agent processes, approvals, computers, and workspace configuration.

On this page