Installing ngrok

“ngrok is a simplified API-first ingress-as-a-service that adds connectivity,
security, and observability to your apps with no code changes”

Create a free ngrok account

Install ngrok

On macOS

  • Create the ngrok folder in your user’s opt directory
    mkdir ~/opt/ngrok
  • Step into the new directory
    cd ~/opt/ngrok
  • Move the downloaded installer into the new directory. Replace THEVERSION with the version of the downloaded file
    mv ~/Downloads/ngrok-vTHEVERSION-stable-darwin-amd64.zip .
  • Unzip the ZIP file
    unzip ngrok-vTHEVERSION-stable-darwin-amd64.zip
  • To be able to start ngrok from any directory, add the binary to the PATH. Add this to your ~/.bashrc file where the rest of the PATH statements are
    PATH=~/opt/ngrok:$PATH
  • IMPORTANT: Restart all your terminals for the PATH change to take effect

Verify the installation

When the terminals have been restarted for the PATH change to take effect

  • Test the installation with
    ngrok --version

Connect to your ngrok account

  • Execute this in the terminal to connect to your ngrok account. Get your authentication token from your setup page at 2. Connect your account
    ngrok config add-authtoken YOUR-AUTHENTICATION-TOKEN

Leave a comment

Your email address will not be published. Required fields are marked *