> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deepest.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Forward a Computer port to your laptop

> Use standard SSH local forwarding to access a service privately without creating a Share link.

Deepest's SSH endpoint supports local TCP forwarding with `ssh -L`. It connects a port on your laptop to a service inside the Computer through your authorized SSH connection.

Use a tunnel for private development tools or a local client. For a browser URL, [Private Preview](https://docs.deepest.dev/network/private-preview.md) is often simpler. For an explicitly anonymous web demo, use [Share](https://docs.deepest.dev/network/share.md). These choices have different access and lifetime rules.

## Start and verify the service inside the Computer

First complete [SSH setup](https://docs.deepest.dev/connect/ssh.md). The Computer must be Running and your public key must be authorized.

In an SSH terminal **inside the Computer**, start a small web server in a directory containing only files you intend to expose:

```bash theme={null}
mkdir -p /root/deepest-tunnel-example
printf 'Tunnel ready\n' > /root/deepest-tunnel-example/index.html
python3 -m http.server 3000 --bind 127.0.0.1 --directory /root/deepest-tunnel-example
```

Keep that terminal open. In another Computer shell, verify:

```bash theme={null}
curl --fail --max-time 5 http://127.0.0.1:3000/
```

Expect `Tunnel ready`. Fix a missing Guest listener before investigating the tunnel.

## Open the tunnel from your laptop

Run this on your **local computer**, using the latest endpoint:

```bash theme={null}
ssh -i "$HOME/.ssh/deepest_ed25519" -o IdentitiesOnly=yes \
  -o ExitOnForwardFailure=yes \
  -p <SSH_PORT> -N \
  -L 127.0.0.1:13000:127.0.0.1:3000 \
  <SSH_USER>@<SSH_HOST>
```

Keep the process running. Successful `-N` operation normally produces no remote shell prompt.

| Part | Meaning |
| - | - |
| First `127.0.0.1:13000` | Listen only on your laptop's loopback address, port 13000 |
| Second `127.0.0.1:3000` | Connect to port 3000 inside the Computer |
| `-N` | Carry forwarding without starting a remote shell |
| `ExitOnForwardFailure=yes` | Fail if the requested forwarding cannot be established |

The local port and remote service port can differ. `ExitOnForwardFailure` does not prove that the application behind the tunnel is healthy.

In a second local terminal:

```bash theme={null}
curl --fail --max-time 5 http://127.0.0.1:13000/
```

Expect the same `Tunnel ready` response. You can also open that local URL in a browser. It is not a URL to send to someone else: their `127.0.0.1` refers to their own computer.

## Keep the scope private

The explicit local bind address keeps this tunnel off your laptop's other network interfaces. Do not replace it with `0.0.0.0` merely to share a demo; use the Share workflow with a clear expiry and revocation action.

A tunnel grants access through your SSH credential. It does not give another Account a Deepest API permission. Forward only services and destinations you own and intend to access. The supported workflow is local TCP forwarding into the Computer; do not infer public arbitrary TCP/UDP exposure, reverse tunnels, a VPN, or a platform SOCKS service.

## Close and reopen

Press Ctrl+C in the local tunnel terminal to close the forwarding connection. That action does not stop the remote web server or the Computer. Press Ctrl+C in the server's remote terminal when that example service is no longer needed.

A Computer Stop interrupts the tunnel and all in-memory application processes. After explicitly starting the same Computer, start the application again if it has no configured startup behavior, fetch the current SSH endpoint, and establish a new tunnel. Retained files do not mean retained TCP connections or live process memory.

The running server consumes the Computer's memory, shared CPU, and any application storage. Creating a local tunnel does not reserve a second Computer or an additional memory pool. Revoking its SSH key prevents new SSH sessions; an existing tunnel may remain until its connection ends.

## Diagnose by layer

| Observation | Next check |
| - | - |
| Local `Address already in use` | Choose another local port, such as 13001; leave the Guest port unchanged |
| SSH authentication fails | Check endpoint, selected key and per-Computer authorization |
| Local listener opens but requests fail | Test `curl` inside the Guest; confirm the intended service and port |
| App is in Docker | Publish its container port onto the Computer first, then tunnel the Computer port |
| Tunnel stopped after Computer Stop | Start the Computer and service explicitly, then reconnect |
| Request times out after mutating an app | Inspect the application's actual state; do not blindly repeat an upload or write |

Agents should test the service inside the Computer, then test the forwarded address, and report which step failed. Repeatedly creating new Computers cannot repair a wrong port or a service that never started.

See [Docker port mapping](https://docs.deepest.dev/environment/docker-and-dev-containers.md), [SSH](https://docs.deepest.dev/connect/ssh.md), and the official [OpenSSH client manual](https://man.openbsd.org/ssh.1).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.