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:

2. Configure ngrok and declare a tunnel

Configure the ngrok class with your authtoken, then declare at least one ngrok::tunnel resource. Currently ngrok requires an authtoken for every endpoint, so set it even when you only tunnel HTTP. For example, declare a single HTTP tunnel to port 80:
To expose a raw TCP port instead, keep the ngrok class declaration above and set proto to tcp on the tunnel:

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: