Installation
HQ can run on one machine or across multiple machines. Start simple: one Docker host, one Supabase project, one gateway.Fastest path
Use the installer and finish setup in the browser.
Inspect first
Clone the repo and run Docker Compose yourself.
Develop locally
Use the development overlay for live UI reloads.
TL;DR
On any Linux or macOS host with Docker:Prerequisites
Docker
- Linux: the installer auto-installs Docker for you via
get.docker.comif it’s missing. - macOS: download Docker Desktop first.
- Windows: install WSL2 + Docker Desktop for Windows, then run the installer from a WSL shell.
Supabase
You need a Supabase project before running the installer.- Sign up at supabase.com (free tier is fine for personal use).
- Create a new project. Wait ~2 minutes for provisioning.
- Go to Project Settings → API. Copy three values:
- Project URL
- Anon public key
- Service role key (the secret one)
You do not need to run the SQL migrations manually. The onboarding wizard in the browser detects a fresh database and offers a one-click schema install that applies all migrations automatically. See Supabase setup if you prefer to run them by hand.
(Optional) Tailscale
If you plan to access HQ from a second device (phone, laptop, another machine), sign up for Tailscale before installing. Generate a reusable auth key at login.tailscale.com/admin/settings/keys and paste it when the installer asks.Paths
Path 1: one-line install (recommended for most users)
- Checks that Docker is present; prompts to install it if not (Linux only).
- Optionally asks for GitHub sync creds (skip to run without git remote).
- Writes
.env, pulls the UI image from GHCR, and runsdocker compose up -d ui. - Opens your browser to
http://localhost:3000.
Path 2: clone and run (recommended for developers)
--profile gateway to start the agent runtime alongside the UI.
Path 3: development mode
For contributors — live-reload the UI as you edit source:apps/ui/. See Local development for full dev setup.
After install
- Open
http://localhost:3000in your browser. - Log in with the Supabase auth user you created.
- Complete the onboarding wizard — it walks you through workspace identity, use case, infrastructure connection (Supabase + gateway), model provider (BYO API key), and first agent creation in one flow. See Workspace setup for details.
- For Telegram or Discord agents: send your bot a DM — it replies with a pairing code. Paste it into the agent’s detail page. For Slack: the agent is active immediately.
Multi-machine setups
Splitting UI and gateway across machines
HQ includes UI-driven gateway registration. The manual process still works, but most users should use Settings → Gateways → Add Gateway. Recommended process:- On the UI host: run the installer normally.
- Open Settings → Gateways → Add Gateway.
- Enter a label and, optionally, a Tailscale auth key.
- Copy the generated one-line installer and run it on the gateway host:
The installer checks for Docker, writes
.env, pulls images, and starts the gateway. If you prefer to inspect the script first, download it withcurl -fsSL https://install.yourhq.ai/gateway -o install-gateway.shand run it manually — it will prompt for any missing values. - Keep the dialog open until the registration token is consumed and the gateway appears.
- On the UI host: run the installer normally (Tailscale mode recommended).
- On the gateway host: clone the repo, copy
.env, and set:- A unique
GATEWAY_ID(e.g.mac-mini,vps-eu) - The same
SUPABASE_URL+ keys as the UI host GATEWAY_AUTH_TOKENmatching the UI’s
- A unique
- On the gateway host: install Tailscale and join the same tailnet as the UI host.
- Set
HOST_REACHABLE_URL=http://<gateway-host-tailscale-ip>in the gateway’s.env. docker compose --profile gateway up -d(skipui).- The gateway registers itself in Supabase’s
gatewaystable. The UI sees it within 30 seconds.
Troubleshooting install
- “Docker is not installed” on macOS/Windows: install Docker Desktop (GUI app), not the Linux installer.
- UI shows the onboarding screen every time I load it: the
ui-configvolume got wiped or isn’t persisting. Checkdocker volume inspect yourhq-ui-configand re-complete onboarding. - “Pull access denied” on GHCR: only relevant if the repo is private.
docker login ghcr.io -u <your-gh-user>with a PAT that hasread:packagesscope. docker compose upfails with “port already in use”: something else is on port 3000 on your host. ChangeUI_HOST_PORTin.env.- Onboarding wizard 500s: CSRF origin mismatch. Set
ALLOWED_ORIGINSin.envto match the host you’re accessing from. Restart the UI. - Onboarding validator says a table/function doesn’t exist: the schema is incomplete. Re-run the one-click schema install from the onboarding wizard, or manually apply every file in
db/migrations/in filename order.

