· multica / self-hosting / ai-agents
How to Self-Host Multica: Setup Guide for AI Agent Teams
Self-host Multica v0.3.1 with three Docker containers and one make command. Quick-start, production hardening, and cost breakdown for AI agent teams.
By Ethan
1,646 words · 9 min read
Multica Cloud has no public pricing — you get a free trial, then you negotiate. If you are running AI agent workflows at any scale, that is a position you do not want to be in. Multica v0.3.1 ships a self-hosted path: three Docker containers, one make selfhost, and the whole thing runs on a €4.49/mo Hetzner box. This guide gets you there in under 30 minutes.
Who this is for
Engineering teams running automated AI agent workflows — code review agents, documentation writers, triage bots — who want predictable infrastructure costs. If you are experimenting with Multica on a personal project, the free trial is the right starting point. Come back when the bill matters.
Multica Self-Hosted Architecture
Multica self-hosted is three containers:
┌─────────────────────────────────────┐
│ Your server │
│ │
│ ┌──────────────┐ ┌─────────────┐ │
│ │ multica-web │ │ backend │ │
│ │ Next.js 16 │ │ Go :8080 │ │
│ │ :3000 │ └──────┬──────┘ │
│ └──────┬───────┘ │ │
│ └────────┐ │ │
│ ▼ ▼ │
│ ┌──────────────────┐ │
│ │ PostgreSQL 17 │ │
│ │ + pgvector │ │
│ │ :5432 │ │
│ └──────────────────┘ │
└─────────────────────────────────────┘
▲
Caddy (production)
or direct (development)
The backend is a single Go binary that handles the REST API, WebSocket connections for real-time agent communication, and database migrations on startup. The frontend is Next.js 16 — it talks only to the backend. PostgreSQL 17 adds pgvector for the agent embedding store. You need PostgreSQL 17 for the pgvector extension (Multica README).
Prerequisites
- Docker Compose (Multica README — prerequisites)
- 2 vCPU / 4 GB RAM minimum (Hetzner CX23 covers this)
- Port 8080 free on the host — the most common conflict is a local dev server
- An AI coding CLI on PATH:
claude,gemini,aider, or similar. Multica coordinates agents; it does not manage AI API keys. Undecided which to run? See our AI coding CLI comparison RESEND_API_KEYfor email-based auth — skip in development, required in production
1. Quick-start with Docker Compose
Clone the repo and run the make target:
git clone https://github.com/multica-ai/multica.git
cd multica
make selfhost
make selfhost does four things: generates a random JWT_SECRET, pulls the latest GHCR images for multica-backend and multica-web (packages), writes .env with sane defaults, and runs docker compose up -d. To pin a specific version, set MULTICA_IMAGE_TAG=v0.3.1 before running. Migrations run on first backend startup — give it 10–15 seconds before the API responds. (Multica README — quick-start)
Verify the stack is up:
curl http://localhost:8080/health
Or check the container health state directly:
docker compose ps
(API health endpoint — Multica README)
Open http://localhost:3000 in a browser. You should see the Multica sign-in screen.
Failure mode — port 8080 already in use:
PORT=9080 make selfhost
Or edit docker-compose.yml and change the host port binding before running make selfhost. The frontend and backend talk to each other on the internal Docker network — only the host-facing port changes.
2. Connect the CLI and start the daemon
Install the CLI:
brew install multica-ai/tap/multica
Point it at your local instance:
multica setup self-host
# Prompts for backend URL (http://localhost:8080) and frontend URL (http://localhost:3000)
# Writes config to ~/.multica/config.json
(CLI setup reference — Multica README)
Sign in and start the daemon:
multica login
multica daemon start
multica daemon status
(Daemon commands — Multica README)
The daemon polls for assigned issues and passes them to the AI CLI on PATH. It auto-discovers workspaces from the config — no per-workspace wiring required.
Failure mode — daemon runs but agents never pick up tasks:
The daemon calls your AI CLI as a subprocess. If claude --version fails when the daemon process runs, tasks will queue silently. The PATH that worked in your terminal may not be the PATH the daemon sees when launched as a system service. Fix:
which claude
# copy the full path, e.g. /usr/local/bin/claude
Then set the MULTICA_CLAUDE_PATH environment variable to that full path and restart the daemon. For other CLIs the env vars follow the same pattern: MULTICA_CODEX_PATH and MULTICA_COPILOT_PATH.
3. Assign your first task to an agent
Create a workspace and project through the web UI at http://localhost:3000, then assign an issue from the CLI:
multica issue create \
--title "Write tests for the auth module" \
--assignee-id <agent-uuid> \
--project <project-id>
The daemon picks it up within 10 seconds, launches the AI CLI inside the project directory, and posts a result comment when done. WebSocket connections stream the agent’s progress in real time in the UI.
4. Production hardening
The quick-start is fine for local development. Running Multica for a team means three more things: an external Postgres instance, HTTPS via Caddy, and email auth.
External Postgres
The bundled Postgres container is a convenience. For production, point Multica at an external PG 17 instance with pgvector installed:
# .env — env var reference: https://github.com/multica-ai/multica#environment-variables
DATABASE_URL=postgres://user:pass@your-pg-host:5432/multica?sslmode=require
Enable pgvector on the external instance before first startup:
CREATE EXTENSION IF NOT EXISTS vector;
Remove the db service from docker-compose.yml when using an external database — the backend connects via DATABASE_URL regardless of whether a local container is running.
Backups: pg_dump the multica database on a cron schedule. There is no built-in backup job in v0.3.1. A daily pg_dump | gzip > multica-$(date +%F).sql.gz to an S3-compatible store covers the common failure modes.
HTTPS via Caddy
Auth cookies do not work correctly on a bare IP in most browsers. You need a domain with TLS. Caddy handles both automatically. The critical setting is flush_interval -1 on every reverse proxy block that touches the API or WebSocket paths — without it, Caddy buffers WebSocket frames and agent logs freeze in the UI:
# Caddyfile
multica.yourdomain.com {
handle /api/* {
reverse_proxy localhost:8080 {
flush_interval -1
}
}
handle /ws/* {
reverse_proxy localhost:8080 {
flush_interval -1
}
}
handle {
reverse_proxy localhost:3000
}
}
Also set MULTICA_APP_URL in .env to https://multica.yourdomain.com so the backend generates correct magic-link URLs.
Email auth (Resend)
Multica uses magic-link email authentication. In production:
# .env — env var reference: https://github.com/multica-ai/multica#environment-variables
RESEND_API_KEY=re_...
RESEND_FROM_EMAIL=[email protected]
Without RESEND_API_KEY, signup completes but the confirmation email never arrives. In development, check the backend container logs — the magic link is printed to stdout when Resend is not configured:
docker logs multica-backend-1 | grep magic
Cost comparison
Self-hosted infrastructure versus Multica Cloud:
| Provider | Config | Monthly | US PoP | SEA / Vietnam PoP |
|---|---|---|---|---|
| Hetzner CX23 | 2 vCPU / 4 GB RAM | €4.49 (as of 2026-05-17) | Ashburn, VA | Singapore |
| Hetzner CX33 | 4 vCPU / 8 GB RAM | €8.29 (as of 2026-05-17) | Ashburn, VA | Singapore |
| DigitalOcean Basic | 2 vCPU / 4 GB RAM | $24 (as of 2026-05-17) | NYC / SF / Chicago | Singapore (SGP1) |
| Railway | 2 vCPU / 4 GB RAM | ~$10–15 | US-West / US-East | Singapore (asia-southeast1-eqsg3a) |
| Render | Standard | ~$14–21 | Oregon / Ohio / Virginia | Singapore |
| Multica Cloud | — | Not listed | — | — |
Multica Cloud pricing is not public. You get a free trial; after that it’s a conversation. The closest public analogue is n8n: comparable SaaS plans run €20–667/mo (n8n.io/pricing, as of 2026-05-17: Starter €20/mo, Pro €50/mo, Business €667/mo); self-hosted runs $3–15/mo. Multica is newer and presumably priced more competitively, but there is no number to compare against today.
For European and global teams: Hetzner CX23 in Falkenstein or Helsinki is the lowest-floor option. For teams in Southeast Asia: Hetzner, DigitalOcean, Render, and Railway all have Singapore data centers. Hetzner Singapore at €4.49–€8.29/mo is the cheapest path to a low-latency Southeast Asia deployment.
For a full accounting of AI agent costs beyond infrastructure — API bills, oversight labor, and retry waste — see The real cost of running an AI agent team in 2026.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
address already in use :8080 on startup | Another process owns port 8080 | PORT=9080 make selfhost, or find and stop the conflicting process |
| Login succeeds but auth cookie is not set | Running on a bare IP address | Add a domain, configure Caddy, set MULTICA_APP_URL in .env to the full domain |
| Agent logs load once then freeze in UI | Caddy missing flush_interval -1 | Add flush_interval -1 to all reverse_proxy blocks for /api/* and /ws/* |
| Signup completes but magic-link email never arrives | RESEND_API_KEY not set | Set RESEND_API_KEY in .env and restart containers; in dev, grep backend logs for the link |
| Daemon starts but agents never pick up assigned tasks | AI CLI not on PATH for the daemon process | Set MULTICA_CLAUDE_PATH (or MULTICA_CODEX_PATH / MULTICA_COPILOT_PATH) to the full absolute path, restart daemon |
Conclusion
Self-hosting Multica v0.3.1 takes under 30 minutes: git clone, make selfhost, a Caddyfile with flush_interval -1 on the WebSocket paths, and your agent infrastructure is running at a fixed monthly cost. When Multica Cloud publishes pricing, compare it — at anything above a two-person team running real workloads, the math tends to favor self-hosted.
Hetzner is the lowest floor, especially in Singapore for teams in Southeast Asia. DigitalOcean costs more but has better documentation and a more familiar support structure. Both get you running today.
References
- Multica GitHub repository — README, quick-start, and environment variable reference
- Multica GHCR packages
- DigitalOcean Droplet Pricing (as of 2026-05-17)
- DigitalOcean Regional Availability
- Hetzner Cloud Pricing (as of 2026-05-17)
- Hetzner Data Centers
- Railway Regions
- Render Regions
- n8n Pricing (as of 2026-05-17)