ngrok simply makes your locally-hosted web server appear to be hosted on a sub domain of ngrok.com and mapped with ngrok.io, meaning that no public IP or domain name on the local machine is needed.
The ngrok client software is available for Windows, Linux
and macOS and the basic ngrok service is free and permits up to four tunnels
and 40 connections per minute.
Download
ngrok in Windows
To start, open ngrok.com in your browser and click on
Download for Windows and unzip the
file after downloading.
We now need to set up the environment variables for ngrok .Note
- Environment variables help programs know what directory to install files
in, where to store temporary files, and where to find user profile settings
Search for 'Environment
variable' in the windows search option and select 'Edit the Environment
Variables'.
After successfully doing so click on the Environment
Variables and look for Path under the System Variables section and click on Edit.
The path will be C:\Users\Rony\Desktop\ngrok-v3-stable-windows-amd64\
How
to get the path
Right click on the downloaded ngrok file and go to
properties
What you can do now is add location and path
selected above and type the string in the path field.
Lastly check if you are able to run ngrok. Open the command
prompt and enter the below command,
ngrok version
To start a HTTP
tunnel forwarding to your local port 80, run this command on your command prompt
ngrok http 80
You can see two forwarding addresses? ngrok provides both an
https and an http version of the URL that points to localhost. Also notice the port number 4040
The local folders can be shared directly without an HTTP
server through an inbuilt ngrok file server. To share the local folder directly
through ngrok , as a first step configure the authtoken to the ngrok
The authtoken can be retrieved through ngrok dashboard — the
user should sign up for an account, copy the command to set the authtoken by
navigating to the dashboard.
Start the ngrok
Now in order to share something, give the path of the folder
ngrok http “file:///C:\Rony\web_root\myWebsite
Now if you copy the forwarding address in the browser the data will be accessible to everyone having the address.
https://9ec1-2405-201-9009-f1ab-dc-996b-8e67-7597.in.ngrok.io -> file:///C:/web_root/
The
traffic can be monitored through the following URL — http://127.0.0.1:4040
ngrok
is a powerful tool to expose your local services via secure tunnels. You can
use it to expose web servers, API Rest, SSH, game servers, databases, and many
others for free.
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
.png)
1 Comments
You are a life saver, keep going. More power to you
ReplyDeleteI'd love to hear your thoughts!