v0.7.8 — Load-balancing groups, health checks, and more
The open-source tunnel that scales with you.
rustunnel is an open-source secure tunnel for localhost, webhooks, and AI agents. Expose local servers behind NATs over a Rust-fast, end-to-end encrypted edge — or self-host the same server for free under AGPL. Pay-as-you-go from $3/month, with idle time always free.
rustunnel works with any MCP harness — Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, and custom agents — via a one-command installer or copy-paste config. Setup is one step: get an API key, set RUSTUNNEL_TOKEN, and your agent can create, manage, and close tunnels in plain language. See the Agent Integration guide, or jump to per-harness setup in the AI tools hub.
AI Agent
Claude Code, Codex, Cursor, Cline
"Expose port 3000"
Rustunnel MCP
Full feature set
http · tcp · udp · p2p · lb
Edge Relay
rustunnel-server
TLS · Routing · eu · us · ap
Localhost
:3000
Your app, ready in seconds
Any MCP harness
Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, or your own custom agent. One MCP server, copy-paste config for every client.
rustunnel-mcp
One-command install
Run the installer, paste your API key, and it writes the right config for your harness — merging into existing JSON or appending Codex's TOML automatically.
integrations/install.sh
The full feature set, in plain language
HTTP, TCP, and UDP tunnels, custom subdomains, regions, P2P, and load-balanced pools with health checks — every feature, drivable in natural language.
“load-balance these two backends”
An open-source tunnel server, self-hosted or managed.
Stop dealing with complex network setups. Expose localhost to the internet with secure, end-to-end encrypted tunnels — and run the same Rust server yourself when you need full control.
Blazing Fast Edge
Written entirely in Rust and deployed globally. Minimal memory footprint, high concurrency, and negligible latency overhead.
Managed or Open Source
Use our globally distributed relay network for hassle-free tunneling, or deploy the open-source relay on your own infrastructure.
Secure by Default
End-to-end encrypted multiplexed connections. Automatic Let's Encrypt TLS provisioning for all generated public endpoints.
Group-based load balancing with built-in health checks
Run multiple backends behind one subdomain or TCP port. Inbound connections are dispatched at random across healthy members — perfect for hot-spare backups or zero-downtime rollouts.
TCP and HTTP health probes
Configure TCP or HTTP probes per tunnel and rustunnel automatically removes unhealthy backends from the rotation. Failover happens client-side, so the edge never wastes a request on a sick upstream.
Direct P2P Tunnels
Two clients can connect peer-to-peer with NAT hole punching. The server signals; bytes flow directly between peers via QUIC, with automatic relay fallback when direct doesn't work.
Pay-as-you-go billing
Stop paying for idle tunnels
Why we built a pay-as-you-go alternative to flat-fee dev tunneling
VS
Typical SaaS
Flat Monthly Fee
💤
Laptop closed? Still paying.
🏖️
Weekend off? Still paying.
⏸️
Tunnel idle? Still paying.
Actual usage~12%
88% wasted on idle time
$10/month, always
Rustunnel
Pay Only for Usage
💤
Laptop closed?$0min credited
🏖️
Weekend off?$0min credited
⏸️
Tunnel idle?$0min credited
Value per dollar100%
Every cent goes toward actual usage
$3min/month
Minimum is credited to your usage — not a fee
Save up to 70% for light users
600+
GitHub Stars
100%
Open Source
Rust
Blazing Fast
🦀 Self-host freeor use managed cloud
Pay-as-you-go pricing — no per-tunnel fees.
Start tunneling for free. Upgrade to pay-as-you-go when you need custom subdomains and more tunnels — billed per gigabyte, not per tunnel.
Hobby
Perfect for testing webhooks and sharing progress.
The short version of what rustunnel is, how it’s priced, and how it compares to other tunneling tools.
What is rustunnel?
rustunnel is an open-source secure tunnel that exposes services running on your laptop or private network to the public internet over an encrypted WebSocket connection. It is similar to ngrok or Cloudflare Tunnel, but written in Rust, AGPL-licensed, and available either as a managed cloud with pay-as-you-go billing or as a self-hosted server you run on your own infrastructure.
Is rustunnel a free ngrok alternative?
Yes. rustunnel offers a free Hobby tier on the managed cloud (two concurrent tunnels with random subdomains) and the entire server is open source under AGPL, so you can self-host it for free with no usage limits. Paid plans add custom subdomains and pay-as-you-go usage with a $3 monthly minimum that is credited against your usage rather than charged on top of it.
Can I self-host rustunnel?
Yes. The rustunnel server is published on GitHub under AGPL and ships with a Docker image, a Makefile target, and a systemd service template. Self-hosting gives you unlimited tunnels, custom subdomains, and full control over the relay; you only need a VPS with a public IP and a wildcard DNS record pointed at it.
What protocols does rustunnel support?
HTTP/HTTPS with automatic Let's Encrypt TLS, raw TCP on a configurable port range, UDP forwarding, and direct peer-to-peer tunnels with NAT hole-punching over QUIC. Tunnels can be grouped behind a single subdomain or TCP port for client-side load balancing with TCP and HTTP health checks.
How is rustunnel priced?
The Hobby plan is free forever. The Pay-as-you-go plan has a $3/month minimum that is credited toward usage at $0.10 per GB of bandwidth — if you transfer one gigabyte of traffic in a month you spend the minimum, and idle tunnels cost nothing. Self-hosting is free under AGPL.
Does rustunnel work with AI agents like Claude Code, Codex, or Cursor?
Yes. rustunnel ships an MCP server that works with any MCP harness — Claude Code, Claude Desktop, Codex, Cursor, Windsurf, Cline, and custom agents. A one-command installer (integrations/install.sh) or copy-paste config wires it up; setup is one step — get an API key, set RUSTUNNEL_TOKEN, done. From there your agent can drive the full feature set in natural language: HTTP/TCP/UDP tunnels, custom subdomains, regions, P2P, and load-balanced pools with health checks.
Is rustunnel secure?
All client-server traffic is end-to-end encrypted with TLS, public HTTPS endpoints get automatic Let's Encrypt certificates, and tunnels are authenticated with API keys you control. The managed cloud routes traffic through regional edges only — payloads are not inspected or logged.
Does rustunnel work for webhook testing?
Yes. rustunnel is a drop-in tunnel for testing Stripe, GitHub, Slack, or any other webhook against a service running on localhost. Open an HTTP tunnel on the port your dev server is listening on, paste the public HTTPS URL into the provider's webhook configuration, and inbound deliveries are forwarded straight to your machine over an end-to-end encrypted connection.
Can I use a custom domain or custom subdomain?
Yes. Pay-as-you-go and self-hosted plans let you bind tunnels to a custom subdomain on the rustunnel edge (for example `myapp.eu.edge.rustunnel.com`). When self-hosting, the server is configured against your own wildcard DNS record so you can serve tunnels under any domain you own — there is no per-domain fee.
How does rustunnel compare to Cloudflare Tunnel?
Both expose local services without opening inbound ports, but the trade-offs differ. Cloudflare Tunnel is free and ties tunnels to a Cloudflare account and DNS zone — convenient if you already use Cloudflare. rustunnel is open source under AGPL, can be self-hosted on any VPS with no vendor lock-in, supports raw TCP and UDP plus direct peer-to-peer connections, and ships an MCP server so AI agents can manage tunnels programmatically.
Why self-host your tunnels?
rustunnel is an open-source tunnel server published under the AGPL licence. Run it on your own VPS for unlimited tunnels, custom domains, and full data sovereignty — no Enterprise contract required. See the self-hosting guide for the Ubuntu + systemd walkthrough.