Why ?
Web developers (mostly) develop on localhost using our preferred tools and languages and have a local server to test what we build...
For further actions, you may consider blocking this person and/or reporting abuse
I've fallen in love with Ngrok to achieve exactly what your post describes:
ngrok.com
Yeah, ngrok is way simpler to use
@devansvd thanks for stopping by and the comment.
In what ways is ngrok simpler to use, do you care to explain ?
Maybe a easy to remember command. Never done registration though. Free Link works for 6 hours. Nice article between.
ngrok http 80
@devansvd I did not realize you can use ngrok without registering, thanks for sharing.
@andreasweber if you don't mind please share your thought we one would choose ngrok over solutions above. Or please share why you have actually fallen in love with it.
Thanks for stopping by
There are several reasons, but I must admit, I've never searched for another tool or solution to expose my local services to the open world, without having the hassle configure a bunch of things. Ngrok just works for my use cases.
I heavily rely on third party software to develop web applications (like Auth0 as identity management solution). Most of them send back status updates via webhooks. To reduce overhead and time spent setting everything up I use the custom subdomains feature of Ngrok. With this enabled I am able to configure a consistent webhook endpoint and don't have to reconfigure my development setup, after I stopped the tunnel, to get it going again.
Moreover, with Ngroks local ui I can capture and replay requests. That's awesome to simulate real webhook requests again and again. With one of the latest updates Ngrok implemented the possibility to modify requests before replaying them.
@andreasweber I guess localhost.run and serveo.net are for simpler use cases than. I did not know ngrok had all those bells and whistles but again I never had the need for them and wanted something very simple.
Thanks for the write up
"Now you can give 1 of the above links to anyone to access on the internet" -- this is against most service providers' terms of service today. Nevertheless the following has been around for 15+ years: dyn.com/remote-access/
@dexygen "this is against most service providers" not sure what this means, care to explain ?
dyn.com/remote-access/ sure is an alternative but you do need register before using or not ?
It means if your internet service provide finds out they can terminate your service. And yeah you probably have to register, but why would that be a deal-breaker?
@dexygen it is not a deal breaker per se but why register for a simple use case like mine
thanks for the constructive comments so far.
Guess I'm just trying to let your readers know a) the potential drawbacks of doing this in general, and b) an alternative, especially since somebody tried your method and it didn't succeed at first. I used to like running servers from my home so I'm interested in general but haven't done so in 15 years or so. Thanks for the article and good luck.
@dexygen it is not my readers only they are reading your comments as well ๐
I just had this post in my mind and had to let it free. I belive I gave plenty of alternatives (without actual example thought). I am aware that no solution is perfect and therefore all criticism is well received and in good faith.
I am always greatful of insightful comments like yours so please keep it up.
Just a note: Before you expose any server to the web, check the terms of your ISP's service contract! Some ISPs strictly forbid running public servers on certain plans, and can choose to disconnect your service if you violate those terms.
Spectrum is one such example. While I have no complaints about their service โ best I've ever seen on all fronts, actually โ I do have to pay a little more for Business Internet to be allowed to run a public server. The terms of Residential service just does not permit it.
With these tools you're creating an SSH tunnel and serving to the outside world from their host. How would your ISP even know?
@codemouse92 thanks for your comment, I was not aware this term might be in existence from ISP's side but I was also made aware from another comment earlier thanks for pointing out.
I like these services but I freak a little about security. Specially this one doesn't have any kind of Privacy statement on their website.
I would prefer something hosted by myself.
There may be some docker images to do that by yourself like: docker-tunnel, docker-tunnel (2), etc.
@lardissone The way I see this used is for a few minutes running where I need to test a few quick features and then I turn it down again but you are right I would probably not use it for a mission critical web app.
Thanks for mentioning the alternatives though.
Using "Localhost.run" it says "nothing connected here, check your SSH!"
Any solution?
run your command with debugging enabled
-v
like thisand report back with the output might be able to spot what is going on
Thanks for your reply.
But I still having the same problem. my localhost runs on localhost:80
so I ran this command: "ssh -R 80:localhost:80 ssh.localhost.run -v"
and got the same message: "Nothing connected here, check your SSH!"
@jfbiswajit Are you running on windows ?
I have seen this message that might be from the developer of localhost.run and describes the same error message but no solution
news.ycombinator.com/item?id=14035132
perhaps the windows is not supported at the moment but I have never seen this, I will see if I can get my hands on a windows machine and give it a try.
You might want to try serveo solution as well.
Whoa, very cool. Will definitely give this a try
@beznet I was hoping for people to find useful/cool thanks for stopping by and the comments.
for bash users you can create a bash alias for it like this:
function localserve(){
ssh -R 80:localhost:"$1" ssh.localhost.run
}
and then use it as localserve 3000
@whatthehanan thanks for stopping by and for your addition. Indeed it make life easier if one is using this technique a lot.
Also worth mentioning... Cloudflare Argo Tunnel developers.cloudflare.com/argo-tun... can be used with or without registering for an account
@gabanz thanks for the comment. Added cloudflare argo tunnel to the list of similar services at the end of the post.
very easy to setup,thanks :)
What's append to serveo ? Is it dead ?
Yes seems to be not working, I took a note and edited the post, thanks for posting.
The first "big" one of these I remember using was localtunnel, which is just the same sort of ssh wrapper. For some reason, when things like ngrok came out everyone forgot about it though.
Localtonet is also one of the good solutions.