For Homebrew v2.6.x and below:
brew cask install ngrok
For Homebrew v2.7.x and above:
brew install --cask ngrok
The easiest way to use ngrok to tunnel into your localhost is if your local project is running on a specific port (e.g. not using named vhosts). You just run ngrok http [port number]
.
You can quickly boot up a local webserver using ruby. cd
into the project's root directory and run ruby -run -e httpd . -p [port number]
.
- Download ngrok
- Unzip it to your Applications directory
- Create a symlink (instructions below)
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory
cd /usr/local/bin
# create symlink
ln -s /Applications/ngrok ngrok
This will allow you to run the ngrok
command from any directory while in the terminal. Without the symlink, you would need to either cd
into the Applications directory (or wherever you installed the executable) or reference ngrok with its full path every time (e.g. /Applications/ngrok 5000
)
I am getting The file “0f807b1ac344169712a2c1367aa97550fda39e9fe1f55d77363a29421f2c25d4--ngrok-v3-3.10.0-stable-darwin-arm64.zip” couldn’t be opened because there is no such file. It seems it failed to unzip ngrok...arm64.zip file on mac