Skip to content

Open Source Ngrok Alternatives

3 alternatives · Data checked · By , founder & editor · API management and gateways

Octelium is the top open source alternative to Ngrok. It is a self-hosted zero trust platform that covers tunnels, an API gateway and access policies, and it is actively maintained with over 4,000 stars. If you want a simpler ngrok-style tunnel with a dashboard, pick rustunnel. For request replay and team admin, pick portr.

Best overall

Best for: Teams wanting a self-hosted zero trust platform covering tunnels, API gateway and access policies

4.2k ThrivingCopyleft

Pick #2

Best for: Teams wanting an ngrok-like tunnel with dashboard, metrics and AI agent MCP support, self-hosted

668 ActiveCopyleft

Pick #3

Best for: Small dev teams wanting a self-hosted ngrok with inspector, replay and team admin

3.2k ActiveCopyleft

Why people leave Ngrok

Ngrok is a service from ngrok, a US company founded in 2015, that exposes local or private services to the internet through secure tunnels. Developers use it to share a local web app, test webhooks and reach services behind a firewall. It has grown into an API gateway with request routing, API authentication, rate limiting, load balancing, and traffic monitoring with logs. It is sold as a hosted service.

  • Traffic runs through a vendor's cloud. Tunnel traffic passes through ngrok's infrastructure. Teams with strict data location or privacy needs often want to control the relay themselves.
  • Hosted service dependence. Your public URLs and gateway features rely on one company's platform. Self-hosting removes that dependency and lets you pick your own domains.
  • Costs grow with usage and features. Gateway features such as authentication, rate limiting and multiple endpoints sit in a hosted product. Running your own tunnel server can be cheaper at scale.
  • Want to own the gateway stack. Some teams prefer to combine a reverse proxy, tunnel and auth layer they can inspect and change instead of using a closed service.

Quick comparison

#AlternativeLicenseStarsHealthPlatformsFitParityMigrationImports from Ngrok
1 Octelium Copyleft 4.2k Thriving – Direct replacement 38% Hard No
2 rustunnel Copyleft 668 Active – Direct replacement 52% Easy No
3 portr Copyleft 3.2k Active – Self-hosted equivalent 40% Moderate No

Fit = how much of Ngrok's job the tool replaces. Parity = share of Ngrok's core features the tool covers fully. Migration = effort to move your data and team over. Health and stars from November 24, 2026. How we rank.

The 3 best open source Ngrok alternatives

  1. 1

    Octelium

    Self-hosted zero trust platform for VPN, tunnels and API gateway use

    4.2k Thriving 78 Copyleft Direct replacement

    Octelium goes beyond tunnels into a self-hosted zero trust platform with an API gateway and access policies. Parity is 38% and migration is hard. It is heavier to deploy than a single client and has no webhook replay, so it fits teams that want the wider platform.

    Strengths

    • One platform for VPN, ZTNA, tunnels, API gateway and AI gateway
    • Access over WireGuard or QUIC, plus clientless access
    • Per-request, identity-based policy control
    • Active development with 25 releases in the last year

    Trade-offs

    • More complex to deploy than a single tunnel client
    • No built-in request replay for webhooks
    • No built-in webhook request replay
    • No DNS hosting, CDN or DNS filtering
    Best for
    Teams wanting a self-hosted zero trust platform covering tunnels, API gateway and access policies
    Fit
    Direct replacement · 38% feature parity
    Health
    78/100 (Thriving) · breakdown
    License
    Copyleft (OSI) (AGPL-3.0)
    Hosting
    Self-hosted
    Migration
    Hard
    Last commit
    Nov 2026

    Feature parity with Ngrok · 38%

    • Yes Request routing
    • Yes API authentication
    • Yes Public tunnels to local services
  2. 2

    rustunnel

    Tunnel for exposing localhost, webhooks and AI agents, hosted or self-hosted

    668 Active 74 Copyleft Direct replacement

    rustunnel is the closest in feel to ngrok, with a dashboard, metrics and MCP support for AI agents. It confirms 52% of features and migration is easy. It has 665 stars and no OAuth/OIDC, JWT auth or rate limiting, so keep it to trusted setups.

    Strengths

    • Proxies both HTTP and TCP over encrypted WebSocket with TLS termination
    • Live dashboard, Prometheus metrics and audit logging included
    • Managed edge servers in three regions, with automatic nearest-region selection
    • Includes an MCP server for AI agent tools

    Trade-offs

    • No built-in OAuth/OIDC or JWT auth
    • No traffic transformation
    • No rate limiting
    • AGPL-3.0 carries network copyleft obligations if you modify and offer it as a service
    Best for
    Teams wanting an ngrok-like tunnel with dashboard, metrics and AI agent MCP support, self-hosted
    Fit
    Direct replacement · 52% feature parity
    Health
    74/100 (Active) · breakdown
    License
    Copyleft (OSI) (AGPL-3.0)
    Hosting
    Self-hosted
    Migration
    Easy
    Last commit
    Nov 2026

    Feature parity with Ngrok · 52%

    • Yes Request routing
    • Partly API authentication
    • Yes Traffic monitoring and logs
    • Partly Request inspection and replay
    • Yes Public tunnels to local services
    • Partly Webhook testing and delivery
    • Yes Custom domains and TLS
    Quick start
    rustunnel setup
  3. 3

    portr

    Self-hosted tunnel for small dev teams to expose local services, with request inspector

    3.2k Active 69 Copyleft Self-hosted equivalent

    portr gives small dev teams a self-hosted ngrok-style setup with an inspector, request replay and team admin. It has 3,195 stars and 40% parity. It has no rate limiting, OAuth or JWT auth, and it is not recommended for production traffic.

    Strengths

    • Supports HTTP, TCP and WebSocket tunnels
    • Local inspector with request replay and WebSocket frame view
    • portr logs queries stored requests from the CLI, with JSON output
    • SSH or WebSocket transport, chosen by the client config

    Trade-offs

    • No built-in OAuth/JWT auth or rate limiting
    • No load balancing
    • Not recommended for production traffic
    • AGPL-3.0 license carries obligations if you modify and offer it as a service
    Best for
    Small dev teams wanting a self-hosted ngrok with inspector, replay and team admin
    Fit
    Self-hosted equivalent · 40% feature parity
    Health
    69/100 (Active) · breakdown
    License
    Copyleft (OSI) (AGPL-3.0)
    Hosting
    Self-hosted
    Migration
    Moderate
    Last commit
    Nov 2026

    Feature parity with Ngrok · 40%

    • Partly Request routing
    • Partly API authentication
    • No Load balancing
    • Partly Traffic monitoring and logs
    • Yes Request inspection and replay
    • Yes Public tunnels to local services
    • Partly Webhook testing and delivery
    • Partly Custom domains and TLS
    Quick start
    portr http 9000

