qmetrics.net

Best Open-Source Alternatives to ngrok

ngrok by ngrok is a commercial product. These open-source projects say they can replace it.

The most popular open-source alternative to ngrok is Rathole, with 14.5k GitHub stars. Other open-source alternatives to ngrok are Octelium, Pgrok, Portr and Hook0 (8 more below). Most ngrok alternatives here are API Development & Testing tools, some are Networking & Connectivity. The first 7 say in their own README or website that they can replace ngrok (the quote is shown under each one); the other 5 do the same job, shown with their own description.

Stars and activity updated 27 November 2026.

Sort:Most starsRecentA–Z

Rathole

Rust reverse proxy for NAT traversal

Rathole exposes services on NAT-bound devices through a public server, using paired client and server configuration files.

★ 14.5k⟳ 3 months agoApache-2.0
Open Source Alternative to:ngrok
“An alternative to frp and ngrok.”

Octelium

Self-hosted zero-trust secure access and tunnel platform

Octelium unifies VPN, ZTNA, secure tunnels, API and AI gateways, and PaaS-style deployments on Kubernetes you host yourself.

★ 4.2k⟳ yesterdayAGPL-3.0
Open Source Alternative to:ApigeeCloudflare Tunnelngrok+2
“Self-Hosted Secure Tunnels: A programmable infrastructure for secure tunnels and reverse proxies for both secure identity-based as well as anonymous clientless access, offering a powerful, self-hosted alternative to ngrok or Cloudflare Tunnel.”

Hook0

Webhook server with JSON REST API and dashboard

Hook0 helps SaaS products offer webhooks to end users. It delivers events, handles retries, stores delivery history, and exposes a dashboard for operators and subscribers.

★ 1.5k⟳ todaySource-available
“Is Hook0 an ngrok alternative? For one job, yes: receiving webhooks on localhost during development.”

OutRay

Open tunnel, observability and secrets platform for developers

OutRay exposes localhost over HTTPS, captures requests, manages encrypted secrets and monitors uptime with an MIT-licensed CLI and SDKs.

★ 1.3k⟳ 13 days agoMIT
Open Source Alternative to:ngrok
“Opensource ngrok alternative.”

NPort

Free Cloudflare-based localhost tunnel CLI with custom subdomains

NPort exposes local HTTP or HTTPS ports through Cloudflare with one npm command, automatic TLS and optional custom subdomains.

★ 776⟳ 3 months agoMIT
Open Source Alternative to:ngrok
“NPort is a powerful, lightweight ngrok alternative that creates secure HTTP/HTTPS tunnels from your localhost to public URLs using Cloudflare's global edge network. No configuration, no accounts, just instant tunnels with custom subdomains!”

Port Buddy

CLI to expose local HTTP, TCP and UDP ports publicly

Port Buddy is a command-line tool that gives local services public URLs for HTTP, HTTPS, raw TCP, and UDP, with TLS, static subdomains, WebSockets, and optional Docker use.

★ 538⟳ 16 days agoApache-2.0
Build & DeploymentDesktop/CLI app
Open Source Alternative to:ngrok
“Port Buddy is a lightweight, high-performance ngrok alternative designed to instantly expose your local development servers to the public internet.”

Wormhole

CLI tool for instant HTTPS tunnels via Cloudflare Workers

Wormhole exposes a local HTTP server to the public internet with one command, optional GitHub login for custom subdomains, and a local traffic inspector.

★ 440⟳ 2 months agoMIT
Open Source Alternative to:ngrok
“Open-source ngrok alternative. Expose your localhost to the internet with one command. Built with Go + Cloudflare Workers.”

Also does the same job as ngrok

These projects don't call themselves a ngrok alternative, but two independent checks of their own description found they do the same main job.

Pgrok

Self-hosted multi-tenant HTTP and TCP tunnel platform

pgrok exposes local services through SSH reverse tunnels with stable subdomains and OIDC single sign-on on infrastructure you operate.

