Exposing a local web service to the internet securely with ngrok
May 7, 2021•113 words
This is really useful for so many use cases, for example temporarily sharing locally running services your building with colleges
- Download Ngrok for your platform, from ngrok.com/download
- Unzip the archive, and navigate to it's path or add an alias pointing to it
- Simply run
./ngrok http [port num]
, so if your local app is running on port 300, that would be./ngrok http 3000
- The command line will show a public ngrok domain, which is accessible to anyone through the internet
You may need to log in, to do so, create an account on ngrok, go to dashboard --> autotoken and copy your token.
Then run ./ngrok authtoken [your-token]