✅ Step-by-Step Guide to Use Ngrok on macOS
🔹 1. Install Ngrok
If you have Homebrew:
brew install ngrok/ngrok/ngrok
Or download it manually from https://ngrok.com/download and follow the setup instructions.
🔹 2. Sign Up & Get an Auth Token
- Go to https://dashboard.ngrok.com/signup
- After signing in, you’ll find your authtoken under “Getting Started” or in the left menu → “Your Authtoken”.
🔹 3. Connect Your Ngrok Account
Replace YOUR_AUTHTOKEN_HERE with your token:
ngrok config add-authtoken YOUR_AUTHTOKEN_HERE
🔹 4. Start Your Node.js App
Make sure your Node.js development server is running locally (e.g., on port 3000):
gatsby develop
# or
ntl dev
🔹 5. Expose Your Local Server
Now tunnel your local port:
ngrok http 8000
You’ll see output like:
Forwarding https://abcd1234.ngrok.io -> http://localhost:8000
That https://abcd1234.ngrok.io is the link you can safely share with your client.
🛡 Security Tip
- Ngrok does not expose your files—just the server response.
- If your app has an admin area or sensitive routes, consider adding basic auth or password protection while previewing.
