How to use multiple ngrok accounts on one computer in Windows?

Use multiple ngrok accounts on a single computer in windows. ngrok free plan does not allow for multiple ngrok sessions in a single host machine. You got to upgrade to paid plans.

I will show you a small workaround for you to run two processes in the host machine using multiple ngrok accounts. To start with, signup on ngrok to get your authentication token.

Prerequisites

  1. Multiple ngrok accounts (Different authentication tokens)
  2. ngrok

Use Multiple ngrok Accounts on one computer in Windows

Let us take a scenario, of why you would need multiple ngrok processes. If you have multiple projects running on different endpoints that communicate with each other, you want to debug these projects without deploying the code. In this scenario, we use multiple ngrok processes.

I am assuming you already have the setup done and running a single ngrok process on your host machine. I will directly go with the multiple ngrok accounts on a single host machine.

ngrok saves the authentication token at the below path –

C:\Users\{Your_Username}\.ngrok2

The above path contains a YAML file with the name ngrok.yml. The following content is present in the file. It contains the authentication token that you get when you sign up in ngrok.

authtoken: 389C8************************************

Copy and paste the ngrok.yml file at the same location with a new name. I have given the new name as my-ngrok-2.yml.

Open the newly copied file in a text editor, change the auth token related to your second ngrok account. Save the file.

authtoken: frtu65D************************************

You can now connect to your ngrok process using your second account and your newly created YAML file. Below is the simple example command to start an HTTP tunnel forwarding to your local port 80.

ngrok http 80

The above command by default takes the ngrok.yml configuration. In order to pick up your new configuration, modify the command as below.

ngrok http 80 -config="C:\Users\jagdish\.ngrok2\my-ngrok-2.yml"

Run both the above ngrok commands in a separate command line window to connect to multiple processes in a single computer on windows.

Thank you All!!! Hope you find this useful.


Leave a Reply

Up ↑

Discover more from JD Bots

Subscribe now to keep reading and get access to the full archive.

Continue reading