A service on
0.0.0.0 needs no flag. For a service that listens only on localhost, 127.0.0.1 or ::1, pass --localhost. See Services that listen on localhost.boat host <sandbox-id> <port>
Expose a running service without an interactive SSH session:
- It opens the firewall for that port.
- It registers an HTTPS subdomain.
- It prints the URL.
Use
--json to print a machine-readable object with sandboxId, port, url, access, isProtected and localhost.
It is a single API call. This makes it the fastest way to host a port from a script:
{"public":true}. For a service that listens on localhost only, pass {"localhost":true}.
TypeScript
In-sandbox host <port>
Expose a running service on a stable HTTPS URL:
- It opens the firewall for that port.
- It registers an HTTPS subdomain.
- It prints the URL.
By default,
host <port> creates a protected URL with a _token query parameter. This protection stays. If you host the same port again, the URL has the same _token, unless you pass --public.
For raw access without HTTPS or a subdomain, open the port yourself with ufw. Then use http://<sandbox-ip>:<port> directly.
host list
Show the hosted ports of the current sandbox:
host listshows protected ports as(gated).host listshows relayed ports as(localhost).host listdoes not print the access token.- To print the full URL with
_token=..., usehost url <port>.
host url <port>
Wait until the HTTPS URL is ready, then print it:
host hide <port>
Take down the public URL:
- It closes public access, unregisters the HTTPS route and turns off the localhost relay.
- It does not stop the local server process. Stop the server yourself when you are done.
- It keeps the access tokens. If you host the same port again, existing protected links stay valid.
host <port> --public.