> ## Documentation Index
> Fetch the complete documentation index at: https://c42d5cb-opencomputer.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://c42d5cb-opencomputer.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://c42d5cb-opencomputer.manicule.dev/api/mcp.
> Every agent surface: https://c42d5cb-opencomputer.manicule.dev/.well-known/llms-manifest.json

# Preview URLs (/slack/preview-urls)

<!-- agent-signals: reading_time_min: 2 · est_tokens: 769 · updated: 2026-11-12 -->
Related: [Threads](/slack/threads.md), [Shared threads](/slack/shared-threads.md), [Linked and spawned threads](/slack/linked-and-spawned-threads.md), [Mid-turn messages](/slack/mid-turn-messages.md), [Permission modes](/slack/permission-modes.md), [Approvals, questions and plans](/slack/approvals-questions-plans.md)

> A session gives an HTTP server it started on the computer a public URL that anyone with the link can open

<Note>Not in the open-source code yet (preview URLs on a self-hosted instance). On the hosted service this page describes what runs today. On a self-hosted instance today, the session is offered the `preview` tool and every call fails with `preview URLs need an OpenComputer computer; this gateway does not offer them`.</Note>

The session creates the URL with the `preview` tool and posts it in the thread. Ask for it in words: "start the app and give me a preview link".

<Frame>
  <img src="/_assets/3b9f5f23ac466ac24c5aecc0125be0f3c967f9f5e312aeb9498f0c604eae8587" alt="Sam asks for a preview link named pricing-demo and computer replies with https://pricing-demo.opencomputer.app" width="1552" height="1026" />
</Frame>

## URL

| Deployment  | URL                                                                                                                                                               |
| ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Hosted      | `https://<name>.opencomputer.app`                                                                                                                                 |
| Self-hosted | A wildcard domain the operator points at the gateway. The session is not offered the preview tools until the domain is set; see [Gateway](/self-hosting/gateway). |

| Property | Value                                                                                                                         |
| -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Name     | Generated unless you ask for one. A port keeps its existing name.                                                             |
| Access   | Anyone who has the URL can open it; there is no login. A chosen name can be guessed.                                          |
| Traffic  | Plain HTTP on that one port, including streamed responses and WebSocket upgrades. The server must not use TLS.                |
| Lifetime | While the server runs; `503` otherwise. The server stops with the session's runner, at [idle exit](/slack/threads#idle-exit). |
| Removal  | Ask the session to take the URL down. The `unpreview` tool removes it within seconds.                                         |

## Host name checks

Next.js, Vite and webpack-dev-server dev servers refuse requests under a host name they do not expect, and the preview arrives under its public host name. When the tool detects the refusal, its result names the setting to add; the dev server then needs a restart.

| Server             | Setting               |
| ------------------ | --------------------- |
| Next.js            | `allowedDevOrigins`   |
| Vite               | `server.allowedHosts` |
| webpack-dev-server | `allowedHosts`        |
