v0.7.8 — Load-balancing groups, health checks, and more

The self-hosted
ngrok alternative.

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.

brew install rustunnel
View Pricing
user@local ~ rustunnel
rustunnel http 3000 --subdomain myapp
Connecting to edge.rustunnel.com...
Session Status
online
Account
rt_live_abc123xyz... (Pro)
Version
0.7.8 (Rust 1.94.0)
Region
eu (Managed Edge)
Tunnel
HTTP
Forwarding
https://myapp.eu.edge.rustunnel.com http://localhost:3000
Share Localhost

Put your local app
on a public URL

Collaborators
Webhooks
r
NAT
Localhost
Built for AI Agents

Built for AI agents and MCP.

Claude Code, Cursor, GPT-4o, or any MCP-compatible agent can create, list, and close tunnels on your behalf — no manual configuration needed. The same MCP server powers our MCP tunnel guide and one-command Claude Code plugin.

AI Agent
Claude Code, Cursor, GPT-4o
"Expose port 3000"
Rustunnel MCP
6 Tools
create · close · list
Edge Relay
rustunnel-server
TLS · Routing · eu · us · ap
Localhost
:3000
Your app, ready in seconds

MCP Server

6 tools — create, close, list tunnels, check regions, view history, and get connection info. Stdio transport, works with any MCP-compatible client.

rustunnel-mcp

Claude Code Plugin

One-command install. Claude gets full tunnel management with zero config — token stored securely, tunnels cleaned up automatically.

/plugin install rustunnel

OpenClaw Skill

Published on OpenClaw for any compatible agent. Reads credentials from your config file and manages tunnels via the same MCP tools.

openclaw.dev/skills/rustunnel

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

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? $0 min credited
🏖️
Weekend off? $0 min credited
⏸️
Tunnel idle? $0 min 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.

$0/mo
  • 2 concurrent tunnels
  • Random subdomains only
  • HTTP + TCP + UDP + P2P tunnels
  • TLS/HTTPS termination
  • Community support
Get started free
Most popular

Pay-as-you-go

For developers who need custom subdomains and no monthly commitment.

$3 /mo + $0.10 / GB

$3/month minimum — pay only for what you use beyond that.

  • Unlimited tunnels
  • Custom subdomains
  • HTTP + TCP + UDP + P2P tunnels
  • TLS/HTTPS termination
  • Monthly spend cap
  • Standard support
Get started

Self-host

Deploy on your own infrastructure. Open-source under AGPL.

Free forever
  • Unlimited tunnels
  • Custom subdomains
  • HTTP + TCP + UDP + P2P tunnels
  • TLS/HTTPS termination
  • Full control
  • Community support
View on GitHub
Frequently asked questions

Questions, answered.

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 or Cursor?

Yes. rustunnel ships an MCP server that any MCP-compatible agent (Claude Code, Cursor, Claude Desktop, OpenClaw, or custom clients) can use to create, list, and close tunnels with six dedicated tools. There is also a one-command Claude Code plugin and a published OpenClaw skill.

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.

View on GitHub