# [[Using ngrok]]
_Created: 2025-06-17_ | #ngrok | [[Tech MOC|Tech]]
## Setup
### Installation
```bash
brew install ngrok
```
### Authentication
Before you can use ngrok, you need to add the auth token to the local config.
Find your auth token from https://dashboard.ngrok.com/get-started/your-authtoken
```bash
$ ngrok config add-authtoken 1t....
Authtoken saved to configuration file: /Users/sbhattacharya/Library/Application Support/ngrok/ngrok.yml
```
## Usage
### Serving a local directory
```bash
ngrok http file://"`pwd`"
```
### Service a local http service
```
ngrok http 8080
```
Sending the request to a host which expects a host header.
```bash
ngrok http --host-header grafana.example.com grafana.example.com:443
```