Public URLs
Every sandbox port you publish gets a stable public HTTPS URL served by the VoidRun gateway. Requests are routed to the sandbox on that port, and the gateway transparently wakes asnapshotted sandbox on the first request. That means you can expose a dev server, agent UI, or webhook target without running a tunnel or SSHing into the VM.
Stable HTTPS
One URL per published port. TLS terminated at the gateway; no certificates to manage inside the sandbox.
Cold-wake on demand
A request to a public URL while the sandbox is
snapshotted wakes it and then proxies the request.WebSocket friendly
The gateway forwards WebSocket upgrades to the sandbox, so streaming UIs and PTY-over-web frontends work out of the box.
Publish ports on create
PasspublishPorts when you create the sandbox. Each entry is a TCP port that will receive its own public URL.
Limits and rules
- Up to 4 published ports per sandbox.
- Each port must be 1–65535, and each port must be unique per sandbox.
- Ports are exposed as they are: whatever listens inside the sandbox on
0.0.0.0:<port>(or on the sandbox’s primary interface) is what the gateway forwards to.
Fetch the public URLs
Publishing a port doesn’t tell you the URL directly: you fetch it from the API (or via the SDK). URLs are stable per(sandbox, port) for the sandbox’s lifetime.
Response shape
s<sandbox-id-prefix>-<port>.<base-domain> pattern, but treat it as opaque and use the API/SDK to get the current value: the base domain differs between hosted VoidRun and self-hosted deployments.
Cold-wake behaviour
A request to a public URL for asnapshotted sandbox is not rejected: the gateway holds the request briefly, wakes the sandbox from its snapshot, waits for the port to accept TCP, and then proxies the request. This is transparent to your client, but the first request after a long idle costs one wake:
- Warm request (sandbox already
running): normal proxy latency. - Cold request (sandbox
snapshotted): additional wake budget until the port is reachable. If the gateway can’t wake the sandbox inside its budget, you get a504 Gateway Timeoutwith aRetry-Afterheader.
- Retry idempotent HTTP calls once on
504— the second call is almost always warm. - Long-poll and WebSocket clients should reconnect on network drops as usual; the gateway handles the wake on the reconnect.
- If you need instant response for the first request, call
POST /sandboxes/{id}/wakebefore the traffic hits, or issue a cheap warmup request from your control plane.
Common patterns
Expose a dev server
Webhook receiver
Publish a small HTTP listener as the webhook target. Asnapshotted receiver still receives the delivery: the gateway wakes it on the first webhook and hands it the request. Configure your webhook sender’s retry policy to be tolerant of a cold-start on the very first delivery after a long idle.
PTY / streaming UIs
The gateway proxies WebSocket upgrades transparently. Publish the port your streaming server listens on and connect overwss:// using the URL from getPublicUrl(port).
Security
- Public means public: anything on a published port is reachable from the internet. Terminate auth (API keys, OAuth, signed URLs) inside the sandbox on that port.
- Outbound access to the sandbox is a separate control — see Internet Access Control.
- Public URLs are removed when you delete the sandbox or unpublish the port. In-flight requests are drained; new requests get
404.
Next steps
Sandbox lifecycle
Sleep, wake, and auto-lifecycle — the state machine behind cold-wake.
Internet access
Restrict what a sandbox can reach going outbound.
TypeScript SDK
getPublicUrls / getPublicUrl on the sandbox instance.Python SDK
get_public_urls / get_public_url on the sandbox instance.
