DEV Community

Cover image for Exposing a Local Service to the Internet with Ngrok: A Quick Guide
Rohan Mostofa Abir
Rohan Mostofa Abir

Posted on

Exposing a Local Service to the Internet with Ngrok: A Quick Guide

If you have ever developed a web service or API on your machine you understand the challenge of allowing others access before it goes live. In this tutorial I will demonstrate how to make a local service accessible, on the internet using Ngrok, a free and simple utility.

Step 1: Install Ngrok

Download Ngrok from

and unzip it.

Step 2:- Initiate Your Local Service

=> for instance if you have a Node.js application operating locally on port 3000:


node app.js

Enter fullscreen mode Exit fullscreen mode

Step 3: Run Ngrok

Open a terminal and type:


ngrok http 3000

Enter fullscreen mode Exit fullscreen mode

Ngrok provides an URL that routes straight, to your local server. You can distribute this URL to anyone no matter where they are!

Step 4: Safeguard Your Endpoint

Ngrok automatically offers HTTPS URLs. To enhance security you might want to use authentication or limit access, by IP addresses.

Why This Matters

Making local services accessible is beneficial for trials, presentations and working with teams prior, to launch. It saves effort. Guarantees your service is reachable securely.

Tip: Always remember to terminate Ngrok once finished to prevent your service from being publicly accessible.

So i hope this helps fellow developers quickly expose and test their local services. Happy coding!

Top comments (0)