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

# nsc instance port-forward

Opens a local port which connects to the instance.

`instance port-forward` creates a tunnel from a local port to a port on a Namespace instance. This is useful for accessing services running inside an instance without exposing them publicly.

## Usage

```bash theme={null}
nsc instance port-forward [instance-id] --target_port <port>
```

### Example

Forward local port 8080 to port 80 on the instance:

```bash theme={null}
nsc instance port-forward 85a32emcg99ii --target_port 80
```

```text nocopy Output theme={null}
Listening on 127.0.0.1:8080
```

## Options

<h3 id="--target_port-port">
  \--target\_port \<port>
</h3>

Which port to forward to on the remote instance.
