ngrok
Secure tunnels to localhost
Install with Homebrew
brew install --cask ngrok
ngrok — Official Website
Quick Take: ngrok
ngrok remains the default answer when a Mac developer needs a public URL for a local server in 2026. Free tier limits are tighter than the 2010s golden age, but three concurrent endpoints and the request inspector still cover daily webhook work. Hobbyist is the sweet spot for stable branded domains without interstitial pages; Pay-as-you-go is for teams shipping real traffic with custom domains and policy. Cloudflare Tunnel and Tailscale Funnel are credible free/mesh alternatives, and Pinggy undercuts on price—but none match ngrok's combination of speed-to-first-URL and inspect-and-replay workflow.
Best For
- •Developers integrating webhooks (Stripe, GitHub, Twilio)
- •Mobile developers testing against local APIs
- •Freelancers sharing work-in-progress with clients
- •Teams evaluating managed ingress and Kubernetes Operator paths
What is ngrok?
ngrok puts your localhost on the internet. That is the one-line explanation, and it is still the reason millions of developers reach for it in 2026. You are running a web server on your laptop at localhost:3000 and you need to show it to a client, test a webhook from Stripe, or let a teammate hit your API. Normally you would deploy to staging, configure DNS, set up TLS, and wait. With ngrok, you run ngrok http 3000 and get a public HTTPS URL that tunnels traffic to your machine in seconds.
ngrok works by establishing an outbound TLS connection from your machine to ngrok edge servers. When someone visits your ngrok URL, the request travels through ngrok infrastructure and arrives at your local server as if it came from localhost. No firewall rules, no port forwarding, no router settings. The free tier still does what most developers need—HTTP tunnels with an assigned development domain—while paid tiers add stable ngrok-branded domains, custom domains, TCP tunnels, traffic policy, SSO, and production-grade limits.
As of August 2026 the product is an alive ingress platform, not only a toy tunnel. Pricing is Free ($0 with a $5 one-time usage credit, up to 3 online endpoints, 1 GB transfer, 20k HTTP/S requests, interstitial page), Hobbyist ($8/month billed annually or $10 billed monthly, $10 monthly usage credit, 5 GB transfer, 100k HTTP/S requests, ngrok-branded domains, no interstitial), Pay-as-you-go ($20/month base plus usage, unlimited online endpoints, custom domains, team features), and Enterprise for contracts, HIPAA BAAs, and SLAs. Official limits are documented on ngrok.com/pricing and the free-plan limits page.
Beyond core tunnels, ngrok ships Traffic Policy (WAF-style rules, OAuth at the edge, rate limits), a Kubernetes Operator and Gateway API path for cluster ingress, webhook verification for services like Stripe, and SDKs so apps can open tunnels programmatically. On Mac, install via Homebrew (brew install --cask ngrok) or the official binary; Apple Silicon and current macOS releases including Tahoe 26.x are fully supported as a pure Go agent with no Rosetta requirement.
Competition is real: Cloudflare Tunnel remains free for custom domains if you already live in Cloudflare DNS, Tailscale Funnel covers teams already on WireGuard mesh, and newer alternatives such as Pinggy and LocalXpose push cheaper entry paid plans. ngrok still wins on the inspection UI at localhost:4040, one-command setup, and the decade of muscle memory around webhook debugging. If you develop against webhooks or demo local work, it still belongs in the toolkit.
Deep Dive: How ngrok Became the Default Tunneling Tool
ngrok succeeded because it solved a universal developer problem with a single command. Before ngrok, exposing a local server meant configuring port forwarding, dynamic DNS, and self-signed certificates. After ngrok, it meant ngrok http 3000.
History & Background
ngrok was created by Alan Shreve in 2013. The original version (ngrok 1.x) was open-source and written in Go. Version 2.0 (2015) was a commercial rewrite that introduced the paid tier model. By 2020, ngrok was the de facto standard for local tunneling. The 2024 Series A ($75M) from Lightspeed Venture Partners funded the expansion into a full ingress platform with traffic policy, edge computing, and enterprise features. Despite the enterprise pivot, the core tunneling functionality remains accessible on the free tier.
How It Works
ngrok works through a persistent TLS connection from the agent (on your machine) to ngrok's edge servers. When a request arrives at your ngrok URL, the edge server multiplexes it over the existing agent connection to your local machine. The agent forwards the request to your local port and sends the response back. This outbound-only connection model is why ngrok works behind firewalls and NATs without any configuration—your machine initiates the connection, so no inbound rules are needed.
Ecosystem & Integrations
ngrok has SDKs for Go, Python, JavaScript, Java, and Rust that let you embed tunnels directly in your application code. There are IDE integrations for VS Code and JetBrains. CI/CD platforms like GitHub Actions have ngrok actions for automated testing. The ngrok API allows programmatic tunnel management for build systems and test harnesses. The ecosystem is mature because ngrok has been around for over a decade and developers have built tooling around it.
Future Development
ngrok is expanding beyond tunneling into a full 'ingress-as-a-service' platform. Recent additions include traffic policy (rules-based request routing), webhook verification, and OAuth integration at the tunnel level. The company is positioning ngrok as an alternative to traditional reverse proxies and API gateways for development and staging environments. For individual developers, the core free tunneling is unlikely to change—it's the top of the funnel for ngrok's paid plans.
Key Features
HTTP/HTTPS Tunnels
Run `ngrok http 3000` and get a public HTTPS URL that proxies to your local port. Free accounts get an assigned development domain; HTTPS terminates at the edge automatically so you do not manage certificates. The tunnel stays open while the agent process runs.
Request Inspection Dashboard
While a tunnel is active, open localhost:4040 to inspect every HTTP request and response—headers, body, status, timing. Replay any request, optionally editing it first. This remains the best free webhook debugger for Stripe, GitHub, Twilio, and Shopify payloads.
Custom Domains and Branded Domains
Hobbyist unlocks ngrok-branded domains so webhook URLs stay stable across sessions. Pay-as-you-go adds bring-your-own custom domains (metered by active hours) and wildcard endpoints. ngrok provisions TLS certificates and renewals.
TCP and TLS Endpoints
Expose databases, SSH, game servers, or other TCP services with `ngrok tcp`. Free tier allows random TCP addresses with card verification; Hobbyist includes a fixed TCP address; Pay-as-you-go scales further. TLS endpoints and mTLS are available on production plans via Traffic Policy.
Authentication and Traffic Policy
Add basic auth from the CLI without changing app code. Paid plans layer OAuth/OIDC, IP restrictions, rate limits, header injection, and declarative Traffic Policy rules so staging tunnels are not wide open to the internet.
Webhook Verification
Verify signatures from popular webhook providers at the edge before traffic reaches localhost. Invalid payloads are rejected early; the inspector still shows verified events you can replay during handler development.
Kubernetes Operator and Gateway API
For teams past solo tunnels, the ngrok Kubernetes Operator and Gateway API integration turn the same platform into managed ingress for clusters—public HTTPS, traffic policy, and observability without maintaining your own edge stack.
Agent, Config File, and SDKs
The agent is a single binary on macOS, Windows, Linux, and Docker. Define multiple tunnels in `~/.config/ngrok/ngrok.yml` and start them with `ngrok start --all`. Official SDKs (Go, Python, JavaScript, and more) embed tunnels inside apps and CI.
Who Should Use ngrok?
1The Webhook Developer
You're integrating Stripe payments into your app. Stripe needs a public URL to send payment events to. You run `ngrok http 3000` and paste the ngrok URL into Stripe's webhook configuration. Now every payment event hits your local server. When something fails, you open localhost:4040, inspect the exact payload Stripe sent, fix your handler, and replay the request without making another test payment. When you're done for the day, you stop ngrok. Tomorrow, you start a new tunnel and update the Stripe webhook URL (or use a custom domain on a paid plan to avoid this).
2The Mobile Developer Testing APIs
Your iOS app needs to talk to a backend API. During development, both run on your MacBook—the API on localhost:8080 and the app in the Simulator. But when you want to test on a physical device on the same WiFi, or share with a QA tester on a different network, you need a real URL. `ngrok http 8080` gives you one. Point the app at the ngrok URL and the physical device hits your local API as if it were deployed.
3The Freelancer Showing Work to a Client
You built a website locally and want to show the client before deploying. Deploy to staging? That takes time and might break. Instead, run `ngrok http 3000 --basic-auth='client:preview123'` and send the URL to your client. They see your local site with a password gate. You can make changes in real time while they watch. When the call is over, stop ngrok and the URL goes away.
4The DevOps Engineer Debugging
A third-party service needs to reach an internal tool running behind your company firewall. Setting up a VPN or public-facing proxy would take days of approvals. You run `ngrok http 8080 --ip-restriction allow-cidrs=203.0.113.0/24` to create a tunnel that only the third party's IP range can access. The tunnel is temporary—you tear it down when debugging is done. No permanent infrastructure changes, no security review delays.
How to Install ngrok on Mac
ngrok is a single binary. Installation via Homebrew takes one command.
Install via Homebrew
Run brew install --cask ngrok in Terminal. This installs the ngrok agent binary to your PATH.
Add Your Auth Token
Sign up at ngrok.com (free), copy your authtoken from the dashboard, and run ngrok config add-authtoken YOUR_TOKEN. This saves your token to ~/.config/ngrok/ngrok.yml and links your agent to your account.
Start a Tunnel
Run ngrok http 3000 (replace 3000 with your local port). You'll see a terminal UI showing the public URL, request count, and connection status. Visit the URL in a browser to verify it reaches your local server.
Open the Inspector
While the tunnel is running, open http://localhost:4040 in a browser. This is ngrok's local inspection dashboard where you can see every request and replay them.
Pro Tips
- • Use
ngrok http 3000 --host-header=localhostif your local server checks the Host header and rejects requests from the ngrok domain. - • Run
ngrok http --helpto see all available flags. The most useful ones are--basic-auth,--domain, and--inspect. - • You can define multiple tunnels in ngrok.yml and start them all with
ngrok start --all.
Configuration Tips
Define Tunnels in ngrok.yml for Repeatable Setups
Instead of typing ngrok http 3000 every time, define your tunnels in ~/.config/ngrok/ngrok.yml. Add a section like tunnels: web: proto: http, addr: 3000 and then run ngrok start web. You can define multiple tunnels (frontend, backend, database) and start them all with ngrok start --all.
Use --host-header for Local Server Compatibility
If your local dev server (Next.js, Rails, Django) rejects requests because the Host header is abc123.ngrok-free.app instead of localhost, add --host-header=localhost to your ngrok command. This rewrites the Host header before it reaches your server.
Set Up a Fixed Subdomain for Webhook URLs
On the Hobbyist plan ($8/month annual or $10 monthly), you can reserve a static subdomain like your-name.ngrok-free.app. This means your webhook URL stays the same across sessions—you don't have to update Stripe, GitHub, or Twilio every time you restart ngrok. For webhook-heavy workflows, this alone justifies the paid plan.
Use the API for Programmatic Tunnel Management
ngrok exposes a local API at http://localhost:4040/api/tunnels where you can list, create, and close tunnels programmatically. This is useful for CI/CD pipelines, automated testing setups, or custom tooling that needs to spin up tunnels on demand.
Alternatives to ngrok
Tunneling and lightweight ingress options that Mac developers actually compare in 2026:
Cloudflare Tunnel
Free custom domains if DNS already lives on Cloudflare, with global CDN benefits. Setup is heavier (cloudflared + DNS) and the inspect UX is weaker than ngrok's localhost:4040. Prefer for long-lived production-like tunnels; prefer ngrok for five-second webhook demos.
Tailscale Funnel
Exposes local services through Tailscale mesh. Excellent if the team already runs Tailscale; thinner free limits and no ngrok-style request replay UI.
Pinggy
Popular 2026 alternative with a lower entry paid plan and generous free TCP/UDP tunnels. Lighter feature set than ngrok's Traffic Policy and K8s Operator, but attractive when price is the constraint.
localhost.run
SSH-only tunnel with zero install (ssh -R 80:localhost:3000 nokey@localhost.run). Fine for a one-off share; no inspector, auth, or TCP product surface.
LocalXpose
Cross-platform tunnel service marketed as an ngrok alternative with free and paid tiers. Useful comparison when shopping pricing; ecosystem and docs still trail ngrok.
Pricing
As of August 2026 on ngrok.com/pricing: Free is $0 with $5 one-time included usage, up to 3 online endpoints, 1 GB data transfer, 20k HTTP/S requests, interstitial page, one assigned development domain, and 1 team member. Hobbyist is $8/month billed annually ($10 billed monthly) with $10 monthly included usage, up to 3 online endpoints, 5 GB transfer, 100k HTTP/S requests, no interstitial, ngrok-branded domains, and 1 team member. Pay-as-you-go is $20/month base plus metered usage with unlimited online endpoints, 5 GB transfer included then $0.10/GB, 100k HTTP/S included then $1 per 100k, custom domains, unlimited team members (3 included), SSO/RBAC/SCIM add-ons, and wildcards. Enterprise is custom for SLAs, HIPAA BAAs, SOC 2 paperwork, and AWS Marketplace purchasing. Free and Hobbyist stop endpoints when monthly usage credit is exhausted; Pay-as-you-go continues and bills overage.
Pros
- ✓Exposes localhost to the internet in seconds with automatic HTTPS
- ✓localhost:4040 request inspector remains best-in-class for webhook debugging
- ✓Free tier covers everyday development with up to 3 concurrent endpoints
- ✓Native Apple Silicon agent via Homebrew; works on macOS Tahoe 26.x
- ✓Traffic Policy, OAuth, and custom domains scale from demos to staging
- ✓Kubernetes Operator path for production-style ingress without DIY edge
- ✓SDKs and YAML config make tunnels repeatable in apps and CI
Cons
- ✗Free URLs are development domains and first-time visitors see an interstitial
- ✗Hobbyist still caps online endpoints at 3 and hard-stops when credit runs out
- ✗TCP tunnels and custom domains push many real workflows onto paid plans
- ✗Edge hop adds latency versus direct hosting for production traffic
- ✗Usage-based Pay-as-you-go bills can surprise teams that leave tunnels always-on
Community & Ecosystem
ngrok has been around since 2013 and has one of the largest communities in the developer tooling space. The documentation at ngrok.com/docs is comprehensive and well-maintained. Stack Overflow has thousands of ngrok questions and answers. The ngrok GitHub repositories include the official agent, SDKs for Go, Python, JavaScript, and Rust, and community-contributed integrations. There are ngrok plugins and extensions for VS Code, JetBrains IDEs, and various CI/CD platforms. The company publishes a blog with tutorials on webhook development, API testing, and tunnel best practices. For developers who need help, the ngrok Community Slack and GitHub Discussions are the primary support channels.
Video Tutorials
Getting Started with ngrok
More Tutorials
Make your local website live 🌐💻! Learn to host your PC using ngrok. 🚀 Watch now for the full guide!🔥
Aru Code • 317.4K views
How to Install and Use Ngrok on Mac | Expose Localhost to Public Using Ngrok on macOS
ProgrammingKnowledge2 • 402 views
How to Install Ngrok on Mac | NGROK Setup MacOS M2:M3 2024
Prashant Rana • 1.9K views
Frequently Asked Questions about ngrok
About the Author
Expert Tips for ngrok
Developers still treat ngrok as the default webhook debugger, but free-tier interstitial pages and rotating domains push anyone with recurring Stripe/GitHub callbacks onto Hobbyist almost immediately.
On the official August 2026 pricing page, Hobbyist is $8/month when billed annually ($10 monthly) with a hard stop when the $10 usage credit is exhausted—teams that leave tunnels always-on should prefer Pay-as-you-go so overages bill instead of endpoints dying mid-demo.
Kubernetes Operator and Traffic Policy are the real 2025–2026 product expansion beyond ngrok http; solo Mac developers can ignore them, but staging teams should evaluate them before bolting on a DIY reverse proxy.
Related Technologies & Concepts
Related Topics
Sources & References
Key Verified Facts
- ngrok Free includes $5 one-time usage credit, up to 3 online endpoints, 1 GB data transfer, and 20k HTTP/S requests with an interstitial page.[cite-1]
- Hobbyist is $8 monthly billed annually or $10 billed monthly, with $10 monthly included usage, 5 GB transfer, 100k HTTP/S requests, and no interstitial.[cite-1]
- Pay-as-you-go is $20 per month plus usage with unlimited online endpoints and custom domains.[cite-1]
- Free plan monthly quotas include 1 GB data transfer out, 20,000 HTTP requests, and 5,000 TCP connections.[cite-2]
- ngrok documents Stripe webhook testing via tunnels for local development.[cite-3]
- 1ngrok Pricing
Accessed Aug 9, 2026
"Free, Hobbyist ($8/mo annual), Pay-as-you-go ($20/mo), and Enterprise tiers with usage credits and limits."
- 2Free Plan Limits - ngrok docs
Accessed Aug 9, 2026
"Free plan quotas for data transfer, HTTP requests, TCP connections, and online endpoints."
- 3Using ngrok with Stripe
Accessed Aug 9, 2026
"Guide to receiving Stripe webhooks on a local development machine via ngrok."
- 4Getting Started with ngrok
Accessed Aug 9, 2026
"Install the agent, add an authtoken, and start an HTTP tunnel to a local port."
- 5Pricing and Limits
Accessed Aug 9, 2026
"Comparison of Free, Hobbyist, and Pay-as-you-go domain and endpoint limits."
- 6A free Cloudflare Tunnel for everyone
Accessed Aug 9, 2026
"Cloudflare documents free Tunnel as an alternative way to expose local/origin services."
- 7ngrok Kubernetes ingress guide
Accessed Aug 9, 2026
"Blog guide covering Kubernetes ingress with the ngrok Operator."
- 8Top 10 Ngrok alternatives in 2026 - Pinggy
Accessed Aug 9, 2026
"2026 comparison noting Hobbyist at $8/month annual and Pay-as-you-go at $20/month."