Skip to main content
This guide explains how to install and configure ngrok with Puppet using the gabe-ngrok module. It covers installing the module, configuring your authtoken, and declaring tunnels.

What you’ll need

1. Install the Puppet module

Install the module from Puppet Forge:
puppet module install gabe-ngrok

2. Configure ngrok and declare a tunnel

Include the ngrok class and declare at least one ngrok::tunnel resource. For example, declare a single HTTP tunnel to port 80:
include ngrok

ngrok::tunnel { 'web traffic':
  proto => 'http',
  addr  => '80',
}
If you need TCP tunnels, configure the ngrok class with your authtoken:
class { 'ngrok':
  authtoken => 'YOUR_AUTHTOKEN',
}

ngrok::tunnel { 'webhook':
  proto => 'tcp',
  addr  => '8170',
}

3. Verify ngrok is running

After your Puppet run completes, verify ngrok is running and your tunnels are active. If you use facter, the module provides an ngrok fact you can query:
facter -p ngrok