Skip to main content
rustunnel is an open-source secure tunnel server written in Rust that exposes localhost over encrypted WebSocket connections. Self-host it on any VPS or use our managed cloud — an ngrok alternative with automatic Let’s Encrypt TLS, HTTP / TCP / UDP / P2P proxying, a live dashboard, Prometheus metrics, and audit logging. If you’re new here, the fastest way in is the Quickstart — install the client and open your first tunnel in three steps. If you want to know how it fits together, jump to the Architecture page; to drive tunnels from an AI agent, start with the agent integration guide.

Setting up

Get a tunnel running in minutes.

Start here

Follow the quickstart guide to install the client and open your first tunnel.

Explore the docs

Client Guide

All commands, flags, config file options, region selection, and troubleshooting.

Docker Deployment

Run the server locally with a self-signed cert or deploy to a VPS with Let’s Encrypt.

Self-Hosting

Production deployment on Ubuntu with systemd, TLS, PostgreSQL, and firewall rules.

MCP Server

Let AI agents (Claude, GPT-4o, Gemini) open and manage tunnels automatically.

Go deeper

Architecture

Internals: control protocol, yamux data plane, concurrency model, and crate structure.

Load Balancing & Health Checks

Run multiple backends behind one subdomain or TCP port. Random dispatch across healthy members with automatic failover.

P2P Tunnels

Direct peer-to-peer connections with NAT hole punching over QUIC, with automatic relay fallback.

UDP Tunnels

Forward UDP datagrams (game servers, DNS, QUIC, VoIP) to a public port on the rustunnel server.

Use rustunnel with AI agents

Claude Code Plugin

Install the rustunnel Claude Code plugin in one command. The agent gets six tunnel-management tools and your token is stored securely.

MCP Server (Cursor, Windsurf, any agent)

Wire the rustunnel MCP server into Cursor, Windsurf, Claude Desktop, OpenClaw, or any other MCP-compatible client to expose localhost on demand.