Run it locally
The fastest way to see HiveCFM running is to clone both repos, start Docker, migrate the database, and run the Next.jsNext.jsReact framework used by HiveCFM Core. Handles routing, server rendering, and API routes in one bundle. app. This page walks through that in order. The reference numbers below match the ports you will actually see.
Prerequisites
You need Node 22, pnpmpnpmThe package manager HiveCFM uses instead of npm or yarn. Faster, uses a single on-disk content store. 9.15.9, Docker 24+, Git, and OpenSSL — plus Go 1.25+ only if you’ll run the HubHubThe Go service that owns background processing, integrations, and the admin API. Sibling to Core. natively. Each tool has its own install + verify steps:
Already have them? Confirm with: node -v → v22.x.x · pnpm -v → 9.15.9 · docker compose version → v2.x.x.
Port map
| Service | Port | Notes |
|---|---|---|
hivecfm-core (Next.jsNext.jsReact framework used by HiveCFM Core. Handles routing, server rendering, and API routes in one bundle.) | 3000 | apps/web/package.json’s dev script hardcodes next dev -p 3000. On a shared box 3000 is very often already taken — see the Troubleshooting entry below for how to actually change it (the app does not offer a 3001 fallback on its own). |
| Postgres | 5432 | Exposed via docker-compose.host-ports.yml, same-to-same (host 5432 → container 5432). |
| RedisRedisIn-memory key-value store used for caching, sessions, and rate limiting. Runs on port 6380 locally. | 6379 | Exposed via docker-compose.host-ports.yml, same-to-same (host 6379 → container 6379). |
| Superset | 3002 | Analytics. |
hivecfm-dev-hub (this site) | 4100 | The site you are reading now. |
| HubHubThe Go service that owns background processing, integrations, and the admin API. Sibling to Core. API | 8090 | Go service for embeddings, sentiment, webhooks. |
| MinIOMinIOS3-compatible object storage for survey attachments and uploads. Runs locally; swaps for real S3 in prod. console | 9001 | S3-compatible object storageMinIOS3-compatible object storage for survey attachments and uploads. Runs locally; swaps for real S3 in prod. UI. |
All ports bind to 127.0.0.1 only. Running on a remote VM (EC2)? See Running on AWS EC2 via SSH below for the tunnel commands.
Steps
Clone the repos
The three HiveCFM repos live on Azure DevOps. If you haven’t set up auth on this machine yet, do Authenticate with Azure DevOps first.
Pick either approach — they do the same thing. The CLI is the canonical reference; the VS Code GUI is faster on a remote dev box where the multi-line paste behaviour in the terminal can trip you up.
A URL is not a command. Always run git clone <url> — pasting only the URL at a bash prompt produces No such file or directory. If you paste a multi-line block into the terminal and one line ends up as a bare URL, that line will fail; the others may run partially.
Make the working directory:
mkdir -p ~/AG-DEV
cd ~/AG-DEVClone the three repos:
git clone https://dev.azure.com/istnetworksrnd/HiveCFM/_git/hivecfm-core
git clone https://dev.azure.com/istnetworksrnd/HiveCFM/_git/hivecfm-hub
git clone https://dev.azure.com/istnetworksrnd/HiveCFM/_git/hivecfm-dev-hubTo check out a specific branch instead of the default (main), add -b <branch-name>:
git clone -b AG-hiveCoreMigrtorTool https://dev.azure.com/istnetworksrnd/HiveCFM/_git/hivecfm-core-
Expected: ~30 s per clone.
hivecfm-coreis the largest (~150 MB). -
Verify the folders exist:
ls ~/AG-DEVOutput should list
hivecfm-core hivecfm-hub hivecfm-dev-hub. -
Verify the branch (if you used
-b):cd ~/AG-DEV/hivecfm-core && git branch --show-currentPrints the active branch name.
-
If
fatal: Authentication failed: PAT expired or wasn’t stored — see the auth steps in Prerequisites. -
If bash says
No such file or directoryand echoes the URL: you forgotgit clonein front, or VS Code’s terminal split a multi-line paste. Type the command on a single line. -
search-hint:
git clone azure devops authentication failed
Install dependencies
cd hivecfm-core
pnpm installFirst install takes about 40 seconds and pulls shared toolchain into node_modules/.
Create your .env files
Both hivecfm-core and hivecfm-hub need a .env — copy from .env.example and generate local-only secrets with OpenSSL, or pull real values from 1Password. The full procedure with verify steps lives on its own page:
For a quick local-only setup, this is the minimum:
cp hivecfm-core/.env.example hivecfm-core/.env
cp hivecfm-hub/.env.example hivecfm-hub/.env
# then append OpenSSL-generated values — see Secrets pageStart the stack
docker compose up -dThis brings up Postgres, Redis, MinIO, MailHog, Superset, and the Go Hub in background containers.
The bare command also builds and starts hivecfm-core itself — docker-compose.yml declares it as an ordinary service, and Compose starts every service by default. That is a real, several-minute image build this guide’s flow never uses (you run the app natively with pnpm dev below, not the containerised one) — verified live 2026-09-09. To skip it, name the services you actually want:
docker compose up -d postgres redis minio mailhog superset hivecfm-hub-api hivecfm-hub-riverui hivecfm-hub-db-initFirst boot of whichever set you choose still builds the Hub image — give it a few minutes.
If you want localhost:5432 and localhost:6379 exposed on the host (required for native dev), layer the host-ports override — this is the file docker-compose.yml itself was pointing at until a since-reverted rename; the current name is docker-compose.host-ports.yml, not docker-compose.dev-ports.yml:
docker compose -f docker-compose.yml -f docker-compose.host-ports.yml up -d.
Migrate the database
pnpm --filter @hivecfm/database db:migrate:devThis applies every migration in hivecfm-core/packages/database/migrations/ and regenerates the Prisma client. (pnpm db:migrate:dev from the repo root does the same via Turborepo.)
Run the app
pnpm devThe Next.js app starts on http://localhost:3000 with hot-reload. The underlying command is pnpm --filter @hivecfm/web dev — you can run that directly if you want to filter other workspaces off, or add -- -p <port> to change the port (see Troubleshooting below).
Verify
curl -s http://localhost:3000/health # returns HTML or 200
curl -s http://localhost:8090/health # {"status":"ok"} from the Go Hub
docker compose ps # every container should be "running" or "healthy"Then open http://localhost:3000 in your browser and sign up for the first account — the first user bootstraps the initial organisation.

