Local Hosting

Sharing with ngrok

Use ngrok to give attendees a public URL for an application running on a locally hosted instance.

4 min

Overview

A locally hosted instance is only reachable from your own machine or network. Attendees, Splunk Synthetic Monitoring tests, and anyone outside your network cannot open http://localhost:81 or a private address such as http://192.168.205.185:81.

ngrok puts a service running on your machine online at a public HTTPS URL. Share that URL with attendees and they can use the workshop application as if it were hosted in the cloud.

The workshop application listens on port 81 on every local hosting option:

Hosting optionApplication address from your machine
Dockerhttp://localhost:81
Multipasshttp://<instance-ip>:81
OrbStackhttp://<instance-ip>:81
Proxmoxhttp://<vm-ip>:81

Warning

Anyone with the ngrok URL can reach the application for as long as the tunnel is running. Only share it with attendees, and stop the tunnel when the workshop ends.

Prerequisites

Install ngrok

Install ngrok on the machine that runs the instance. On a Mac:

bash
brew install ngrok

On Windows and Linux, get the agent from the ngrok download page .

Add your authtoken. This only needs to be done once:

bash
ngrok config add-authtoken <your-authtoken>

Start the tunnel

Confirm the application loads in your own browser first, then start the tunnel against the same address.

bash
ngrok http 81

ngrok prints the public URL to share with attendees. Keep the terminal open. Closing it, or pressing Ctrl+C, stops the tunnel.

Every ngrok account, including the free plan, has a dev domain such as your-assigned-name.ngrok-free.app. ngrok http uses it automatically and it does not change when you restart the agent, so attendees can keep using the same URL if the tunnel is restarted.

Free plan limits

The free plan is enough for small workshops, but check its limits before a large session. These are the limits most likely to matter:

LimitFree plan
HTTP requests20,000 per month
Data transfer out1 GB per month
HTTP request rate4,000 per minute
Concurrent agents3

Every page load in the application makes many HTTP requests, so a large group of attendees can use up the monthly quotas quickly. Check current usage on the Usage page in the ngrok dashboard, and consider a paid plan for large workshops.

Free plan browser warning

On the free plan, ngrok shows an interstitial warning page in front of all HTML browser traffic. Attendees select Visit to continue to the application. A cookie then hides the warning for that domain for 7 days.

The warning page can block Splunk Synthetic Monitoring browser tests. To skip it, add the request header ngrok-skip-browser-warning with any value to the test, or set the User-Agent header to a non-standard value such as MyApp/0.0.1. Upgrading to any paid ngrok plan removes the warning page.

Monitor attendee traffic

Open the ngrok web inspection interface at http://localhost:4040 on the machine running ngrok. It shows every HTTP request coming through the tunnel, including the time, duration, source IP, status, and headers. This is useful for confirming that attendees are reaching the application and for troubleshooting failed requests.

Stop the tunnel

Press Ctrl+C in the terminal running ngrok. The public URL stops working.

Troubleshooting

Last Modified ·

Report an issue