@connectai/selfhost
v0.1.14
Published
One-command self-host installer for ConnectAI. Takes a clean machine (only Docker + Node) to a running, health-checked company-brain in one command, with no source clone and no local image build: `npx @connectai/selfhost run`. Bundles the image-based dock
Readme
@connectai/selfhost
One command takes a clean machine (only Docker + Node) to a health-checked ConnectAI company-brain. No source clone, no local image build.
npx @connectai/selfhost run Docker + Node
│ npx @connectai/selfhost run
▼
ConnectAI stack (local): api · worker · console · database · vault
│ open /setup, paste your token
▼
Your company brain, served to any agent over MCPQuick start
Boot the stack (pulls prebuilt images, writes a hardened
.env, waits for health):npx @connectai/selfhost runQuiet by default; add
--verbosefor the full docker output.Copy the one-time setup token:
npx @connectai/selfhost tokenOpen
http://localhost:5273/setup, paste the token, create the first administrator, confirm inference, and connect a source.
That is the whole happy path. Full operator guide (remote origins, day-2 operations, model right-sizing): https://connai.dev/docs/self-hosting.
Commands
| Command | What it does |
| --- | --- |
| run (default) | pre-flight, materialize assets, write .env, boot the stack, print the next step |
| token | print the one-time first-run setup token (or report the instance is already configured) |
| logs | tail stack logs (e.g. connectai logs api) |
| down | stop the stack (down -v also removes volumes and wipes the brain) |
| help / version | usage / version |
Flags
| Flag | Meaning |
| --- | --- |
| --dir <path> | working directory (default ~/.connectai-selfhost) |
| --verbose | stream the full docker output during boot (default: quiet spinner) |
| --yes, -y | non-interactive (already the default; accepted for CI) |
| --tag <tag> | run a specific release tag (advanced; also CONNECTAI_IMAGE_TAG) |
Requirements
- Docker with the Compose v2 plugin and a running daemon.
- Node >= 18 (for
npx). - Roughly 8 GB RAM and 10 GB free disk for a comfortable first boot.
Good to know
- The canonical package is
@connectai/selfhost. Afternpm i -g @connectai/selfhosttheconnectaiandselfhostbinaries are aliases; do not runnpx connectai. - Secrets are generated locally with a CSPRNG, written
chmod 600, never logged and never transmitted. A secondrunis idempotent and never overwrites your values. --diris also the compose-project boundary, so a non-default dir gets its own isolated project anddown --dir <that-dir>tears down only that install.- localhost is the v1 target. The prebuilt console bakes its API base URL at
publish time to
http://localhost:4000, which is correct for a same-box eval. Serving it on a real domain needs extra setup: see https://connai.dev/docs/self-hosting first. - The first run downloads several GB of images and can take a few minutes; re-runs are fast.
License
BUSL-1.1. Development, testing, and evaluation use need no license; production use requires a commercial license. The self-host runtime guard fail-closes at run time, so a published image gives away nothing licensed.
