Quick path
- Enter or target a Box. In integrations, use the command endpoint to run the same setup inside the Box:
- Start your app on an explicit port.
- Inside the Box, run
hostto start hosting your app. Programmatic integrations can execute the same command in the Box:
- Open the public HTTPS URL printed by
host:
_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 runhost <port>, the Box asks the Ascii backend to create a stable
public route for that Box and port. The backend registers a subdomain using the
Box’s current machine address and the port you asked to expose.
The generated hostname is based on the Box subdomain plus the port:
on.ascii.dev, then proxies each request to the target
Box over the exposed port. Your application still runs inside the Box; 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 Box from outside the application process, not through
your app’s local loopback interface.
The Box authenticates to the Ascii backend with its machine token, and the backend
performs the route registration. This keeps routing credentials out of the Box
environment while still letting the host CLI create, list, and remove routes.
Host CLI reference
Thebox host command runs from your local machine. The host CLI runs inside a Box. Both expose services from that Box on public HTTPS URLs.
box host <box-id> <port>
Expose a running service without opening an interactive SSH session:
Use
--json to print a machine-readable object with boxId, 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:
{"public":true} for an ungated URL.
In-Box host <port>
Expose a running service on a stable HTTPS URL:
ufw and use http://<box-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 Box:
(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:
host hide <port>
Take down the public URL:
host <port> --public.