Pragmatism in the real world

Using ngrok to test on a mobile

To test a website that you’re developing on your local computer on a mobile device such as a phone or tablet use ngrok.

This is the way to do it:

  1. Start up ngrok: $ ngrok http my-dev-site.local:80
    This will start up ngrok and give you a “Forwarding” URL such as
    In this case, it will direct all traffic to that URL to http://my-dev-site.local. If you run
    your website on a different port, such as http://localhost:8888, then use $ ngrok http 8080
  2. If your website’s base url is configured in a config file, then update it to be the Forwarding URL.
  3. Go to the Forwarding URL (, in this example) on your mobile and test!

It’s not hard to do this, but this will save me having to look it up next time!

3 thoughts on “Using ngrok to test on a mobile

  1. I have tried that. I have tested my chat application on two different laptops (using ngrok) and the session was working perfectly fine. But when I opened the URL on my mobile and joined the chat session then I was unable to join that session. My project is based on node.js and

Comments are closed.