> ## Documentation Index
> Fetch the complete documentation index at: https://rustunnel.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# rustunnel docs — open-source, self-hosted tunnel server

> Documentation for rustunnel — the open-source, self-hosted secure tunnel server written in Rust that exposes localhost, webhooks, and TCP/UDP services to the internet. Self-host the tunnel server or use the managed cloud — same client binary, same docs. A self-hostable ngrok alternative.

**rustunnel** is an open-source secure tunnel server written in Rust that exposes localhost over encrypted WebSocket connections. [Self-host it on any VPS](/docs/guides/self-hosting) or use our [managed cloud](https://rustunnel.com) — an [ngrok alternative](/docs/quickstart) 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](/docs/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](/docs/guides/architecture) page; to drive tunnels from an AI agent, start with the [agent integration guide](/docs/guides/agent-integration).

## Setting up

Get a tunnel running in minutes.

<Card title="Start here" icon="rocket" href="/docs/quickstart" horizontal>
  Follow the quickstart guide to install the client and open your first tunnel.
</Card>

## Explore the docs

<Columns cols={2}>
  <Card title="Client Guide" icon="terminal" href="/docs/guides/client-guide">
    All commands, flags, config file options, region selection, and troubleshooting.
  </Card>

  <Card title="Docker Deployment" icon="docker" href="/docs/guides/docker-deployment">
    Run the server locally with a self-signed cert or deploy to a VPS with Let's Encrypt.
  </Card>

  <Card title="Self-Hosting" icon="server" href="/docs/guides/self-hosting">
    Production deployment on Ubuntu with systemd, TLS, PostgreSQL, and firewall rules.
  </Card>

  <Card title="MCP Server" icon="robot" href="/docs/guides/mcp-server">
    Let AI agents (Claude, GPT-4o, Gemini) open and manage tunnels automatically.
  </Card>
</Columns>

## Go deeper

<Columns cols={2}>
  <Card title="Architecture" icon="sitemap" href="/docs/guides/architecture">
    Internals: control protocol, yamux data plane, concurrency model, and crate structure.
  </Card>

  <Card title="Load Balancing & Health Checks" icon="scale-balanced" href="/docs/reference/load-balancing">
    Run multiple backends behind one subdomain or TCP port. Random dispatch across healthy members with automatic failover.
  </Card>

  <Card title="P2P Tunnels" icon="arrows-left-right" href="/docs/reference/p2p-tunnels">
    Direct peer-to-peer connections with NAT hole punching over QUIC, with automatic relay fallback.
  </Card>

  <Card title="UDP Tunnels" icon="bolt" href="/docs/reference/udp-tunnels">
    Forward UDP datagrams (game servers, DNS, QUIC, VoIP) to a public port on the rustunnel server.
  </Card>
</Columns>

## Use rustunnel with AI agents

<Columns cols={2}>
  <Card title="Claude Code Plugin" icon="robot" href="/docs/guides/claude-plugin">
    Install the rustunnel Claude Code plugin in one command. The agent gets six tunnel-management tools and your token is stored securely.
  </Card>

  <Card title="MCP Server (Cursor, Windsurf, any agent)" icon="plug" href="/docs/guides/mcp-server">
    Wire the rustunnel MCP server into Cursor, Windsurf, Claude Desktop, OpenClaw, or any other MCP-compatible client to expose localhost on demand.
  </Card>
</Columns>
