How to publish a running app from an AI sandbox as a live link
To publish a running app from an AI sandbox in Cohub, run one CLI command, or use the Publish dialog, to point an App at the port your dev server listens on; static output can go out as a folder or a single HTML file instead.
- Who
- Anyone who had an AI agent build a game, demo or tool and now needs other people to open it.
- When
- The preview works in your Space and the next message would be "here's a screenshot".
- Why
- Cohub publishes the Space's file, folder or running port as an App with its own URL and versions, so people get the working thing.

When an agent finishes a working demo, tool, or small game inside your Cohub Space, you can publish it straight from that Space as an App with its own URL and version history instead of sending screenshots. Before running cohub apps publish, answer one question: does the visitor need the process itself, or only the built files?
Port, folder or one file
Your choice comes down to whether the app needs live server code at request time:
- Port: choose this when visitors talk to a running backend—an API, a websocket game server, or server-side rendering.
- Folder: choose this when the project compiles to static assets such as a single-page app, a documentation site, or a multi-page static export.
- Single file: choose this when the whole result fits in one self-contained HTML file, such as a standalone chart or mini-game.
Whenever the project can build to static files, publish static output rather than a port so the link keeps working even after the Space's sandbox idles down.
Publishing a port
A port App routes visitors directly to the process listening inside the Space's ai agent sandbox. Because cohub is already installed in that sandbox, the same agent that wrote the server can publish it when you ask in Chat (for example, to publish the dev server on port 5173 as an App named game):
cohub -s <space> apps publish game --port 5173Because a port App serves a live process, the link works only while that process stays running. Match the Space's idle and auto-destroy policy to how long the server needs to stay reachable.
Publishing a folder
For multi-file static sites, build the project first and publish the output directory. You can publish from the CLI or open the More actions menu on a folder in the Files panel and select Publish:

The Northwind Atlas site shown below is published as a directory App from /workspace with one command:
cohub -s <space> apps publish atlas --dir atlas/site --source workspaceIts map view, station list, and individual station pages live together in atlas/site, and publishing freezes that version so visitors load the published files under the Cohub top bar even while the sandbox sleeps.

If your published app includes a 3D scene, see pixijs 3d model for how a shared PixiJS renderer compares with a separate 3D viewer.
Publishing a single file
When an agent outputs one self-contained HTML page—a chart, calculator, or single-file game—you do not need a build directory or a running dev server. Open More actions on that file in the Files panel and click Publish, or publish that single file through cohub apps publish.
Like a directory App, a single-file App serves the published version directly without keeping a sandbox process alive.
Checking the link works
Before sharing the URL, open it in a signed-out browser window to confirm that visitors see the live App as expected and that relative assets load cleanly. If the App is only meant for teammates inside the Space, pass --visibility space when publishing from the CLI, and remember you can disable an App at any time.
Reference in the docs
This page: Whether an app your agent built should go out as a port, a folder or a single file.
- Apps: publish steps, target limits, versions and custom domains
- Files & Sandbox: ports, previews and sandbox hibernation
FAQ
Does a port App stay up when the sandbox sleeps?
A port App serves the process running in the Space's sandbox. Set the Space's auto-destroy policy to fit how long the server must stay reachable, or publish static output as a directory App.
Can I publish privately?
Yes. The CLI accepts --visibility space, which limits the App to the Space, and Apps can be disabled at any time.
Related
- How to run a multiplayer AI chat in one shared Cohub Space
Cohub turns a multiplayer AI chat into a shared project: friends join one Space, talk to the same agent, see each other's Chats and files, and publish the result as an App.
- Choosing a Replit Agent alternative for collaborative and open-source builds
Replit Agent 4 packages prompt-to-production deployment, domain purchasing, and built-in connectors in one vendor cloud; Cohub trades managed production databases for shared team Spaces, 5-field cron, messaging channels, and Apache-2.0 self-hosting.
- How one Cohub Space works as an AI agent workspace for indie developers
Cohub is an AI agent workspace for indie developers: each Space has a cloud sandbox the agent runs commands in, port previews, one-command publishing and prompts that run on a schedule.