Setting Ngrok with Docker or Vagrant

Ngrok is great tool, to set it up to work with docker and your specific localhost you need to have account, make authtoken command and then run following to receive both http and https versions of your local environment exposed to internet.

 ngrok http -host-header=example.local 8700

so if your docker is set to example.local:8700, this will work, also if it is plain 80 port, you should also state that. For Vagrant you will need a bit more

ngrok http -host-header=example.local example.local:8023

as we need to ensure that traffic is forwarded to the local hostname of your vagrant instance.

To check status and requests, use this dashboard locally http://127.0.0.1:4040/inspect/http