# ngrok

[ngrok](https://ngrok.com/) is a useful tool to enable services running in the cloud to connect to WarpStream Agents running locally for development purposes.

### Install ngrok

Follow the [ngrok installation instructions](https://dashboard.ngrok.com/get-started/setup).

### Run ngrok locally

Run `ngrok tcp 9092`

<figure><img src="https://77315434-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FjB7FxO8ty4EXO4HsQP4E%2Fuploads%2Fgit-blob-e15321b36ae3cca9103660901b044e3acc076cd8%2FScreenshot%202025-07-28%20at%203.00.34%E2%80%AFPM.png?alt=media" alt=""><figcaption></figcaption></figure>

### Run the WarpStream Agent

Run the following command:

{% code overflow="wrap" %}

```bash
WARPSTREAM_DISCOVERY_KAFKA_HOSTNAME_OVERRIDE=2.tcp.ngrok.io WARPSTREAM_DISCOVERY_KAFKA_PORT_OVERRIDE=12023 warpstream agent \
    -bucketURL file:///tmp \
    -agentKey aks_XXXXXXXXXX \
    -region us-east-1 \
    -defaultVirtualClusterID vci_XXXXXXXXXX
```

{% endcode %}

Note that the values of `WARPSTREAM_DISCOVERY_KAFKA_HOSTNAME_OVERRIDE` and `WARPSTREAM_DISCOVERY_KAFKA_PORT_OVERRIDE` need to match the address and port from the "Forwarding" section of the previous step.

### Confirm Connectivity

Run the following command:

{% code overflow="wrap" %}

```bash
warpstream cli diagnose-connection -bootstrap-host 2.tcp.ngrok.io -bootstrap-port 12023
```

{% endcode %}

Note that the value of -bootstrap-host and -bootstrap-port must match the values from the "Forwarding" section of the "Run ngrok locally" step.

If everything is working correctly, you should see output like this:

```bash
running diagnose-connection sub-command with bootstrap-host: 8.tcp.ngrok.io and bootstrap-port: 13067


Broker Details
---------------
  2.tcp.ngrok.io:12023 (NodeID: 1492894352) [warpstream-unset-az]
    ACCESSIBLE ✅


GroupCoordinator: 2.tcp.ngrok.io:12023 (NodeID: 1492894352)
    ACCESSIBLE ✅
```
