CConnectAI Docs

Get started  /  Quickstart

Install in one command

Quickstart

The fastest path to a running brain is the one-command installer. It takes a clean machine that has only Docker and Node, pulls prebuilt images, writes a hardened configuration, boots the stack, pulls the local inference models, and prints the console URL. There is no source clone and no local image build.

flowchart TD
  accTitle: Setup flow
  accDescr: Run the installer, copy the setup token, open the setup page and paste it, create the first administrator, confirm inference, connect a source, and arrive at a queryable company brain.
  R["npx @connectai/selfhost run"] --> T["npx @connectai/selfhost token"]
  T --> SU["Open localhost:5273/setup<br/>paste the token"]
  SU --> AD["Create the first administrator"]
  AD --> INF["Confirm inference"]
  INF --> C["Connect a source"]
  C --> DONE["Queryable company brain"]

Prerequisites

  • Docker with the Compose v2 plugin, and the daemon running.
  • Node 18 or newer (for npx).
  • About 8 GB of RAM and 10 GB of free disk for the images plus the local models. Less than that is an advisory warning, not a hard stop.

That is the whole list. No git, no clone, no source checkout.

Run it

bash
npx @connectai/selfhost run

The boot is quiet by default: a spinner with a short summary, not raw per-layer docker output. Add --verbose (or set CONNECTAI_VERBOSE=1) for the full stream.

The quiet boot console of npx @connectai/selfhost run

If you would rather install the command globally:

bash
npm i -g @connectai/selfhost
connectai run

What the installer does

  1. Pre-flight. Verifies a running Docker daemon and Compose v2. It warns (and does not block) if RAM or disk is below the footprint. Errors are copy-pasteable.
  2. Materialize assets. Writes the bundled deploy files into a working directory (default ~/.connectai-selfhost, override with --dir). You never fetch source.
  3. Generate `.env`. Fills the secrets with a cryptographic random generator (ENCRYPTION_SECRET, the Infisical vault identity, and a strong POSTGRES_PASSWORD), writes the file chmod 600, and never overwrites a value you already set. Secrets stay local: never logged, never transmitted. A second run is a no-op.
  4. Boot. Pulls the prebuilt images, brings up the bundled Infisical vault, provisions the vault identity, brings up the full stack, and waits for the API /health check and the console.
  5. Models. Pulls qwen2.5:1.5b (chat) and mxbai-embed-large (embeddings) into the bundled Ollama, and gates the loop worker so ingest never runs before the embedder is ready.
  6. Print. Shows the console URL, the setup-token command, and your single next step.

The first run downloads several GB (images plus models) and can take a few minutes. Re-runs are fast and idempotent.

When it finishes

  • Console: http://localhost:5273
  • API health: http://localhost:4000/health

Get the one-time first-run setup token (printed once at API boot) with:

bash
npx @connectai/selfhost token

Then open http://localhost:5273/setup, paste the token, create the first administrator, confirm inference, and connect a source.

Commands and flags

CommandWhat it does
run (default)the full install and boot above
tokenprint the one-time first-run setup token
logstail stack logs (for example connectai logs api)
downstop the stack (down -v also removes volumes and wipes the brain)
help / versionusage / version
FlagMeaning
--dir <path>working directory (default ~/.connectai-selfhost)
--verbosestream the full docker output during boot (default: quiet spinner)
--yes, -ynon-interactive (already the default; accepted for CI)
--tag <tag>run a specific release tag (advanced; also CONNECTAI_IMAGE_TAG)

Notes

  • localhost is the v1 target. The prebuilt console talks to the API at http://localhost:4000. The compose ships a runtime API-base seam, so serving on a remote origin is a configuration change rather than a rebuild. Full remote serving is a documented follow-up.
  • The installer is a thin front door over the same hardened boot engine and canonical compose used everywhere else. It does not fork the orchestration.

Where to go next

  • Connect your agent (MCP) points Claude, Cursor, or a CLI at your new brain.
  • Self-hosting (advanced) covers the manual docker-compose path if you need to tune environment, vault, or models beyond the installer defaults.