Ports and local development
Use the right port family for the mode you are running. The local daemon and the Cloud dev stack intentionally use different ports so they do not collide.
KB-1 Local daemon
Section titled “KB-1 Local daemon”| Surface | Default | Notes |
|---|---|---|
| Local UI + API + MCP | http://127.0.0.1:7382 |
The daemon front door. Override with KB1_PORT. |
| Internal Vite web dev server | http://127.0.0.1:5173 |
Used behind pnpm dev; override with KB1_WEB_PORT. |
| Storybook | http://localhost:6006 |
Component library when running Storybook. |
| Docker daemon host port | 17382 |
Used by pnpm docker:up in the daemon repo. |
Cloud dev stack
Section titled “Cloud dev stack”| Process | URL | Notes |
|---|---|---|
| Web | http://127.0.0.1:9987 |
SvelteKit Cloud web app. |
| API | http://127.0.0.1:9988 |
Cloud API Worker in local dev. |
| Self-hosted demo daemon | http://127.0.0.1:7390 |
Uses /tmp/kb1-cloud-dev, never ~/.kb1. |
Start and seed:
pm2 start ecosystem.config.jspnpm --filter @kb-1-cloud/api seed:devpm2 restart kb1-cloud-dev-daemonE2E stack
Section titled “E2E stack”| Process | URL | Notes |
|---|---|---|
| Web | http://127.0.0.1:9787 |
Playwright e2e web app. |
| API | http://127.0.0.1:9788 |
Playwright e2e API Worker. |
| Relay daemon | http://127.0.0.1:7391 |
E2E daemon with isolated temp KB1_HOME. |
Run:
pnpm test:e2eDocs site
Section titled “Docs site”Astro chooses an available local dev port unless configured by the command. Build output goes to:
apps/@kb-1-cloud/docs/distTroubleshooting ports
Section titled “Troubleshooting ports”- If
7382is busy, choose a differentKB1_PORTand update MCP clients to the new/mcpURL. - If the Cloud dev daemon is not connected to relay, reseed and restart the PM2 daemon.
- Do not point agents at the internal Vite port; MCP lives on the daemon front door.
- For disposable docs smoke tests, set
KB1_HOMEto a temp directory so examples never touch real data.