ngrok allows you to expose a web server running on your local machine to the internet. Just tell ngrok what port your web server is listening on. If you don’t know what port your web server is listening on, it’s probably port 80, the default for HTTP.
So, what exactly I can do in the Sitecore context world?
- Well, you might have a local demo, POC on your local laptop and what to share the URL to a potential/existing client.
- Or you want to try a next.js app in the Sitecore JSS context that is hosted on a free account to Vercel and you want to consume data from your local Sitecore instance.
- Or you want to use an external SEO tool that has to crawl your not-ready-launched website?
- Or you want a colleague (that also works from home) to login to your Sitecore instance to help you with something in the backend.
So, there are plenty of reasons and use cases where ngrok might be needed/usefull.
Ngrok service has indeed paid plans, but a free plan too that includes:
- HTTP/TCP tunnels on random URLs/ports
- 1 online ngrok process
- 4 tunnels / ngrok process
- 40 connections / minute
Here is how to get started:
- Sign up for a free account at https://ngrok.com/
- Download and run ngrok.exe (Or use chocolatey)
- Connect local ngrok to your account. You will need to run
ngrok.exe authtoken {Your token should be here}
. The token is saved in~/.ngrok2/ngrok.yml
on your system, for later usages. - Expose your local instance with command:
ngrok.exe http -region=eu -host-header=rewrite http://yourLocalInstance
- Where yourLocalInstance should be your local address that you are using
- -region parameter defines the region where the tunnel will be hosted. If you do not explicitly pick a region, your tunnel will be hosted in the default region, the United States. Here is the list of all supported locations.
- -host-header=rewrite parameter is used so that the Host header will be rewritten to match the hostname portion of the forwarding address, in our case http://yourLocalInstance
- You will get public address that could be shared and used by anyone, that already is https enabled



You can read more about ngrok capabilities in their official documentation in here.