21tunnel

The tunnel for AI agents — open-source ngrok alternative

1 vote 119 views Aug 10, 2026 gokul

About 21tunnel

21tunnel is an open-source tunneling service built for the age of AI coding agents.

     AI assistants like Claude Code, Cursor, Aider, and Devin increasingly need public URLs for the work they produce on your localhost. A webhook endpoint for Stripe. A preview link for your designer. An MCP server a teammate needs to reach. The common workaround — pasting a full-access API token into the agent's environment — hands an autonomous system unlimited, unexpired access to your account. Agent transcripts get saved, logs get shared, and prompt-injection attacks can steer agents into leaking whatever they can see. That token is the weakest link in most AI development setups today.

21tunnel replaces it with the delegation pattern that Stripe, AWS, and GitHub proved years ago. You mint a single master key that is deliberately incapable of opening tunnels. The agent uses it to mint its own child keys: scoped to one project namespace with subdomain isolation, time-limited to minutes or hours, and recorded in an audit log.

The agent works fully autonomously, never touches a credential worth stealing, and if anything looks wrong, one click cascade-revokes the master key, every child key it minted, and every tunnel they opened.

 Beyond the AI-agent workflow, 21tunnel is a complete, modern ngrok alternative. HTTP, TCP, SSH, and gRPC tunnels run from a single static Rust binary on Linux, macOS, and Windows. Random subdomains are sticky across restarts, and you can claim named subdomains or bring your own custom domain with real TXT-record verification — included on the free tier. Edge auth gates any tunnel behind Google sign-in with email or domain allowlists, and a live request inspector streams every inbound request to the dashboard.

     Teams get owner, admin, member, and viewer roles with a partitioned, queryable audit log. A REST API with an OpenAPI spec covers everything for CI and automation. The entire stack — agent, server, and dashboard — is open-source under MIT and Apache-2.0 and self-hostable free forever. Security features like MFA, RBAC, and the audit log ship on every tier, including the free Hobby plan.

     Built for developers shipping with AI assistance, teams testing webhooks locally, and self-hosters who want a tunneling stack they fully control.

—
No reviews yet
5
0
4
0
3
0
2
0
1
0

Enjoyed 21tunnel?

Share your experience with the community.

Write a Review

No reviews yet — be the first!

Discussion

Join the conversation

Sign in or create a free account to leave a comment.

💬

No comments yet. Be the first to share your thoughts!

Analytics

Unique visitor trends for 21tunnel

119
Total Views
—
This month
—
Avg Rating
0
Discussions
Loading…