Tunnelmole: The Open Source ngrok Alternative Developers Need

Tunnelmole: The Open Source ngrok Alternative Developers Need

Looking for an ngrok alternative that gives you open-source freedom, developer-friendly features, and a blazing-fast setup? You’re not alone.

Thousands of developers need to share local servers or test webhooks with a public URL—without hitting ngrok’s paywalls or dealing with proprietary limits. In this guide, you’ll discover why Tunnelmole is the best open source ngrok alternative, how it works, and how to get started in a single command.

Why Look for an ngrok Alternative?

Ngrok pioneered the public-to-local tunneling niche, but developers often run into pain points:

  • Free plan limits: Short-lived sessions, limited connections, or port restrictions.
  • Subscription upsells: Basic features like reserved domains or longer tunnels locked behind a paywall.
  • Privacy and control: Wanting to own your own infrastructure, for compliance or experimentation.

If any of these sound familiar, it’s time to meet Tunnelmole.


Meet Tunnelmole: A Modern, Open Source Alternative to ngrok

Tunnelmole is an open source tool that gives your locally running HTTP(s) servers a secure, shareable public URL—in seconds. Want to show off a React app, demo an API, test a webhook, or share your Node project from localhost? Tunnelmole makes it frictionless.

Key Features:

  • Free, unlimited HTTPS tunnels (single command)
  • Open source client and server (MIT & AGPL licenses)
  • Self-host or use the managed service
  • Custom subdomains (with subscription or self-hosted)
  • Fast setup for Node, Python, Docker, static sites & more
  • Native binaries for Linux, Mac, and Windows

Tunnelmole vs Ngrok: Quick Comparison Table

Feature Tunnelmole ngrok
Open Source ✅ (MIT Client, AGPL Server) ❌ (Proprietary)
Self-Hosting ❌ (ngrokd discontinued)
Custom Subdomains ✅ (paid or self-hosted) Paid only
Runs Everywhere
NodeJS Integration ✅ Tunnelmole is a native JavaScript application and can be seamlessly integrated into Node apps

What Can You Do With Tunnelmole?

  • Demo Work In Progress
    Share your project instantly with clients, teammates, or testers—no production deploy required.
  • End-to-End Webhook Development
    Receive webhooks from platforms like Stripe, GitHub, or IFTTT, right on your dev machine.
  • Mobile & Cross-device Testing
    Load the real local site on a phone, tablet, or another computer, using the public URL.
  • Secure Local HTTPS for PWA & Notifications
    Test with full HTTPS to unlock service workers and push on localhost.
  • Collaborative Debugging
    Reproduce bugs or share real-time updates—send the Tunnelmole link; no VPN or NAT config needed.

How to Install Tunnelmole

Tunnelmole can be installed in a single command on Linux, Mac, and Windows.

For Linux or Mac

curl -O https://install.tunnelmole.com/xD345/install && sudo bash install

Tunnelmole will auto-detect your OS and install the right binary.

For Windows

With npm (NodeJS/TypeScript projects)

npm install -g tunnelmole

Requires Node 16.10+.


Instantly Create a Public URL in One Command

Let’s say your app (React, Express, Docker, static site—anything) runs locally on port 8080:

tmole 8080

Output:

http://xyz.tunnelmole.net is forwarding to localhost:8080
https://xyz.tunnelmole.net is forwarding to localhost:8080

That’s it—your localhost server is now accessible from anywhere on the internet (or restricted via your firewall, if you prefer).

You can test on your phone, share with colleagues, or point webhooks and external devices at your machine.


Tunnelmole for NodeJS Developers: npm Integration

Tunnelmole can be used as a library in NodeJS/TypeScript projects for seamless automation.

Install as Dependency

npm install --save tunnelmole

Start Programmatically in Code

import { tunnelmole } from 'tunnelmole';

const url = await tunnelmole({ port: 3000 });
// url = public HTTPS URL, e.g. https://abc123.tunnelmole.net

Supports CommonJS as well.

Use with npm Scripts for Automation

Add this to package.json:

{
  "scripts": {
    "start": "node dist/index.js",
    "start-public": "npm run start && tmole 3000"
  }
}

Then just run:

npm run start-public

And your app will start, instantly live on the web.

We are aware of IoT and Robotics projects using Tunnelmole in this way.


How Tunnelmole Works (In Plain English)

Tunnelmole creates a secure, persistent WebSocket between your computer and the Tunnelmole server (hosted or self-hosted). Incoming requests to the public URL are relayed over this channel to your local service, bypassing NAT and firewall headaches.

How Tunnelmole Works

For privacy-conscious teams, you can run your own instance (full source on GitHub).


FAQ

Is Tunnelmole really open source?

Yes!

Can I self-host Tunnelmole?

Absolutely. Run both server and client yourself for maximum control, zero cost, and local/private tunnels.

Does Tunnelmole hide my IP?

No. For abuse prevention, Tunnelmole adds your IP to the X-Forwarded-For header and sometimes the URL, mainly to make the service much less attracitive to phishers and other bad actors. Self-hosted? You choose your security and visibility.

How does Tunnelmole differ from other ngrok alternatives?

Most "ngrok alternatives" are either not truly open source, hard to self-host, or lack a modern, simple CLI. Tunnelmole covers open source, easy installation, and zero config for common developer needs.

What about pricing?

Tunnelmole is free for normal use. Custom domains require a small subscription unless you self-host, in which case it’s always free.


Other Notable ngrok Alternatives

Name Open Source? Self-host? Notes
Tunnelmole Modern, maintained
localtunnel ✅ (MIT) Simpler features, less robust
Expose ✅ (PHP) Focuses on PHP projects
Sish ✅ (Go) SSH tunnels, CLI focus
Telebit Privacy-focused, more complex
ngrok Leading but closed/inflexible

TL;DR – Why Use Tunnelmole?

  • Instant HTTPS public URL for any localhost service.
  • Open source everything (self-host or SaaS).
  • Works everywhere: Node, Docker, Python, static sites, you name it.
  • Quick install, no config hassle, developer-centric UX.
  • No hard limits for normal OSS users—test, demo, share freely.

Get Started with Tunnelmole Today

Ready to drop ngrok and get your app public fast?

Share this article if you found it useful—empower your fellow developers with open source tools.

Happy hacking! 🚀