In this tutorial, we learn about the complete process of ngrok, how we can install it on windows, and an explanation of what is ngrok and the use of the ngrok via video demo.
Ngrok is a useful tool to create a secure tunnel for locally hosted files and projects using reverse proxy technology. It is used to host any local file or project over the web.
Introduction to Ngrok
Ngrok is a tool, which allows you to expose your local machine server over the internet. Just set your localhost port to the ngrok command.
If you did not know what port is being used by your local host, then it’s probably listening to port 80. Port 80 is also the default for HTTP servers.
Example: Set up localhost port 80 over the internet by using the Ngrok command
ngrok http 80
Ngrok client server is also available for macOS, and Linux https://ngrok.com/download.
How to Install Ngrok on Windows?
Here are very simple steps to install ngrok on a windows machine,
- Go to ngrok download page https://ngrok.com/download.
- Download windows setup (Zip file).
- Extract that zip file then you got a dot EXE file.
- Double-click on the EXE file to open ngrok terminal.
How to Use Ngrok on Windows?
After opening the ngrok terminal, run the below command which takes your local URLs to live to the internet.
ngrok http 80
In the above image first, we run the ngrok command for Port 80 which is a default port. Then ngrok hosted our localhost URL over the Internet by using their random subdomain name.
There are 2 URLs, the first is HTTP which is not secure and another is HTTPS secure URL. You can use both URLs according to your requirements.
Is Ngrok Connection Secure?
The established connection by ngrok is secure and ngrok only sends and receives the data which comes from our localhost connection with the defined port. So for that reason, the damage probability is negligible.
Most of the time, you are using ngrok to give access to someone to test your local application. Ngrok generates the random URL at that time, so ngrok is only accessible while the tunnel is active on the terminal.
Cost of Ngrok
Basic Service: Free and available up to four tunnels and 40 connections per minute.
Commercial Service: Start from $5 per month (provide more connections and custom domains).
Some Command Examples of Ngrok
- ngrok http 80 secure public URL for port 80 web server
- ngrok http -subdomain=baz 8080 port 8080 available at baz.ngrok.io
- ngrok http foo.dev:80 tunnel to host:port instead of localhost
- ngrok http https://localhost expose a local HTTPS server
- ngrok tcp 22 tunnel arbitrary TCP traffic to port 22
- ngrok tls -hostname=foo.com 443 TLS traffic for foo.com to port 443
- ngrok start foo bar baz start tunnels from the configuration file
Here is a complete tutorial and guide about Ngrok. How do we use it and what is the use of ngrok?
If you get any issues please comment below.
- How To Install PHP In Windows 10
- Best YouTube Channels For Programming in 2021
- How to Check Process Running in Windows