AITM reserves one contiguous Docker port range for the containers of all managed projects. This page explains how that port pool works and why the CORS check is a separate concern.
Docker Ports & CORS Access
1. One shared port pool
AITM reserves a single contiguous Docker port range (default 20000–20050, 50 ports) for the containers of all managed projects. The range is defined in AITM's src/constants.ts and can be overridden via release/docker/.env (AITM_PROJECT_PORTS_START / AITM_PROJECT_PORTS_END), or in Settings → Projects & Memory (projectPortRange).
| Concept | What it controls | Where it's configured |
|---|---|---|
| Docker port-publish range | which container ports Docker publishes to the host so a browser can reach them | release/docker/.env (AITM_PROJECT_PORTS_START/_END) or Settings → Projects & Memory → projectPortRange |
| CORS allowed origins | which browser origins AITM allows through its OriginPolicy | AITM server configuration, independent of the port range |
This is a shared pool, not one dedicated port or IP address per project. A project's Web Port just needs to fall inside the published range to be reachable from the host browser — AITM does not hand out separate IP addresses per project.
2. CORS is a second, independent check
Docker publishing a port and AITM allowing a CORS origin are two separate conditions. For a project's container to be reachable from a browser, both must hold: the port must be published by Docker AND the browser origin must be allowed by AITM's OriginPolicy. Satisfying only one of the two is not enough.
Practical guidance
- If a new project's dev/test server port falls outside the published range, everything will appear to work fine inside the container but be unreachable from the host browser.
- The fix is to move the project's port inside the published range (or widen
projectPortRangein Settings) — not to request a new IP address. - If the port is fine but the browser still reports a CORS error, the issue is the
OriginPolicy, not the port range — it's a separate check.