Exposing a local web service to the internet securely with Ngrok

2023-07-27 19:21:49 - lazyhacker

Ngrok proves incredibly useful for various scenarios, such as temporarily sharing locally running services with colleagues

To get started:

1. Download Ngrok for your platform from ngrok.com/download.

2. Unzip the archive and navigate to its path or create an alias pointing to it.

3. Execute the command:

`./ngrok http [port number]` (e.g., `./ngrok http 3000`) to expose your local app on the specified port.

4. The command line will display a public ngrok domain accessible to anyone over the internet.

5. Optionally, create an account on ngrok, go to the dashboard, access the authtoken section, and copy your token.

6. Run `./ngrok authtoken [your-token]` to log in and authenticate your ngrok session.

More Posts