How to install ngrok


What is ngrok :- Ngrok is a cross-platform tunneling software that allows secure and encrypted connections to local servers and services from the internet. It creates a public URL that redirects traffic to a specified port on your local machine, making it accessible from anywhere on the internet.

Ngrok is commonly used by developers during the development and testing phases of web applications or APIs. It provides an easy way to expose locally hosted services or applications to external collaborators or clients without deploying them to a public server. This can be useful for tasks like demoing, sharing progress, or receiving feedback on a project before it goes live.

The software works by establishing a secure tunnel between the local server running on your machine and the Ngrok server in the cloud. Ngrok assigns a unique URL to your tunnel, which forwards incoming requests to your local server's designated port. This allows external devices or systems to interact with your locally hosted service as if it were publicly available.

Ngrok offers both free and paid subscription plans. The free plan provides limited features, such as a randomly generated subdomain and a limited number of connections per minute. The paid plans offer additional benefits, including custom subdomains, reserved TCP addresses, and increased connection limits.

It's important to note that Ngrok is a third-party service, and while it can be a helpful tool during development, you should exercise caution when exposing sensitive or production-level services through Ngrok, as it adds an additional layer of complexity and potential security risks.


Installation ngrok

To install Ngrok, follow these steps:

  1. Visit the Ngrok website: Go to the official Ngrok website at ngrok.com . 
  2. Sign up for an account: Click on the "Sign Up" button to create a new account. You can sign up with your email address or use a third-party authentication service like Google or GitHub.
  3. Download Ngrok: After signing up and logging in, you will be directed to the Ngrok dashboard. From there, you can find the download links for Ngrok based on your operating system (Windows, macOS, Linux). Click on the appropriate download link to save the Ngrok executable file to your computer. 
  4. Extract the Ngrok executable: If the downloaded file is compressed (e.g., a ZIP file), extract it to a location of your choice.
  • tar -xvzf 𝘆𝗼𝘂𝗿_𝗳𝗶𝗹𝗲_𝗻𝗮𝗺𝗲.
Note 📝 :- Replace your_file_name with your file name.

4. give executable permission to the Ngrok executable file. 

  1. Open a terminal or command prompt.
  2. Navigate to the directory where you have saved the Ngrok executable file.
  3. Run the following command to give executable permission to the file:
On macOS/Linux:

  • chmod +x ngrok
On Windows:

Right-click on the ngrok.exe file and select "Properties."

In the Properties window, go to the "Security" tab.

Click on "Edit" to change the permissions.

Select your user account from the list and check the "Full control" box.

Click "Apply" and then "OK" to save the changes.

5. Authentication: In order to use Ngrok, you need an authentication token. The token allows you to link your Ngrok installation with your Ngrok account. To obtain your authentication token, go to the Ngrok website, click on your account profile picture on the top right, select "Auth" from the drop-down menu, and copy the token provided.

6. Configure Ngrok: Open a terminal or command prompt and navigate to the directory where you extracted the Ngrok executable file. Run the following command, replacing <your auth token>with the token you obtained in the previous step:

  • ./ngrok authtoken <your-auth-token>
On Windows, use ngrok.exe instead of ./ngrok.

7. Ngrok is now installed and ready to use. You can start creating tunnels by running the Ngrok command followed by the desired options and port number. For example, to expose a local web server running on port 8000, use the following command:

  • ./ngrok http 8000
This will generate a public URL that redirects to your local server, allowing others to access it over the internet.


Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.