Preview URLs and shared files
Every server your box runs on 0.0.0.0 gets its own HTTPS address: https://<port>-<box>.detachbox.dev. Links start private to you, and you make a port public when you want to share it. Files on the box get a second address, with share links that work without sign-in.

Open a dev server in your browser
- Start the server on
0.0.0.0on any port from 1024 to 65535. - Open
https://<port>-<box>.detachbox.dev. A dev server on port 3000 of boxmy-boxopens athttps://3000-my-box.detachbox.dev.
Common commands that bind to 0.0.0.0:
npm run dev -- --host 0.0.0.0
vite --host 0.0.0.0
next dev -H 0.0.0.0
python3 -m http.server 3000
rails s -b 0.0.0.0
uvicorn app:app --host 0.0.0.0
HTTPS, websockets, hot reload and server-sent events work through the preview. The app sees each request as coming from localhost:<port>. Vite allowedHosts, Rails config.hosts, Django ALLOWED_HOSTS and Next.js dev need no changes. A request body goes up to 100 MB.
Agents know all this. The shared AGENTS.md tells them the preview address and the 0.0.0.0 rule, so they hand you the link when a server is up. A page the agent opens on localhost:<port> arrives in your browser as the preview URL.
See what the box serves
Open the box and pick Previews. The view lists every listening port with its link, a copy button and a QR code. It checks ports every 10 seconds.
A server on localhost or 127.0.0.1 shows a warning: the link can't reach it. Restart it on 0.0.0.0.
A link that finds nothing shows a detachbox page instead of an error, for example "Nothing is listening on port 3000 in my-box". A stopped box says so too.
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 and each box has its own pass. Opening one port never opens another.
- To open a private preview on your phone, scan its QR code. The phone signs in to detachbox first, then opens the port.
Share a preview with a client
- On Previews, find the port.
- Under Who can open port 3000, pick Public.
- Read the warning in Make port 3000 public? and pick Make public.
- Copy the link and send it.
Anyone with the link now sees what the port serves, with no sign-in. The change takes effect within 5 seconds. Search engines are told not to index public pages, but a link travels: chats, screenshots, browser history.
Make it private again any time. Within 5 seconds the link opens for you alone. A box keeps up to 20 public ports. Public ports keep their addresses while the box is stopped. A reset makes every port private again.
Reach a database or another TCP port
Preview URLs carry HTTP only. For Postgres, Redis or any raw TCP port, forward it over SSH:
ssh -N -L 5432:localhost:5432 <box>@ssh.detachbox.com
Then connect to localhost:5432 on your computer.
Open box files in the browser
Each box also has a files address: https://files-<box>.detachbox.dev/<absolute path>. It serves any file the dev user can read, up to 1 GiB. Sign-in works the same way as for previews.
- Open a test coverage report or a
distfolder as a site. Point the URL at the folder with a trailing/, and itsindex.htmlloads with its relative assets. - An HTML report with assets next to it, like
report.htmlplusreport_files/, opens as a folder. - Assets on absolute paths, such as
/assets/app.js, don't load. For a Vite build, setbase: './'.
The file viewer's Open rendered button opens an HTML file on this address. The terminal guide covers the viewer.
Share a file without sign-in
- Open the file from the terminal:
⌘-click orCtrl-click its path, or tap it on a phone. - In the viewer, pick Share link.
- Under The link works for, pick 15 minutes, 1 hour, 1 day or 7 days.
- Pick Create the link, then Copy link.
Anyone with the link can download that one file, no account needed. The link stops working when its time is up.
Manage shared links
Previews lists your links under Shared files. Each row shows when it expires and how many times it was opened.
- Pick Revoke to end a link. It stops working within 5 seconds.
- A box keeps up to 50 live links. Revoke one you no longer need to make room.
- A reset revokes every link of the box. A clone starts with none.
More on the files address and previews: /features/previews.