Feature parity: Ngrok vs the top 3

FeatureNgrokOcteliumrustunnelportr
Request routingYesYesYesPartly
API authenticationYesYesPartlyPartly
Rate limitingYes–––
Load balancingYes––No
Traffic monitoring and logsYes–YesPartly
Request inspection and replayYes–PartlyYes
Public tunnels to local servicesYesYesYesYes
Request/response transformationYes–––
Webhook testing and deliveryYes–PartlyPartly
Custom domains and TLSYes–YesPartly

yes · partly · no · – not checked.

Cost to switch

What Ngrok costs your team in a year, against running an open source alternative yourself.

Enter Ngrok's price per seat to compare.

Server prices are typical monthly VPS prices for the RAM the tool needs (2 GB when unknown). Your time to run and update it is not included.

How to choose

You want tunnels plus an API gateway and access policies in one self-hosted platform

→ Octelium

It combines tunnels, an API gateway and access policies, and has about 4,200 stars with a Thriving maintenance status.

You want the closest feel to ngrok with the least migration work

→ rustunnel

It has a dashboard, metrics and MCP support for AI agents, and it has the highest feature parity of the three at 52%.

You need to inspect and replay webhook requests while testing

→ portr

It includes a request inspector and replay, which Octelium does not offer.

You run a small dev team and need to manage who can open tunnels

→ portr

It includes team admin and has about 3,200 stars, though it is not recommended for production traffic.

You need OAuth, JWT auth or rate limiting on exposed services

→ Octelium

rustunnel and portr both lack OAuth/OIDC, JWT auth and rate limiting, while Octelium provides access policies and an API gateway.

Moving off Ngrok

  • None of the three alternatives import Ngrok configuration, so you will recreate your tunnels and endpoints by hand.
  • rustunnel is the easiest move, since it works like a simple ngrok-style client and server. portr is moderate effort. Octelium is hard because you adopt a full platform.
  • Expect to rebuild custom domains, authentication rules, rate limits and traffic policies yourself. Your Ngrok traffic logs will not carry over, so export any you need first.
  • Update webhook URLs at each third-party provider, since your public hostnames will change when you self-host.

Frequently asked questions

What is the best open source alternative to Ngrok?

Octelium ranks first because it is a self-hosted zero trust platform with tunnels, an API gateway and access policies. It is heavier to deploy than a single client, so rustunnel suits you better if you only need tunnels.

Is there a free open source alternative to Ngrok?

Yes. Octelium, rustunnel and portr are all open source with copyleft licenses and can be self-hosted. You pay only for the server you run them on.

Which Ngrok alternative can I self-host?

All three can be self-hosted. rustunnel and portr are lighter tunnel servers, while Octelium is a broader platform.

Which alternative is closest to Ngrok?

rustunnel is closest in feel, with a dashboard, metrics and 52% feature parity. portr is also ngrok-style and adds an inspector and request replay.

Can I import my Ngrok data into an alternative?

No. Octelium, rustunnel and portr do not import from Ngrok, so you recreate your tunnels and settings manually.

Can I use these for production traffic?

Be careful. portr is not recommended for production traffic, and rustunnel lacks OAuth/OIDC, JWT auth and rate limiting. Octelium is the better fit when you need access policies and an API gateway.

2026 edition. Rankings use fit, health, license and popularity; sponsors never change the order. Methodology · Report an error.