SIGNUP_ENABLED (see below).Signup can 404 with no error message. SIGNUP_ENABLED = IS_HIVECFM_CLOUD || IS_DEVELOPMENT || E2E_TESTING (apps/web/lib/constants.ts). Native pnpm dev sets NODE_ENV=development automatically, so this path is fine. It is a real trap only if you instead run hivecfm-core via the full docker compose up -d (a production build, IS_DEVELOPMENT false) — confirmed live 2026-09-09: /auth/signup returns a plain 404 with zero explanation until IS_HIVECFM_CLOUD=1 is added to .env. See hivecfm-core-env for the full writeup.
Troubleshooting
Port 3000 already in use. apps/web/package.json’s dev script hardcodes next dev -p 3000 — there is no built-in 3001 fallback. On a shared box, find what already owns it with sudo lsof -i :3000; if it’s yours to change, either stop that process or run the app on a different port directly: pnpm --filter @hivecfm/web exec next dev -p 3011 --turbopack, then set WEBAPP_URL / NEXTAUTH_URL in .env to match before logging in (NextAuthNextAuthThe auth library HiveCFM Core uses to handle sessions, OAuth providers, and credentials. rejects a mismatched callback origin).
Postgres/RedisRedisIn-memory key-value store used for caching, sessions, and rate limiting. Runs on port 6380 locally. connection refused on 5432/6379. These are the ports docker-compose.host-ports.yml maps — same-to-same, not offset. If something else on the box already owns 5432 or 6379 (common on a shared box), you cannot change just the host side of that file without also editing your local DATABASE_URL/REDIS_URL to match; simplest is to isolate your whole stack with a -p <project-name> prefix plus your own container_name/network-name/volume-name overrides — Compose ignores -p for all three unless you set them explicitly. If pnpm --filter @hivecfm/database db:migrate:dev cannot connect, first confirm the host-ports override was actually applied (docker compose -f docker-compose.yml -f docker-compose.host-ports.yml up -d), not just the bare docker compose up -d.
Docker build runs out of memory. The Next.jsNext.jsReact framework used by HiveCFM Core. Handles routing, server rendering, and API routes in one bundle. build peaks around 8 GB. On small VMs, increase Docker’s memory limit or build the web app natively with pnpm --filter @hivecfm/web build.
PrismaPrismaThe TypeScript ORM HiveCFM uses to talk to Postgres. The schema lives at packages/database/schema.prisma. client is stale after pulling main. Re-run pnpm --filter @hivecfm/database db:migrate:dev. It will both migrate and regenerate.
HubHubThe Go service that owns background processing, integrations, and the admin API. Sibling to Core. container unhealthy. Check docker logs hivecfm-hub-api. The most common cause is hivecfm_hub Postgres database not initialised; the hivecfm-hub-db-init one-shot container handles that — inspect its logs.
Superset login fails. The admin password is set by SUPERSET_ADMIN_PASSWORD in .env. If you forgot to set it, regenerate with openssl rand -hex 32 and restart the Superset container.
More: Runbooks collect the longer debugging procedures.
Running on AWS EC2 via SSH
If your pnpm dev and Docker stack are on a remote EC2 instance (not your laptop), every port in the table above is bound to 127.0.0.1 inside the instance. You reach them from your laptop by forwarding the ports over SSH.
Do not open these ports in the EC2 security group. They have no auth in dev mode — exposing them publicly would hand the database and admin UI to the internet. SSH tunneling is the only safe path.
One-shot tunnel (every port you need)
From your laptop, run:
ssh -N \
-L 3000:localhost:3000 \
-L 4100:localhost:4100 \
-L 3002:localhost:3002 \
-L 9001:localhost:9001 \
-L 8090:localhost:8090 \
-L 5432:localhost:5432 \
-L 6379:localhost:6379 \
-i ~/.ssh/your-ec2-key.pem \
ubuntu@<ec2-public-dns>Adjust 3000 to whatever port you actually started pnpm dev on if you changed it (see the Troubleshooting section above) — the app has no fixed 3001 fallback.
- Expected: Terminal hangs with no output — that means the tunnel is open.
-Nsays “don’t run a remote command, just forward ports.” - Verify (on your laptop): open http://localhost:3000 in your browser — the HiveCFM login page loads.
curl http://localhost:8090/healthreturns{"status":"ok"}. - If “bind: Address already in use”: another process on your laptop owns one of those ports. Find it with
lsof -i :3000(mac/Linux) orGet-NetTCPConnection -LocalPort 3000(Windows) and stop it. - If “channel 3: open failed: connect failed: Connection refused”: the service isn’t listening yet on the EC2 side. SSH into the instance and check
docker compose psor thatpnpm devis running inside tmux. - If the tunnel drops every ~10 min: add
ServerAliveInterval 30to your~/.ssh/config(next section). - search-hint:
ssh -L multiple ports tunnel
Permanent setup via ~/.ssh/config
Tired of typing the full command every time? Add this to ~/.ssh/config on your laptop:
Host hive-ec2
HostName <ec2-public-dns>
User ubuntu
IdentityFile ~/.ssh/your-ec2-key.pem
ServerAliveInterval 30
ServerAliveCountMax 3
LocalForward 3000 localhost:3000
LocalForward 4100 localhost:4100
LocalForward 3002 localhost:3002
LocalForward 9001 localhost:9001
LocalForward 8090 localhost:8090
LocalForward 5432 localhost:5432
LocalForward 6379 localhost:6379Then just: ssh -N hive-ec2 (or drop -N if you also want a shell).
- Verify:
ssh hive-ec2connects without needing the long command, and forwarding still works. - If “Permissions 0644 for ‘…your-ec2-key.pem’ are too open”:
chmod 600 ~/.ssh/your-ec2-key.pem. - search-hint:
ssh config localforward example
Running pnpm dev so it survives SSH disconnects
A bare pnpm dev dies the moment your SSH session drops. Wrap it in tmux:
# inside EC2 over SSH
tmux new -s hive
# inside tmux:
cd ~/AG-DEV/hivecfm-core
pnpm dev
# Press Ctrl-B then D to detach. The dev server keeps running.
# Reattach next session: tmux attach -t hiveThe Docker stack (docker compose up -d) doesn’t need tmux — the -d flag already detaches it.
Stopping the tunnel
The SSH process holds the tunnel. Stop it on the laptop with Ctrl-C, or kill the PID (pgrep -f "ssh.*hive-ec2"). Stopping the tunnel does not stop services on EC2.
Next
Once the stack is up, read the Dev loop page — it answers the question everyone asks on day two: “I changed a file, do I have to rebuild Docker?”