# Preview your app

When a session runs a web app on its Cloud Computer, open it in your browser at a private address. Anyone on the team can open a preview; editors can use it.



When your AI Employee starts a web app (for example a Vite or Next.js dev server), HQ notices the
port it listens on and offers to open it. You see the app as it runs on the Cloud Computer, without
setting up anything.

## Open a preview [#open-a-preview]

<Steps>
  <Step title="Start your app in the session">
    Ask the AI Employee to run it, or run it yourself in the terminal.
  </Step>

  <Step title="Select Open preview">
    **Open preview** appears in the session header when an app is running. On a phone or tablet, it is
    the first entry in **More**. With more than one, it shows how many, and you choose a port. Each port names the app or the Docker container behind
    it.
  </Step>

  <Step title="Confirm">
    The preview opens in a new tab at a private address. The first time, HQ asks **Open this
    preview?** so you know which team and port it is.
  </Step>
</Steps>

## Other ports [#other-ports]

Services that are not web pages, such as Postgres or Redis, are listed under **Other ports**. Use
the filter to find one by port or name. To reach them from your own computer, forward the port
with [VS Code](/docs/vscode/ports/) or the [CLI](/docs/cli/port-forwarding/).

## Who sees a preview [#who-sees-a-preview]

A preview needs a signed-in HQ account with access to the AI Team. Secret values that appear in a
preview are masked for viewers. Only one person at a time can hold a given port's preview.

<Callout title="Who can do this">
  Viewers, editors and team owners can open previews. Editors and team owners can use them.
</Callout>

## Related [#related]

<Cards>
  <Card title="Forward ports in VS Code" href="/docs/vscode/ports/" />

  <Card title="Forward ports with the CLI" href="/docs/cli/port-forwarding/" />
</Cards>
