DEV Community

Laura Weatherhead
Laura Weatherhead

Posted on

The Happy World of ngrok

Current favourite tool: ngrok

  • Have you ever wanted to share something still in development with a product manager, project manager or even another developer just so they could give it a quick click through, maybe give you some pointers, nothing too intense?
  • Have you ever been working with a third-party service (Mailchimp, SendGrid, SparkPost, Twilio, Authy, the list goes on…) and want to use a webhook to channel data around on a dev site?
  • Have you ever been giving a dev talk and thought “it would be great if people could just access this site I’m running locally”, but you don’t want to deploy anything?

Ngrok is the answer. It’s a command line tool that gives access to your local server using a secure URL and an excellent debugging/inspection panel to boot.

It is the best thing. No, really. I am prone to occasional geeking-out on technology-fronts (a certain ramble about how finding the perfect monitor configuration could equate to finding true love springs to mind), but trust me on this one.

Reasons why you should love ngrok as much as I do:

  1. It’s free! (I mean, you can pay if you want custom subdomains etc, but for most development/testing needs the free version is where it’s at)
  2. It’s as easy as cmd ngrok http 80 and boom, you’re up and running
  3. But what if you’re running on IIS express? That’s super easy too: ngrok http -host-header="localhost:[port-number]" [port-number]
  4. The inspection panel is unexpectedly helpful, I’ve never felt so supported by a tool. I mean, I love Fiddler, but there’s just so much functionality I often feel like I’m shortchanging it a bit... (like someone built me a mansion and I’ve moved into the larder to live)

Just to be clear, I am in no way affiliated with ngrok or it’s devs, I am just excitable when it comes to speeding up my own dev processes!

Download it here:

Top comments (14)

flexdinesh profile image
Dinesh Pandiyan

ngrok is my most favourite utility for web app development.

It helps a lot especially when you're developing serverless apps or apps that talk to other entities in the internet. All you gotta do is setup a local server and hook ngrok to your app and see how it works in the cloud.

I'll consider it to be one of the most underrated tools used today.

k4ml profile image
Kamal Mustafa

In case you don't want to use a third party services, you can achieve (almost) similar setup with ssh reverse tunnel and tools like tcpproxy or caddy. I shared about it here -

One thing missing is the request inspection, which I'm still thinking how to get it with existing tools, without having me to code the features myself ;)

tobiassn profile image
Tobias SN

It’s not just for development. I once used it to play a game with a friend without setting up an online server. He had next to no lag whatsoever.

lssweatherhead profile image
Laura Weatherhead

Ahh, genius!!

sebastiandg7 profile image
Sebastián Duque G

Take a look at ;)

lssweatherhead profile image
Laura Weatherhead

Oooh, also looks awesome!

poulad profile image
Poulad Ashrafpour • Edited

I wonder how ngrok is compared to localtunnel.

Local Tunnel works fine for me. It's an npm package and offers JS/Go API for automation.

There is one missing feature though. I can't change the local port number w/o creating another tunnel.

vjnvisakh profile image
Visakh Vijayan

Yup it's really helpful for development mode. We test our APIs like this before passing it on for QA.

c0il profile image
Vernet Loïc

Interesting, I will give a try. I am actually searching for a way to do https locally in a clean way.

lynnewritescode profile image
Lynne Finnigan

Definitely need to try this at some point! 😊

jamesmh profile image
James Hickey

Nice! Hadn't heard of ngrok before. Def. sounds useful for the reasons you mentioned 👌

nickytonline profile image
Nick Taylor

Such a great tool. Love it. Thanks for the post. Looking forward to your next post!

lssweatherhead profile image
Laura Weatherhead

Thank you! :)

mauvehed profile image

As a security professional, ngrok horrifies me.