> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/account-settings/tunnel-devices.md).

# Tunnels

Devices are machines in your network running the `tvtunnel` agent. With a device connected, cloud runs can test apps that are not reachable from the public internet — the app URL stays unchanged and traffic between the run and your network is end-to-end encrypted.

![The Tunnels settings panel](/files/IzAqWiKeJhR2q3lt38NA)

## Connect A Device

1. Select **Settings** from the navigation rail, then **Tunnels** under Workspace.
2. Get an API key to use as the token from **Settings → CLI & API keys** — see [API keys](/account-settings/api-keys.md).
3. On a machine inside your network (Node 20+), run the command shown in the panel for your OS. Each command downloads the `tvtunnel` agent bundle from your TestVibe server, then runs it from that local file — this avoids `npx` fetching a remote tarball directly, which npm 12+ blocks by default.

**Windows PowerShell:**

```powershell
iwr <agent-tarball-url> -OutFile tvtunnel.tgz; npx --yes ./tvtunnel.tgz --token <your-api-key> --server <your-testvibe-url>
```

**macOS / Linux:**

```bash
curl -fsSL <agent-tarball-url> -o tvtunnel.tgz && npx --yes ./tvtunnel.tgz --token <your-api-key> --server <your-testvibe-url>
```

The panel fills in the actual tarball URL, token, and server for you — copy the command shown there rather than retyping it.

4. The device appears in the list automatically when `tvtunnel` connects with one of your API keys.

## How Runs Use Devices

* A project's tunneled runs use the project's pinned device, falling back to the **Default** device.
* If no device is connected, runs against private URLs fail to reach the target — the public-URL path is unaffected.
* Keep `tvtunnel` running as a service on a stable machine; a laptop that sleeps will take your tunnel down mid-run.

## Related Help

* [API keys](/account-settings/api-keys.md)
* [Configure environments and App Repository](/workspace/configure-site-url-and-repository.md)
* [Run failed](/troubleshooting/run-failed.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.testvibe.com/account-settings/tunnel-devices.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
