Files
multica/SELF_HOSTING_AI.md
Jiayuan Zhang b0ee214154 feat: streamline self-hosting with one-click setup (#724)
* feat: streamline self-hosting experience with one-click setup

- Add `make selfhost` / `make selfhost-stop` for one-command Docker deployment
- Add `multica setup` CLI command (auto-detect local server, configure, login, start daemon)
- Add `multica config local` CLI command (configure for localhost defaults)
- Restructure SELF_HOSTING.md: simplified 4-step guide, moved advanced config to SELF_HOSTING_ADVANCED.md
- Add SELF_HOSTING_AI.md for AI agents to follow
- Document 888888 master verification code for non-production environments
- Document how to stop services
- Fix brew install typo: `multica-cli` → `multica` in SELF_HOSTING.md and self-hosting.mdx
- Update README.md and README.zh-CN.md with simplified self-host instructions
- Update CLI_AND_DAEMON.md with new setup/config local commands

* feat: add one-command installer script (curl | bash)

Add scripts/install.sh that handles the full setup in one command:

Self-host (default):
  curl -fsSL .../install.sh | bash
  → Checks Docker, clones repo, starts services, installs CLI, configures

Cloud (CLI only):
  curl -fsSL .../install.sh | bash -s -- --cloud
  → Installs CLI via Homebrew or binary download

Features:
- OS detection (macOS/Linux) with architecture support (amd64/arm64)
- Homebrew install with binary download fallback
- Idempotent: re-running updates existing installation
- Colored output with non-TTY fallback
- Docker availability check with helpful error messages

Updated docs (README, SELF_HOSTING, self-hosting.mdx, SELF_HOSTING_AI) to
show curl | bash as the primary install method.

* refactor: default install to cloud mode, add --local for self-host

- install.sh default is now cloud (CLI only, connects to multica.ai)
- Self-host uses --local flag: curl ... | bash -s -- --local
- Restructured README following Hermes Agent style:
  - Quick Install section front and center with curl | bash
  - CLI command reference table
  - Self-host as a callout under Quick Install
  - Removed redundant "Multica Cloud" / "CLI" sections
- Updated all docs (SELF_HOSTING, self-hosting.mdx, SELF_HOSTING_AI,
  README.zh-CN) to use --local flag for self-host curl command

* docs: remove redundant AI agent install snippet from README CLI section

* docs: add daemon stop command to README quick install sections

* feat: add --stop flag to install.sh for easy self-host shutdown

Users who installed via `curl ... | bash -s -- --local` can now stop
all services with `curl ... | bash -s -- --stop`. The stop command
shuts down Docker Compose services and the daemon.

Also updated SELF_HOSTING.md stopping section to show both methods.
2026-04-12 00:50:17 +08:00

1.9 KiB

Self-Hosting Setup (for AI Agents)

This document is designed for AI agents to execute. Follow these steps exactly to deploy a local Multica instance and connect to it.

Prerequisites

  • Docker and Docker Compose installed
  • Homebrew installed (for CLI)
  • At least one AI agent CLI on PATH: claude or codex

One-Command Install

curl -fsSL https://raw.githubusercontent.com/multica-ai/multica/main/scripts/install.sh | bash -s -- --local

This installs everything: clones the repo, starts Docker services, and installs the CLI.

Wait for the output ✓ Multica is installed and running! before proceeding.

Expected result:

Alternative: Manual Setup

git clone https://github.com/multica-ai/multica.git
cd multica
make selfhost
brew install multica-ai/tap/multica
multica setup --local

The multica setup --local command will:

  1. Configure CLI to connect to localhost:8080 / localhost:3000
  2. Open a browser for login — use verification code 888888 with any email
  3. Discover workspaces automatically
  4. Start the daemon in the background

Verification

multica daemon status

Should show running with detected agents.

Stopping

# Stop the daemon
multica daemon stop

# Stop all Docker services
cd multica
make selfhost-stop

Custom Ports

If the default ports (8080/3000) are in use:

  1. Edit .env and change PORT and FRONTEND_PORT
  2. Run make selfhost
  3. Run multica setup --local --port <PORT> --frontend-port <FRONTEND_PORT>

Troubleshooting

  • Backend not ready: docker compose -f docker-compose.selfhost.yml logs backend
  • Frontend not ready: docker compose -f docker-compose.selfhost.yml logs frontend
  • Daemon issues: multica daemon logs
  • Health check: curl http://localhost:8080/health