DEV Community

Cover image for ngrok - Expose Your LOCAL WEB Server to PUBLIC Internet (complete guide with Video) 📹
Shahjada Talukdar for The Destro Dev Show

Posted on

ngrok - Expose Your LOCAL WEB Server to PUBLIC Internet (complete guide with Video) 📹

We, all the developers, sometimes in our life felt like - Okay, I have an app running in my localhost and I want to show this app to someone. If I could instantly do that without dealing with deploying to PROD or any Cloud services.

YES, we can do that! Yay! 🙌

ngrok will help us to do that.

To see the COMPLETE GUIDE on how we can do that, please watch the video shared below 👇

SUBSCRIBE to YouTube Channel - https://www.youtube.com/channel/UCy5EgfydCQlVv_AM-FZyYcg?sub_confirmation=1
LIKE FB Page - https://www.facebook.com/the.destro.dev.show/
Follow on Twitter - https://twitter.com/destro_mas
Follow on DEV - https://dev.to/destro_mas

Made with ❤️ in Berlin!

Cheers!
👋

Oldest comments (14)

Collapse
 
crimsonmed profile image
Médéric Burlet

From a security perspective I would not recommend that though. If you need to show it to someone better to make a docker container and run it on a free server on the web or share the container.

Collapse
 
destro_mas profile image
Shahjada Talukdar • Edited

I Fully agree from the Security Point of View.
If you compare this to a Real Cloud Server, then definitely the cloud one will take the slot.
This was created to LEARN/KNOW about a backup plan!
I also prefer a cloud server first.

Collapse
 
crimsonmed profile image
Médéric Burlet

IMO this should never be done. You're exposing your filesystem to the Web and that's pretty if not very dangerous. Specially using a piece of software not following vest security practices.

There are many alternatives to webserver such as static hosting with s3 and more all free.

Thread Thread
 
destro_mas profile image
Shahjada Talukdar

Yeah, for sure.
I would also never use ngrok in any serious work.

Collapse
 
destro_mas profile image
Shahjada Talukdar

Heroku is pretty good and easy.

I also created videos on how to use Heroku

Collapse
 
shaijut profile image
Shaiju T • Edited

Nice 😄, but which company gives free server to run docker forever ?

Collapse
 
crimsonmed profile image
Médéric Burlet

Many ways other than docker like s3 buckets free for 1 year to 3 year with AWS.

Ec2 which can run docker have free one year as well then you can create new account with automation.

Heroku there's a few tricks as well to get unlimited.

And the goal from article was to show someone something. If you are now even thinking wo let this run on your main pc at home on your home network and for more than a year then I guess you brush up on security because that would end up as one of the worst example of Web server setup.

Thread Thread
 
destro_mas profile image
Shahjada Talukdar

I like Heroku a lot.
It's so easy for deploying your app quickly in a few minutes.

And yeah, as you said, no one should run ngrok in their machine for more than a few mins.

Collapse
 
mirrorbytes profile image
Bob

I don't understand how this service was even considered a good idea... this is like bugging your own house, except worse.

Collapse
 
destro_mas profile image
Shahjada Talukdar

I agree with your point!
As I already mentioned in another comment - "no one should run ngrok in their machine for more than a few mins."

Collapse
 
shaijut profile image
Shaiju T

Nice 😄, I have used this to debug a webhook. I agree with others in comments that Security point of view its not good. But i think this is the only option to debug a webhook , isn't ?

Collapse
 
destro_mas profile image
Shahjada Talukdar

We can still deploy webhook to a server( let's say heroku) and see the Debug Logs there.
But sure, that will be time-consuming to change code each time and deploy it, and then see the logs.
ngrok will be faster.

Collapse
 
buckldav profile image
David

ngrok does have some great use cases for DEVELOPMENT. I like using it as a "localhost with https" to test parts of my apps that check for a secure connection. Like mentioned in other comments, "no one should run ngrok in their machine for more than a few mins." Check ngrok.com/product for possible use cases.

Collapse
 
destro_mas profile image
Shahjada Talukdar

Yeah, HTTPS is a good use case.
And right, as you quoted my line - "no one should run ngrok in their machine for more than a few mins." 👍