Change the ports AI Workspace uses¶
The stack listens on these ports by default:
| Port | Service | Purpose |
|---|---|---|
9643 |
AI Workspace | HTTPS — the browser entry point |
9243 |
Platform API | HTTPS — the backend REST API |
9543 |
API Portal | HTTPS — only when you enable the api-portal profile |
If another process on your machine holds one of these, or your organization reserves it, two approaches move the stack off it. They solve different problems.
Remap the published host port¶
The containers keep listening on 9643 and 9243, and Docker publishes them on host ports you choose. This is the shorter change, and it's enough when the conflict is on your own machine.
-
In
docker-compose.yaml, edit the host side — the left number — of eachports:mapping. This example moves the AI Workspace to8443and the Platform API to8244:Leave the container side and the
healthcheckentries alone. Both run inside the container, where the original ports still apply. -
In
configs/config.toml, pointcontrolplane_hostat the new Platform API host port, so the gateway setup commands the workspace shows carry the published port. Use an address that your gateway can reach:For a gateway in another container on the same machine,
host.docker.internal:8244works. From anywhere else, use the machine's hostname or IP address. Leave[ai_workspace.control_plane] urlonhttps://platform-api:9243— see Two keys that aren't interchangeable. -
Set
APIP_AIW_DOMAIN=localhost:8443inapi-platform.env, so the startup log banner prints an address you can open.
Change the port each service listens on¶
The services bind to different ports themselves. Choose this when something inside the Docker network, such as a reverse proxy sharing it, needs the new port too.
-
In
configs/config.toml, set the AI Workspace listener port under[ai_workspace.server.https], or setAPIP_AIW_SERVER_HTTPS_PORT=8443inapi-platform.env— the shipped key reads that variable. -
Add a
[platform_api.server.https]table. The shipped file omits it, so add the whole table including the certificate paths, which the Platform API requires on its HTTPS listener: -
Point the AI Workspace at the new Platform API port, and give gateways a host address they can reach on the new port:
[ai_workspace.control_plane] url = "https://platform-api:8244" [ai_workspace.gateway] controlplane_host = "<gateway-reachable-host>:8244"As in the previous approach,
host.docker.internal:8244works for a gateway in another container on the same machine. -
In
docker-compose.yaml, update both sides of each mapping, and the health check URLs, which run inside the container against the new listener ports: -
Set
APIP_AIW_DOMAIN=localhost:8443inapi-platform.env.
Two keys that aren't interchangeable¶
Both approaches touch url and controlplane_host, which sit either side of the Compose network boundary:
| Key | Who connects to it | Value |
|---|---|---|
[ai_workspace.control_plane] url |
The AI Workspace container, over the Compose network | A full URL using the internal name and the container port |
[ai_workspace.gateway] controlplane_host |
An AI gateway deployed outside the stack | A bare host:port with no scheme, using the published port |
Nothing in AI Workspace connects to controlplane_host. The value is display-only: the workspace substitutes it into the gateway setup commands the Get Started section shows an admin, such as the APIP_GW_CONTROLLER_CONTROLPLANE_HOST line and the Helm --set gateway.controller.controlPlane.host flag. The admin then copies those commands to the machine running the gateway, which is what makes the connection.
So a wrong value leaves AI Workspace working normally and breaks the gateway instead: the printed commands look right, but the gateway they configure can't reach the control plane and never registers. Give the key an address that's reachable from the gateway's network — host.docker.internal for a gateway in another container on the same machine, or the machine's hostname or IP address from anywhere else. A gateway outside the stack can't resolve platform-api.
Apply the change¶
Recreate the containers so they pick up the new values:
Ports in an OpenID Connect (OIDC) setup
OIDC redirect URLs carry the port. Update APIP_AIW_AUTH_OIDC_REDIRECT_URL and APIP_AIW_AUTH_OIDC_POST_LOGOUT_REDIRECT_URL, and the matching URLs registered in your identity provider. See Connect an identity provider.
Related¶
- AI Workspace configuration — how interpolation tokens deliver values into
config.toml - Get started with AI Workspace — the quickstart these defaults come from