I'm trying to install ngrok
(which I've been using for a while on Windows with no issues) on my 1 week old yosemite and these are the steps I've followed so far.
Downloaded ngrok from here https://ngrok.com/download.
Unziped the file and copied the Unix Executable File into application.
Now from what I understand I just need to open the terminal, move inside the application folder and write ngrok http 80
. The result of this is "command not found".
I've even signed up at the ngrok
website and run from terminal the command ./ngrok authtoken "blablabla"
and the result is "No such file or directory"
Can anyone tell me how to proceed to be able to activate the tunnel with ngrok
?
Ngrok can be installed with Yarn , then you can run by power Sheel. it's was the only way that worked for me in windows 10 . In the begin you need to install the Node : https://nodejs.org/en/. and the yarn: https://nodejs.org/en/.
In shorts,ngrok should be in same directory in which you are running ngrok command.
For installation in Windows : Download and extract to any directory (lets say c drive)
Then double click on the extracted ngrok.exe
file and you'll be able to see the command prompt
.
And just type ngrok http 4040 // here I am exposing [port 4040]
On Windows ngrok.cmd works well from Git Bash, not ngrok
With Homebrew already installed on your Mac, you can easily install ngrok from the terminal, using this command:
$ brew cask install ngrok
Then run it from the shell using this command:
$ ngrok http 8000
With this command, you're telling ngrok to basically create a tunnel to your localhost 8000 and assign an internet name host for it. And thats it. You should be good to go.
Execute the following command into the terminal :
sudo cp ngrok /usr/local/bin
Now your ngrok execuatable file is successfully copied to the /usr/local/bin directory. Now you are able to run the ngrok command in the terminal
This is how I got it to work..
For Mac
For Windows 10 bash:
The only solution that worked for me was
yarn global add ngrok
yarn global add exp
with npm I was getting permission errors etc..
On Windows 10, for me
ngrok http 80
behaves like this:
For Linux :https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
For Mac :https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-darwin-amd64.zip
For Windows:https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-windows-amd64.zip
unzip it
for linux and mac users move file to /usr/local/bin
and execute ngrok http 80
command in the terminal
I don't have any idea about windows
just download it , unzip it run
./ngrok http 80
In my case, I kept ignoring the instructions that very explicitly tell you to use a terminal on Mac OS, because it looked like it was unzipping correctly:
On Linux or Mac OS X you can unzip ngrok from a terminal with the following command. On Windows, just double click ngrok.zip to extract it.
unzip /path/to/ngrok.zip
However, as soon as I tried running the above command in my terminal, it worked perfectly fine!
I have also faced this issue on my MacOS, I used these simple steps and it worked for me.
Just open the terminal and go to your project folder where you what to start ngrok and then unzip downloaded file.
$ unzip /path/to/ngrok.zip
After doing this you don't need to authenticate ngrok, just run this command:
./ngrok http 80
It should work now.
Short answer: Put the executable file in /usr/local/bin
instead of applications. You should now be able to run commands like ngrok http 80
.
Long answer: When you type commands like ngrok
in the terminal, Macs (and other Unix OSs) look for these programs in the folders specified in your PATH
. The PATH
is a list of folders that's specified by each user. To check your path, open the terminal and type: echo $PATH
.
You'll see output that looks something like: /usr/local/bin:/usr/bin:/bin
. This is a :
separated list of folders.
So when you type ngrok
in the terminal, your Mac will look for this executable in the following folders: /usr/local/bin
, /usr/bin/
and /bin
.
Read this post if you are interested in learning about why you should prefer usr/local/bin
over other folders.
Windows:
//Do not worry about auth step
run sudo npm install ngrok --g a very simple way to install
sudo because you are installing it globally
I had followed the instructions as per the ngrok download instructions:
So the file downloaded to ~/Downloads
But I still needed to move ngrok into my binaries folder, like so:
mv ~/Downloads/ngrok /usr/local/bin
Then running ngrok
in terminal works
add line in .zshrc
# vi .zshrc
alias ngrok="/usr/local/lib/node_modules/node/lib/node_modules/node/lib/node_modules/ngrok/bin/ngrok"
You can use Snap for downloading ngrok
. Follow the steps below:
Install Snap
by following command:
sudo apt install snapd
Install Ngrok
by following command:
sudo snap install ngrok
Now use ngrok
command from any directory, like this:
ngrok http 8080
Source: Stackoverflow.com