tunnel Command
The tunnel command creates a public HTTPS URL that tunnels all traffic to your local development server. This is the fastest way to test webhooks from services like Stripe, GitHub, Slack, and more.
This is the most commonly used CLI command. Start your local server, run hooklistener tunnel --port 3000, and you're ready to receive webhooks.
Usage
hooklistener tunnel --port <PORT> [OPTIONS]Options
| Option | Description |
|---|---|
--port <PORT> | (Required) Local port to tunnel to |
--host <HOST> | Local host to tunnel to (default: localhost) |
--subdomain <NAME> | Request a specific subdomain (requires paid plan) |
--scheme <SCHEME> | Protocol to use locally: http or https (default: http) |
--help | Show help information |
How It Works
- Establish connection: The CLI opens a secure WebSocket connection to Hooklistener's edge servers.
- Get public URL: You receive a unique HTTPS URL (e.g.,
https://abc123.hook.events). - Receive requests: Any HTTP request to your public URL is streamed to the CLI.
- Forward locally: The CLI forwards the request to your local server with all headers and body intact.
- Return response: Your server's response is sent back through the tunnel to the original caller.
Security:All traffic is encrypted with TLS. Your local server never needs to be directly exposed to the internet.
Examples
Basic Tunnel
Expose localhost:3000 with a public URL:
hooklistener tunnel --port 3000Output:
✓ Tunnel established
Public URL: https://abc123.hook.events
Forwarding: https://abc123.hook.events → http://localhost:3000
Ready to receive webhooks. Press Ctrl+C to stop.Custom Subdomain
Request a memorable subdomain (paid plans):
hooklistener tunnel --port 3000 --subdomain my-appThis gives you https://my-app.hook.events — useful for webhook configurations you don't want to update frequently.
Tunnel to Docker Container
Forward to a service running in Docker:
hooklistener tunnel --port 8080 --host host.docker.internalLocal HTTPS Server
If your local server uses HTTPS:
hooklistener tunnel --port 3000 --scheme httpsCommon Integrations
Once your tunnel is running, configure these services with your public URL:
- Stripe: Dashboard → Developers → Webhooks →
{tunnel_url}/stripe/webhook - GitHub: Repo Settings → Webhooks →
{tunnel_url}/github/events - Slack: App Settings → Event Subscriptions →
{tunnel_url}/slack/events - Twilio: Phone Number → Messaging →
{tunnel_url}/twilio/sms
Troubleshooting
Connection refused
Make sure your local server is running on the specified port. The tunnel forwards requests, but they'll fail if nothing is listening.
Tunnel disconnects frequently
This usually indicates network instability. Check your internet connection, VPN, or firewall settings. The CLI will attempt to reconnect automatically.
Subdomain already taken
Custom subdomains are first-come, first-served. Choose a different subdomain or upgrade to a plan with reserved subdomains.