Network Contract π‘ BETA
Use this runbook when you need the authoritative ports, base URLs and path prefixes instead of repeating them in another page.

When to use
- Before changing a reverse-proxy route, a health check or a client base URL.
- When a page needs a port; link here instead of copying a number into prose.
- Do not use it to guess a route: the generated endpoint reference is the catalog.
Before you start
| Authority |
What it fixes |
Root AGENTS.md |
Ports, service roles and login/signup exclusivity. |
botui/src/main.rs |
Suite, cloud and login listener defaults. |
botserver/src/main_body.rs |
config.server.port for the API process. |
Caddy config on the proxy container |
Live hostnames and routing. |
Steps
- Read the table below and confirm the surface you are changing.
- Check the client base URL and the WebSocket URL against it.
- Validate the Caddy configuration before reloading it; a page request that returns 200 may still be the home page because of
try_files.
- Update the caller, then re-run the Verify table.
| Surface |
Port |
Authority |
| Suite (botui) |
3000 |
botui/src/main.rs (unwrap_or(3000)) |
| Cloud (botui) |
4000 |
botui/src/main.rs (unwrap_or(4000)) |
| Login (botui) |
5000 |
botui/src/main.rs (unwrap_or(5000)) |
| API + WebSocket (botserver) |
8080 |
botlib/src/http_client.rs (DEFAULT_BOTSERVER_URL) |
| Production API (container) |
5858 |
Container health check |
| Use |
Base URL |
| REST |
http://localhost:8080/api |
| WebSocket |
ws://localhost:8080/ws |
| Suite |
http://localhost:3000 |
| Cloud |
http://localhost:4000 |
| Login / signup |
http://localhost:5000 |
Verify
| Rule |
Evidence |
/api is the local REST prefix |
The only local /api/v1 route is the legacy sandbox exec route. |
Drive transfer uses /api/files/* |
Listed in the API command catalog. |
/chat/* is not a REST prefix |
Chat runs over the WebSocket pipeline. |
| Deploy gateway |
Listens on 5860 in run_axum_server.rs. |
| Who serves what |
Suite serves suite pages, cloud serves store/dashboard/plans, login serves auth only, botserver serves API payloads and fragments β never a complete HTML page. |
| Login exclusivity |
Sign-in pages are served only on port 5000; the cloud front end redirects there. |
Roll back
- Restore the previous Caddy configuration from the
/tmp copy and validate it before reloading.
- Restore the previous client base URL; do not leave a client pointing at a port that another service owns.
- Re-run the Verify table and compare page
<title> values against the home page.
Limits
| Claim |
Status |
| A product port of 8000 or 9000 |
Not used by the product. |
A /files/* transfer route |
Not the contract; use /api/files/*. |
| Sign-in pages |
Redirected to port 5000; no other surface serves them. |
| Unlisted ports |
Not documented; a port must come from the authority table above. |