Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

What Is ngrok? How to Test a Local Web App Through an HTTPS Tunnel

Connect a test web app to a temporary HTTPS endpoint, verify that it works, and restrict access before sharing a private demo.

Table of Contents

ngrok gives a local web application a public HTTPS endpoint. The ngrok agent opens an outbound connection to ngrok, which forwards incoming requests to the local port you chose. Developers use it to show a temporary demo or receive a test webhook on a machine they control.

What is NGROK? Detailed instructions for use Picture 1

Test the connection with a disposable demo

  1. Start a test application on 127.0.0.1:8080 and confirm it responds locally. Use sample data and make sure the app contains no private files or credentials.
  2. Install the agent for your OS from the ngrok quickstart. Configure it with the authtoken from your account. Keep that token out of screenshots, logs, and source control.
  3. Run ngrok http 8080 and open the HTTPS URL shown by the agent. If the URL opens but returns a gateway error, confirm the local app is still running and that its port matches.
  4. Terminate the foreground agent with Ctrl+C once you are done. Verify the endpoint no longer forwards to your local app.

What is NGROK? Detailed instructions for use Picture 2

An ngrok endpoint can route traffic to a selected service and apply an access policy.

Control who can use the endpoint

The URL can be reachable from the internet. For a private demo, configure an authentication policy that limits who can sign in before sharing it. Test from an unauthorized session to confirm access is blocked. HTTPS protects a connection in transit. It doesn’t restrict who can open the URL.

For a webhook test, use a dedicated route and verify the sender’s signature using the provider’s documentation. Keep private dashboards, databases, and internal admin interfaces off a public demo endpoint. For background on HTTP routing and request handling, see the backend development learning path.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.