Skip to main content
Sailboxes can make outbound connections by default. Incoming connections need an exposed port. Start your service on 0.0.0.0, then expose its port through Sail.

HTTP and WebSocket services

Start a server inside your Sailbox:
From your machine:
The returned HTTPS URL is on sail.box. Sail handles TLS and forwards requests to the service. WebSockets use the same endpoint. You can also expose the port at creation:
An endpoint being ready does not mean your application has finished starting. Check the service’s health endpoint before sending work.

Raw TCP ports

Use the returned host and port with your TCP client. Sail forwards the byte stream; your service handles its own protocol and authentication.

UDP ports

A guest port can expose TCP and UDP together. They share a public host and port but have separate allowlists. See UDP access control.

Inbound access control

An exposed port is public unless you restrict it. Pass an allowlist when creating or exposing a listener: Entries are alternatives: matching any entry allows the connection. App names from other organizations never match.
Re-exposing a listener replaces its entire allowlist. Omitting the allowlist makes it public again. TCP and UDP listeners accept only addresses and ranges; the service must handle client authentication itself.

Who can operate the Sailbox

Listener allowlists control access to services. The Sailbox’s visibility controls who can run commands, copy files, and manage its lifecycle:
  • Org: anyone in your organization can operate it. This is the default.
  • Private: only its creator can operate it. An org admin can override operations with a recorded reason; SSH remains creator-only.
Set visibility="private" in Python, visibility: "private" in TypeScript, or --visibility private in the CLI when creating a Sailbox. Private visibility does not make exposed ports private. See Access control for visibility changes and SSH rules.

Outbound connections

Use an egress policy to allow only selected destinations, block hosts, or inject credentials into outbound HTTPS requests. An egress policy does not make an inbound endpoint private.

Sleeping services

Traffic to an exposed service wakes a sleeping Sailbox. Manually paused Sailboxes require an explicit resume. See Lifecycle and Autosleep.