Ports
Caged automatically scans for listening TCP ports inside a sandbox and exposes them as public preview URLs.List Ports
Returns all currently detected listening ports for a sandbox.200 OK
Port Fields
| Field | Type | Description |
|---|---|---|
port | integer | Port number |
protocol | string | http or tcp |
preview_url | string | Public URL (HTTP ports only) |
protected | boolean | Whether password protection is enabled |
detected_at | string | When the port was first detected |
Password-Protect a Port
Add password protection to a preview URL.Password required to access the preview URL.
200 OK
How Port Detection Works
- Caged scans
/proc/net/tcpinside the sandbox every 2 seconds - New listening ports are registered in the port registry
- HTTP ports (80, 3000, 4200, 5173, 8000, 8080, etc.) get public preview URLs
- Non-HTTP ports (databases, etc.) are listed but not publicly exposed
- Ports are removed when they stop listening