21tunnel
21tunnel is a secure tunnel service designed for autonomous AI agents. It lets users mint a master key once, then AI assistants can programmatically create scoped, short-lived child keys with project namespaces and automatic TTLs. If anything goes wrong, the human can revoke the master key and instantly cascade-revoke all child keys and active tunnels. It is built for AI coding workflows such as Cursor and similar agentic assistants, but it also functions as a full-featured ngrok alternative for everyday localhost exposure. Capabilities include HTTP, TCP, and SSH tunneling with sticky random subdomains, support for custom domains through ACME verification, Google OAuth edge auth, a live request inspector, and team management with RBAC and audit logging. The Hobby plan is free with 3 tunnels and a 7-day Pro trial; Pro costs $10/month for 20 tunnels plus custom domains and edge auth; Team is $25/user/month with 50 tunnels, SSO, and RBAC. The product can also be self-hosted on your own VM if desired. Architecturally, 21tunnel ships a Rust agent binary (Linux x86_64/arm64, Windows, macOS), uses the YAMUX multiplexer to carry many streams over one TLS connection, issues HMAC-signed capability tokens, and stores audit events in PostgreSQL. This combination is intended to feel like infrastructure while remaining affordable for side projects.
- Category
- AI Agents
- Pricing
- Free
Problem solved
Developers and AI agents need a safe way to expose local servers to the internet and operate autonomously without sharing long-lived, powerful credentials. 21tunnel solves this with a master-key delegation model: an AI agent can mint scoped child keys that expire automatically, and a human can revoke everything instantly with cascade revocation. It also provides standard public tunneling features for exposing HTTP, TCP, and SSH services.
Use cases
- Expose a local web server to the internet for webhooks, demos, or integration testing
- Let an AI agent independently create and manage short-lived project-scoped tunnels
- Share a localhost application with stakeholders or collaborators via a public URL
- Add Google login and allowlist-based access control to traffic before it reaches your localhost
- Expose TCP services such as PostgreSQL for secure remote debugging
- Use SSH tunnels for remote access to development environments
- Collaborate in teams with role-based access and a queryable audit log
Audience
- Developers
- ML Engineers
- Startups
- Enterprise
- Hobbyists
Pros
- Built-in AI agent key delegation with TTL and cascade revoke
- Supports HTTP, TCP, and SSH tunnels
- Custom domains and sticky subdomains on the free tier
- Live request inspector and audit log
- Simple free tier with no card required
Cons
- Newer and smaller ecosystem than ngrok or Cloudflare Tunnel
- Edge auth and some advanced capabilities require Pro plan
- Request replay and per-tunnel allowlists are still on the roadmap
- Self-host deployment adds maintenance overhead
- Documentation may be less extensive than established competitors
Official website: https://21tunnel.com/
Canonical LambdaBase page: https://www.lambdabase.com/tools/21tunnel