★ 3.7k⟳ 5 days agoMIT
Open Source Alternative to:ngrok
“pgrok is a self-hosted, multi-tenant networking platform for exposing HTTP services and raw TCP connections through SSH reverse tunnels.”

Portr

Self-hosted HTTP, TCP and WebSocket tunnels for teams

Portr exposes local HTTP, TCP, and WebSocket services on public URLs through a tunnel server you control, with a local inspector, request replay, SQLite logs, and team access.

★ 3.2k⟳ 26 days agoAGPL-3.0
Open Source Alternative to:ngrok
“Portr is a tunnel solution that allows you to expose local HTTP, TCP, or WebSocket services to the public internet.”

rustunnel

Rust tunnel server for public HTTP, TCP and UDP exposure

rustunnel forwards local services through TLS WebSocket tunnels to a server you self-host or a managed edge, with dashboards, metrics, audit logs, and an MCP server for AI setup.

★ 668⟳ 23 days agoAGPL-3.0
Open Source Alternative to:ngrok
“Open-source secure tunnel that exposes localhost to the internet. Pay-as-you-go from $3/month, free self-hosting under AGPL, and an MCP server for any agent harness — Claude Code, Codex, Cursor, Windsurf, Cline, and more.”

hostc

Public HTTPS tunnel for local dev with hot reload

hostc exposes a local dev server through a public HTTPS URL with one npx command. WebSockets and hot reload pass through without signup, aimed at sharing work-in-progress safely.

★ 642⟳ todayApache-2.0
Open Source Alternative to:ngrok
“One command gives your dev server a public HTTPS URL.”

Portal Tunnel

Open-source localhost tunnel with self-hostable trustless relays

Portal publishes local apps and APIs through public or self-hosted relays without accounts, using local cryptographic identity, optional client-side TLS, multi-relay failover, and IVNP overlay routing.

★ 305⟳ 2 days agoMIT
Open Source Alternative to:ngrok
“Portal is an open-source tunnel runtime and relay network for publishing services to the agentic web.”

No recent code changes

These projects also replace ngrok, but have had no code changes for over 18 months. Prefer an actively maintained alternative above. (Archived and discontinued projects are not listed.)

Proxy.py

Pluggable Python proxy, web server and tunnel framework

proxy.py is a lightweight Python toolkit for forward and reverse proxying, TLS interception, DNS-over-HTTPS, embedded web servers, pub/sub, and a Grout feature for exposing local services.

★ 3.6k⟳ 1 year agoBSD-3-Clause
Frameworks & PlatformsNo commits in 18+ months
Open Source Alternative to:ngrok
“A drop-in alternative to ngrok”

Compare ngrok alternatives

Questions about ngrok alternatives

Is there an open-source alternative to ngrok?

Yes. 13 open-source projects can replace ngrok, for example Rathole, Octelium and Pgrok. 7 of them say so in their own documentation; the other 6 do the same job.

What is the best open-source alternative to ngrok?

Rathole (14.5k GitHub stars) is the most popular open-source alternative to ngrok on GitHub. Hook0 has the most recent code changes. To run it on your own server, look at Rathole, Octelium and Pgrok, which are self-hostable. The best choice depends on your needs: compare them side by side, for example Rathole vs Pgrok.

Are the open-source alternatives to ngrok free?

12 of the 13 projects listed here are free to use under an open-source license, with no license fee: 9 permissive (such as Apache-2.0), 3 copyleft (such as AGPL-3.0). Hook0 is source-available: the code is public, but the license limits some uses. Running software on your own server still costs hosting and upkeep, and many projects also sell a hosted version.

Related commercial products

Twingate

Twingate

6 open-source alternatives

OpenVPN Access Server

OpenVPN Inc.

5 open-source alternatives

Apigee

Google

4 open-source alternatives

Cloudflare Tunnel

Cloudflare

3 open-source alternatives

Hookdeck

Hookdeck

1 open-source alternative

Hookdeck Outpost

Hookdeck

1 open-source alternative