Skip to content

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.

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.
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:

Terminal window
pm2 start ecosystem.config.js
pnpm --filter @kb-1-cloud/api seed:dev
pm2 restart kb1-cloud-dev-daemon
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:

Terminal window
pnpm test:e2e

Astro chooses an available local dev port unless configured by the command. Build output goes to:

apps/@kb-1-cloud/docs/dist
  • If 7382 is busy, choose a different KB1_PORT and update MCP clients to the new /mcp URL.
  • 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_HOME to a temp directory so examples never touch real data.