How to Share Localhost Website Live Online for Free (Ngrok Trick)


If you are a web developer, freelancer, or a beginner, you might have faced this problem. You created a website on XAMPP or WAMP, and your client asks to check the project right now. You have a few methods for this. You can show the project using remote access, or you can make a video. But it will not give the real feel of checking it directly. If the client wants to check it directly, you have to make it live, and hosting is required for that. But what if there is a solution where you can show any client the project running on your localhost directly, and the client can check it on their mobile phone or laptop? How amazing would that be!

Buying cPanel hosting and uploading a database for a 5-minute demo is a time-consuming process. So what is the solution? In this tutorial, we will see how to share your localhost project live with the world in 2 minutes without any hosting. You can show your client how the project works. By this process, we can share our localhost XAMPP or WAMP project live with our client without any hosting or remote access. The client can easily check the project on their computer or mobile. For this, we will use ngrok.

Why use ngrok?

  • 100% Free: No domain or hosting is required to show a demo.
  • Secure (HTTPS): The client gets a professional and secure link.
  • Instant Live: The PC website becomes live with just one command.

Step-by-Step Guide

Let's understand step-by-step how to make localhost public using ngrok.

Step 1: Download and Setup

First of all, we need to download ngrok. To download it, click the link below and you will visit the Microsoft Store where you can easily download it.

If you get an error after downloading from the Microsoft Store and it does not work, download the direct file. In that file, you will find the ngrok software, and you just have to install it. People make a mistake and install it from the Microsoft Store, which causes the 0xc0000142 error. You don't have to do that. Go directly to the official Ngrok website and download the "Windows (Zip)" version. Extract the file to your computer. You will only get an ngrok.exe file; just double-click to open it. (No installation is required for this!)

Step 2: Connect Your Account (Auth Token)

Create a free account on the Ngrok website. You will get an Auth Token in the dashboard. Paste this command in your Ngrok black terminal and press Enter:

ngrok config add-authtoken YOUR_TOKEN_HERE

(Note: You only need to do this step the first time).

Step 3: The Magic Command (Go Live )

Make sure your XAMPP and Apache server are ON. Now type this in that black terminal:

ngrok http 80

As soon as you press Enter, you will get a live link next to Forwarding (like: https://abcd.ngrok-free.app).

Pro-Tip for Subfolders: If your website is inside a folder in htdocs (like web), send the link to the client like this: https://abcd.ngrok-free.app/web/. The client will click on this link, and your PC's project will open directly on their mobile!


Frequently Asked Questions (SEO FAQs)

Q1: Is Ngrok safe for my computer?

Yes! Ngrok is 100% safe and encrypted. It only exposes the specific local port (like port 80 for Apache) and acts as a secure tunnel. Once you close the CMD window, your connection is completely private again.

Q2: How long does the free Ngrok link last?

The free Ngrok session lasts up to 2 hours. If it expires or you restart your PC, you just need to run ngrok http 80 again to get a new, fresh live URL.


Please Share

Recommended Posts:-