Skip to content
Go back

Make your localhost app live on the internet using ngrok.

Published:

To make your local Node.js app live on the internet using ngrok, follow these steps:

✅ Prerequisites:


🔧 Step-by-Step Guide:

1. Install ngrok (if not already installed):

npm install -g ngrok

Or download from: https://ngrok.com/download


2. Start your Node.js app locally

For example:

node app.js

Let’s assume it runs on http://localhost:3000


3. Sign up for a free ngrok account:

Go to: 👉 https://dashboard.ngrok.com/signup


4. Verify your email (if prompted)


5. Get your authtoken:

After login, go to: 👉 https://dashboard.ngrok.com/get-started/your-authtoken

You’ll see something like:


ngrok config add-authtoken 2S6abc123XYZ....

6. Copy and run the command in your terminal:

ngrok config add-authtoken YOUR_AUTHTOKEN_HERE

Replace YOUR_AUTHTOKEN_HERE with your actual token


7. Now start ngrok again:

ngrok http 3000

You should now see:

Forwarding                    https://abcd1234.ngrok.io -> http://localhost:3000

Click on Visit Site

✅ You’re live on internet!


Suggest Changes

Previous Post
Linux Command Line and Shell Scripting Cheat Sheet for Beginners and Practitioner
Next Post
Expose Your Localhost app to the Internet with Custom domain using Cloudflare Tunnel