Preview URLs
Open what the agent built in your browser, check it on your phone, or send it to a client. Every server a terminal runs on 0.0.0.0 gets its own HTTPS address for it: https://<port>-<terminal ID>.detachbox.dev. Links start private to you, and you make a port public when you want to share it. Previews belong to their terminal: they survive a restart of the terminal and end when you end it.

Open a dev server in your browser
- Start the server on
0.0.0.0on any port from 1024 to 65535. - In the terminal's bar, pick Files and previews. Previews lists the port with its link.
npm run dev -- --host 0.0.0.0
python3 -m http.server 3000 --bind 0.0.0.0
HTTPS, websockets and hot reload work through the preview. Two terminals can run servers on the same port: each one answers at its own terminal's address. The shared AGENTS.md teaches agents the 0.0.0.0 rule, so they hand you the link when a server is up.
Your dev server needs no host settings
Your server sees each request as if it came from a browser on the same computer: the host is localhost:<port>, and the origin and referrer match it. Vite's allowedHosts, Rails' config.hosts, Django's ALLOWED_HOSTS and Next.js dev origins accept it as it is.
Server-sent events and other streamed answers pass through as they come, and a request can carry up to 100 MiB, enough for file uploads to your app.
See what a terminal serves
The Previews panel on a terminal's Files and previews page lists every listening port with the program listening on it, its link, a copy button, an open button and a QR code. It checks ports every 10 seconds.
- A server on
localhostor127.0.0.1gets a warning and a struck-through link: the preview can't reach it, so restart it on0.0.0.0. - A public port with nothing on it stays listed: its link answers once a server starts on that port again.
- With nothing listening yet, the panel shows commands to start a server on
0.0.0.0, each with a copy button.
Get the link from the terminal
detachbox-preview 3000 prints the preview address of port 3000, and detachbox-preview 3000 /admin adds a path. It warns when the server listens on localhost only or nothing listens yet. detachbox-open http://localhost:3000 opens the same address in your browser.
Who can open a preview
Links start private. Only you, signed in to the dashboard, can open them.
- The first visit passes through
my.detachbox.comto check it's you. The preview then stays open in that browser for 12 hours. - Each port has its own pass. Opening one port never opens another.
- A private preview accepts requests only from its own pages. Another site can't fetch it, open its websocket or frame it to steer your clicks.
- Search engines are told not to index any preview, public or private.
Open a preview on your phone
Scan the port's QR code on Files and previews with the phone's camera. A private port makes the phone sign in to detachbox first, then opens the page. A public port opens for anyone who scans the code.
Share a preview with a client
- On the terminal's Files and previews page, find the port under Previews.
- Under Who can open port 3000, pick Public.
- Read the warning in Make port 3000 public? and pick Make public.
- Copy and send the link, or let your client scan the QR code.
Anyone with the link now sees what the port serves, with no sign-in, including whoever copies it from a chat, a screenshot or browser history. Make the port private again any time, and the link closes to everyone else at once. A page someone already has open keeps its live connection until it reloads.
A terminal can have up to 20 public ports. A public port stays public through a restart of the terminal.
When a preview does not open
| The page says | What to do |
|---|---|
| This preview is private | It belongs to another detachbox account. If the terminal is yours, pick Sign in with another account |
| This terminal has ended | Open a new terminal and start the server again for a new link |
| This preview link is broken | Open the link again from the terminal's Files and previews |
| The preview did not open | Pick Try again; write to support with the request ID shown if it keeps failing |
A link that opens but shows an error from your server is your server's answer: read its log in the terminal.
Reach a database or another TCP port
Preview URLs carry HTTP. Run database clients in the terminal next to the database: psql, redis-cli, sqlite3 and the MariaDB client are installed. Keep the database's data in a bind mount under your project folder and it outlives the terminal.