# 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="/files/Go4jBvOA7bh7LPUvAy8Y" 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 ✅
```


---

# Agent Instructions: 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:

```
GET https://docs.warpstream.com/warpstream/reference/integrations/ngrok.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
