- Public: anyone who has the URL. Use it for a demo or a webhook receiver.
- Private: only the people you send a link to. Use it for work that is not ready to show.
Publish a port
By default a published port is public, so anyone who has the URL can open it. Publishing only creates the URL and does not start a server, so start your server on that port first. You can give the port a name to tell it apart in the list.Make a port private
A private port answers only requests that carry its token. The publish prints a link that contains the token. The link is shown once, so copy it and share it with the people who need the app.tokenUrl field.
- In a browser, a person opens the link once. The link sets a cookie, so every later request from that browser gets through, WebSockets included.
- From a script, send the token in an
Authorization: Bearer ibp_…header.
401, and it does not wake a paused machine.
Replace a private link
When a link has reached someone who should not have it, rotate the token to get a new link. The old link stops working at once, and the connections that used it are closed.--public, or "access": "public" in the API.
List and unpublish ports
List a machine’s ports to see their URLs and which ones are private.Serve a folder
An agent that works inside the machine often wants to show a result, such as a report it built. Inside the machine,instabox-port serve starts a static server for a folder that has an index.html and
publishes it in one step.
instabox-port is missing from a machine, run instabox port setup dev to install it.
Reach a paused machine
A visit to the URL wakes a machine that paused itself after idle minutes. The request waits for the resume, so a phone app or a webhook can call the URL without starting the machine first.instabox wake dev does the same without a request.
A machine that you paused or stopped stays offline until you resume or start it. The URL is the
same afterwards. After a stop, start your server again.
Serve a port on your own domain
The URL is on the InstaBox domain. To serve the app at a name such asapp.example.com, run a
reverse proxy on your domain that passes requests to the port’s URL. See
Use your own domain.
Reach a port only from your computer
When a service should not have a URL at all, you can forward its port over SSH and reach it on your own computer. This works for any TCP service, such as a database or a debugger. See SSH.Limits
- A machine has up to 16 published ports.
- Ports 1024 to 65535 can be published. The desktop port 5901 and the Orca port 6768 are reserved.
- A private link is shown once, because the server keeps only a hash of the token. Rotate the token to get a new one.
- Renaming a private port keeps it private. Making it public with
--publicdrops the token. - The private link carries the token as
?_token=ibp_…. Opening it sets the cookie__Host-instabox_port_authand redirects to the plain URL. - A response header (the status line and all fields) may be up to 24 KiB. A larger one, such as one
with many large cookies, gets the platform’s
502page instead of the app’s response.
Raw TCP ports (preview)
Raw TCP ports (preview)
Where the server enables it, psql and libpq 14 and later send SNI. PG17 and later may add
instabox port publish dev 5432 --tcp prints
5432-<id>.<tcp domain>:443 for raw TCP, such as Postgres or Redis. Connect with TLS and that name
as SNI:sslnegotiation=direct. For older
clients, use stunnel or instabox port-forward.- The service in the machine sees plain TCP and must use its own password.
- A raw TCP port is always public:
--privatedoes not apply to it. - It is in preview, for admins only, until the server opens it to everyone. Then it is for paid plans only, with a per-workspace limit.
- A connection counts as activity only while bytes flow. An idle pooled connection does not keep the machine awake, so keep pool idle timeouts under minutes or send keepalives.
Run commands
Start a server as a background job that keeps running.
Auto-pause and max-run
When a machine pauses itself and what wakes it.