
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.
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.

Rust reverse proxy for NAT traversal
Rathole exposes services on NAT-bound devices through a public server, using paired client and server configuration files.
“An alternative to frp and ngrok.”

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.
“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.”

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.
“Is Hook0 an ngrok alternative? For one job, yes: receiving webhooks on localhost during development.”

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.
“Opensource ngrok alternative.”

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.
“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!”

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.
“Port Buddy is a lightweight, high-performance ngrok alternative designed to instantly expose your local development servers to the public internet.”

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.
“Open-source ngrok alternative. Expose your localhost to the internet with one command. Built with Go + Cloudflare Workers.”
These projects don't call themselves a ngrok alternative, but two independent checks of their own description found they do the same main job.

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.
“pgrok is a self-hosted, multi-tenant networking platform for exposing HTTP services and raw TCP connections through SSH reverse tunnels.”
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.
“Portr is a tunnel solution that allows you to expose local HTTP, TCP, or WebSocket services to the public internet.”

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.
“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.”

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.
“One command gives your dev server a public HTTPS URL.”

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.
“Portal is an open-source tunnel runtime and relay network for publishing services to the agentic web.”
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.)
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.
“A drop-in 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.
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.
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.