Post

Make your localhost app live on the internet using ngrok.

Make your locally hosted any app to internet by using ngrok

Make your localhost app live on the internet using ngrok.

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

✅ Prerequisites:

  • Your Node.js app should already be running (e.g., on port 3000 or any other port).
  • ngrok installed on your machine.

🔧 Step-by-Step Guide:

1. Install ngrok (if not already installed):

1
npm install -g ngrok

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


2. Start your Node.js app locally

For example:

1
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:

1
2
3
ngrok config add-authtoken 2S6abc123XYZ....


6. Copy and run the command in your terminal:

1
ngrok config add-authtoken YOUR_AUTHTOKEN_HERE

Replace YOUR_AUTHTOKEN_HERE with your actual token


7. Now start ngrok again:

1
ngrok http 3000

You should now see:

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

Click on Visit Site

✅ You’re live on internet!

This post is licensed under CC BY 4.0 by the author.