Skip to main content
Every sandbox has its own HTTPS address, which you find in its url field. If a program inside the sandbox listens on the sandbox’s exposed port, anyone can reach that program at the address, from anywhere, over a secure connection with a valid certificate. You do not need to set up a server, a domain or a certificate yourself. This is useful in many situations:
  • Show a user the app their agent just built, live, while the agent keeps working on it.
  • Share a preview of a branch with a teammate or a reviewer.
  • Receive webhooks from services such as GitHub, Stripe or Slack in a sandbox you are testing.
  • Run a small API or bot without deploying it anywhere.
And because a sandbox sleeps when nobody uses it, a preview that nobody is looking at costs nothing for compute. When the next visitor arrives, the sandbox wakes up and the app is still running.

Serve an app

This example serves a small web app with one page and one JSON endpoint. It only uses Node, which is already installed, and listens on port 3000. Follow the steps to get it running at a public address.
1

Start a sandbox that serves port 3000

response
2

Put the app in

3

Start the server so it keeps running

keep: true makes the server a program that keeps running on its own, even across sleep and wake. The second line waits until the server answers before moving on.
4

Open it from anywhere

output
Paste the url into your browser, or send it to someone. They see the app, over HTTPS, without setting anything up.

A visitor wakes it

This sandbox was created to sleep after one quiet minute. Wait for it to fall asleep, then simply visit the URL again. You do not need to call the API or wake the sandbox first. The first request waits a moment while the sandbox wakes up, then gets its answer from the same server, which still remembers its earlier visits.
output
The started time is the same as before the sleep. That shows the server was resumed, not restarted. Anything it held in memory, such as user sessions, caches or a loaded model, is still there.

Live connections

The address carries more than ordinary page loads:
  • WebSockets work, so features such as live reload, chat and terminals in the browser all work.
  • Streaming responses, such as server-sent events, reach the visitor as your app writes them.
  • An open connection keeps the sandbox awake. A user watching a live page is never cut off because the sandbox went to sleep.

Who can open it

The url is public. Anyone who has the address can open the app, without a Fibre key. The address is long and hard to guess, but treat it like a shared link: add your own sign-in to anything private, and never serve secrets from it.
If you do not want a sandbox reachable from the internet, simply do not run anything on its exposed port. When nothing is listening there, the address answers with an error and reaches nothing inside the sandbox.

Good to know

These details answer the questions that usually come up:
Development servers such as Vite, Next.js and webpack often listen only on localhost and reject requests for unknown hostnames. Start them with --host 0.0.0.0, and add the sandbox’s hostname to the framework’s list of allowed hosts if it has one (for Vite, server.allowedHosts). Preview environments shows a complete example.

Clean up

Preview environments

A preview per pull request, from a repo.

Sleep and wake

What a sleeping app keeps, and what wakes it.

Run commands

Keep servers running with keep.

Browser

Test the app with a real browser in the same sandbox.