The Open-Source ngrok Alternative Devs Are Switching To (Zrok)

BBetter Stack
Internet TechnologySmall Business/StartupsComputing/Software

Transcript

00:00:00In a perfect world, sharing localhosts should be easy, but somehow it turns into this whole
00:00:05thing.
00:00:06You open ngrok, hit limits, get a random URL, and now what should have taken 10 seconds just
00:00:11broke everything.
00:00:12Or worse, you need to share something with one person but you don't want to make it
00:00:16public.
00:00:17This is zrock.
00:00:18It's an open source alternative to ngrok with zero trust built on OpenZD, and now more
00:00:24devs are switching because it fixes the part of tunneling that actually sucks.
00:00:33So what is zrock?
00:00:34Basically, it lets you share your local app, file, or even TCP and UDP services publicly
00:00:40or privately without opening ports, touching your router, or needing a public IP.
00:00:45And everything is end-to-end encrypted, so the idea is you can expose what you need without
00:00:50exposing more than you actually need.
00:00:52It's free, it's self-hostable, and because it's built on zero trust mesh, your traffic
00:00:58doesn't touch the public internet unless you want it to.
00:01:01But it's also just smoother, which I like.
00:01:03Things like custom domains, better performance, and new UI.
00:01:07But none of that actually matters if it's not fast, so let me show you.
00:01:10If you enjoy open source tools and coding tips to speed up your workflow, be sure to subscribe
00:01:15to the Better Stack channel.
00:01:16We have videos coming out all the time.
00:01:18All right, clean setup, I've got a simple Next.js app running on localhost.
00:01:23Nothing crazy, just basic, just the default page.
00:01:26So you'd expect this to take a few steps, right?
00:01:30Ports, configs, maybe some setup, but watch this.
00:01:34First I make sure my zrock environment is enabled.
00:01:37That's the one-time setup with zrock enable.
00:01:40Then I can run one command right here.
00:01:44That's really it.
00:01:45If there's no config files, no extra setup, then instantly you get a public https URL.
00:01:51I can open it here, and yeah, it just works.
00:01:55The app is live on the internet.
00:01:57There's no port forwarding.
00:01:58There's no firewall changes.
00:02:00So at this point it's public, but also this is where things can start to go wrong.
00:02:05So let's stop that.
00:02:06Control C. Now let's do the version most devs actually want.
00:02:10Backshare, private, localhost, same app, same machine, but now completely different behavior.
00:02:17Instead of a public URL, we get a token, and this is the major difference here, because
00:02:23now access isn't opened.
00:02:25It's actually granted by using this token.
00:02:28So anyone I trust can run zrock access private with my token that I've given them, and then
00:02:34only then they can get it.
00:02:36No bot scanning your endpoint, no random traffic hitting your app, nothing like this.
00:02:42It's just controlled access.
00:02:44So instead of exposing your app, you selectively allowed access to it based on who you want,
00:02:49and that's the big difference between these two, and it's not just apps.
00:02:53Same idea works for files and folders too.
00:02:56I can share entire directories as a browsable drive with backend mode drive.
00:03:02It's not just tunneling, it's controlled sharing.
00:03:04That's what zrock is really giving us.
00:03:06Now, why does all this even matter?
00:03:08Because most tunneling tools force you into trade-offs.
00:03:12ngrok is polished, but the free tier is tight.
00:03:15Cloudflare tunnels are awesome, but they come with setup and extra steps.
00:03:19Tailscale is great, but can feel like overkill if you just want a quick share.
00:03:24So you end up choosing between speed, privacy, and control, and that's the problem zrock solves.
00:03:29There's no firewall setup, brilliant.
00:03:32There's no NAT issues, okay cool.
00:03:35Private sharing is actually private, that's what we want here.
00:03:38UDP support for things like game servers, VOIP, IoT, and built-in file sharing.
00:03:44This is everyday dev work.
00:03:46Webhook testing, right?
00:03:48All of this stuff is really good that we can use zrock for.
00:03:52So real quick, let's look at zrock versus ngrok.
00:03:54ngrok feels like a polished product, because honestly it is.
00:03:58zrock feels like a tool you actually own.
00:04:00That's the major difference.
00:04:02ngrok is proprietary, zrock is open source.
00:04:05It's self-hostable.
00:04:06If you care about control and privacy, that's huge.
00:04:10Then there's private sharing.
00:04:12Now in ngrok it's more of an add-on.
00:04:15It's not integrated.
00:04:16In zrock it's part of the core idea behind everything.
00:04:19The protocols matter too.
00:04:22ngrok mostly focuses on HTTP and TCP.
00:04:26zrock supports both of those while also supporting UDP.
00:04:29Now to be fair, ngrok still has request replay and inspection.
00:04:35zrock doesn't.
00:04:36And that can actually matter.
00:04:37zrock is good.
00:04:38It's not perfect.
00:04:39People like it because it feels simple.
00:04:41It's privacy first.
00:04:43That's huge.
00:04:44And if you self-host it, you get full control over everything.
00:04:47Then it still comes with trade-offs, just like any open source tool.
00:04:50There's a learning curve if you go deeper, especially on the self-hosting side of things.
00:04:55There's no built-in request inspection like ngrok.
00:04:58Depending on your setup, you might notice a bit of latency.
00:05:01But even with those downsides for most devs, it's still a better fit.
00:05:05So is zrock worth it?
00:05:06Well, that's sort of the question here.
00:05:08If your pain is sharing something quickly, yeah, it's definitely worth it.
00:05:12Especially if we don't have to give up control or privacy.
00:05:15zrock solves that.
00:05:16If you enjoy open source coding tools and tips like this, be sure to subscribe to the Better
00:05:20Stack channel.
00:05:21We'll see you in another video.

