-bash: ngrok: command not found -bash: ngrok: command not found bash bash

-bash: ngrok: command not found


If the binary is not located in one of the folders stored in the environment variable $PATH you have to provide at least a relative path to your current location. So if you are in the same folder as the binary then you have to call it with ./ngrok


To access from any directory I had to move the binary to $PATH

mv ngrok /usr/local/bin 

in order to call executable from everywhere.

UPDATE: brew install ngrok no longer works because:

Error: No available formula with the name "ngrok"Upstream sunsetted 1.x in March 2016 and 2.x is not open-source.

So you'll need to download binary from https://ngrok.com/download

As for question "What does ngrok do vs Heroku?", ngrok is totally different than Heroku, which is more complex. Ngrok allows you to expose a running local server over the internet using a secure tunnel. Heroku is a cloud hosting platform for web applications. To use ngrok you can just run your local server and expose it via ngrok. Anyone who connects via ngrok to your server is actually communicating to a server running you YOUR local machine. With Heroku, your application is running on hosted virtual machines in the cloud. That is an oversimplification, but in short, NGROk is good for very fast testing of your server by some remote users. It can also be useful for transferring files / data etc. from inside a virtualized environment i.e. a cloud ssh session.


the command has changed to: ngrok http 80

Examples from ngrok:

ngrok http 80                    # secure public URL for port 80 web serverngrok http -subdomain=baz 8080   # port 8080 available at baz.ngrok.iongrok http foo.dev:80            # tunnel to host:port instead of localhostngrok tcp 22                     # tunnel arbitrary TCP traffic to port 22ngrok tls -hostname=foo.com 443  # TLS traffic for foo.com to port 443ngrok start foo bar baz          # start tunnels from the configuration file