Skip to main content

Quick path

  1. Enter or target a sandbox. In integrations, use the command endpoint to run the same setup inside the Sandbox:
  1. Start your app on an explicit port.
Your app must bind to 0.0.0.0. If it only listens on localhost or 127.0.0.1, the hosted HTTPS URL will not be able to reach it.
  1. Inside the sandbox, run host to start hosting your app. Programmatic integrations can execute the same command in the Sandbox:
  1. Open the public HTTPS URL printed by host:
If the port is protected, the usable URL includes a _token query parameter:
A fresh host <port> URL is protected by default and includes _token. Pass --public only when you want to clear the access token and return an ungated URL.
If you want the process to survive after your SSH command exits, start it as a detached process before hosting the port.

How HTTPS hosting works

When you run host <port>, the sandbox asks the Boat backend to create a stable public route for that sandbox and port. The backend registers a subdomain using the Boat’s current machine address and the port you asked to expose. The generated hostname is based on the sandbox subdomain plus the port:
Boat terminates TLS for on.boat.dev, then proxies each request to the target sandbox over the exposed port. Your application still runs inside the sandbox; the public HTTPS route sits in front of it. This is why your server must listen on 0.0.0.0: the route connects to the sandbox from outside the application process, not through your app’s local loopback interface.
Every hosted address is served under both on.boat.dev and on.ascii.dev (the name from before the rename) with the same label, so SUBDOMAIN-3000.on.ascii.dev and SUBDOMAIN-3000.on.boat.dev are the same route. Links you shared as on.ascii.dev keep working until that suffix is retired (see Migrating from Box); switch what you publish to on.boat.dev whenever convenient.
The sandbox authenticates to the Boat backend with its machine token, and the backend performs the route registration. This keeps routing credentials out of the sandbox environment while still letting the host CLI create, list, and remove routes.

Host CLI reference

The boat host command runs from your local machine. The host CLI runs inside a sandbox. Both expose services from that sandbox on public HTTPS URLs.
The service you expose must listen on 0.0.0.0, not only on localhost or 127.0.0.1.

boat host <sandbox-id> <port>

Expose a running service without opening an interactive SSH session:
The command opens the firewall for that port, registers an HTTPS subdomain, and prints the URL. Calling it again for the same sandbox and port returns the same URL. Use --json to print a machine-readable object with sandboxId, port, url, access, and isProtected. It is a single API call, so it is also the fastest way to host a port from a script:
Pass {"public":true} for an ungated URL.

In-sandbox host <port>

Expose a running service on a stable HTTPS URL:
The command opens the firewall for that port, registers an HTTPS subdomain, and prints the URL. Calling it again for the same port returns the same URL. A Sandbox can host up to 50 ports. If you only need raw access without HTTPS or a subdomain, you can instead open the port yourself with ufw and use http://<sandbox-ip>:<port> directly. By default, host <port> creates a protected URL with an _token query parameter. That protection is sticky: hosting the same port again returns a URL with the same _token query parameter unless you pass --public.

host list

Show hosted ports for the current sandbox:
Protected ports are shown as (gated). host list does not print the access token. Use host url <port> to print the full URL with _token=....

host url <port>

Wait until the HTTPS URL is ready, then print it:
For a protected port, this prints the full token-gated URL:
This is useful when one service needs another service’s public URL:

host hide <port>

Take down the public URL:
This closes public access and unregisters the HTTPS route. It does not stop the local server process. Stop the server separately when you are done. Access tokens are preserved, so hosting the same port again keeps existing protected links valid. To get an ungated URL after a port has become protected, run host <port> --public.

Firewall rules inside a sandbox

You have root, so you can add any firewall rule. Boat reaches the sandbox two ways, and a rule that blocks either one marks the sandbox degraded: Linux tags a tunnel packet with the process that sent the data inside it, so an owner rule on user also hits the tunnel. To block outgoing UDP for user without breaking Boat, allow the tunnel endpoint first:
A sandbox that answers on any route is never stopped or marked error for this. It shows "health": "degraded" with a reason, and sends sandbox.degraded.