Key Takeaway

zrock provides an open-source, zero-trust alternative to ngrok that enables secure, end-to-end encrypted tunneling for HTTP, TCP, and UDP services without the restrictions of proprietary free tiers.

Highlights

zrock is an open-source tunneling tool built on OpenZiti that provides end-to-end encrypted sharing for local services.

The tool supports HTTP, TCP, and UDP protocols, making it compatible with game servers, VOIP, and IoT devices.

Users can share entire directories as browsable drives using the backend mode drive command.

Private sharing mode generates a unique token rather than a public URL, requiring the receiver to run zrock access private with that token.

Self-hosting zrock gives developers full control over their traffic and eliminates the limits found in proprietary free tiers.

The platform bypasses firewall configurations and NAT issues without requiring port forwarding or a public IP address.

Timeline

The Problems with Traditional Tunneling

  • Traditional tools like ngrok often impose strict limits and generate random, public URLs that expose local environments to the internet.
  • zrock functions as an open-source alternative built on a zero-trust mesh to ensure traffic remains off the public internet by default.
  • End-to-end encryption protects local apps, files, and services during the sharing process.

Sharing localhosts often involves hitting usage limits or dealing with broken configurations. zrock addresses these friction points by removing the need for public IPs or router adjustments. It utilizes the OpenZiti framework to create secure connections that only expose necessary data.

Public Sharing and Instant Deployment

  • A one-time setup using the zrock enable command prepares the environment for sharing.
  • Running a single command instantly generates a public HTTPS URL for a local application.
  • This method requires no port forwarding or changes to existing firewall settings.

A demonstration using a default Next.js app shows how quickly a local environment becomes live. The process eliminates manual configuration steps typically required for web deployments. While effective for speed, this public method makes the endpoint visible to any internet user.

Private Sharing and Token-Based Access

  • Private sharing replaces public URLs with unique access tokens to prevent bot scanning and unauthorized traffic.
  • Recipients must run a specific access command with the provided token to view the shared content.
  • The backend mode drive feature allows developers to share entire local directories as interactive drives.

Controlled access is the primary differentiator for developers who need to share work with specific individuals. Instead of opening a hole in the network, the user selectively allows access based on trust. This mechanism ensures that no random traffic can hit the application endpoint.

Comparison with ngrok and Cloudflare Tunnels

  • ngrok offers a polished experience but limits users within its proprietary free tier.
  • Cloudflare tunnels and Tailscale provide security but often involve more complex setup steps or feel like overkill for quick tasks.
  • zrock includes native UDP support, which is often missing or limited in competing tunneling products.

Developers often choose between speed, privacy, and control when selecting a tunnel tool. zrock targets the middle ground by being faster than Cloudflare to set up while offering more privacy than ngrok's basic tier. Its open-source nature allows for self-hosting, which provides a sense of ownership over the tool.

Technical Trade-offs and Final Verdict

  • zrock lacks the built-in request replay and inspection features found in ngrok.
  • Self-hosting the platform introduces a steeper learning curve for users unfamiliar with zero-trust networking.
  • Certain configurations may result in minor latency compared to direct proprietary connections.

While zrock excels in privacy and protocol support, it is not a perfect substitute for every workflow. Users who rely heavily on inspecting HTTP requests might still prefer ngrok for debugging. However, for those prioritizing security and open-source flexibility, the tool solves the core pain of sharing local work without compromising data safety.

Community Posts

View all posts