# rustunnel

> rustunnel is a self-hosted, open-source tunnel server in Rust exposing local services via encrypted WebSocket. Free managed cloud with pay-as-you-go billing and MCP.

- **Category:** Networking
- **Licence:** AGPL-3.0
- **Latest version:** v0.8.5
- **Open source:** oss
- **Languages:** Rust
- **Platforms:** Docker, Docker Compose, Linux, Debian, Homebrew, Build from Source
- **Tags:** Mcp Server, Ai Agents, WebSocket, Tls, Tunnel, Reverse Proxy, Api Gateway, Tunneling, Rust, Prometheus, Self Hosted, Webhook, Load Balancing, Audit logging, Health checks, Ngrok alternative, Webhook testing, P2p, Rustunnel, Localhost Exposure, Pay As You Go

## Description

rustunnel is a Rust-based tunnel server for exposing local services to the internet. It uses encrypted WebSocket links with TLS termination, provides automatic Let's Encrypt certificates for HTTPS, and supports raw TCP and UDP forwarding. Direct peer-to-peer tunnels use QUIC with NAT hole-punching. Multiple tunnels can be grouped for distributing traffic using health checks. The software includes a live terminal dashboard, a local request inspector with replay, Prometheus metrics, and audit logging. It also ships an MCP server compatible with any MCP harness, allowing AI assistants to create and manage tunnels using natural language. Users can either use the managed cloud service (free Hobby tier, pay-as-you-go starting at $3/month) or self-host the AGPL-licensed server on their own infrastructure via Docker, Docker Compose, systemd on Ubuntu, or pre-built binaries. Self-hosting requires a server with a public IP, wildcard DNS, and PostgreSQL for shared state.

## Links

- [Homepage](https://github.com/joaoh82/rustunnel)
- [Website](https://rustunnel.com)
- [Docker](ghcr.io/joaoh82/rustunnel-server)
- [Blog](https://rustunnel.com/blog)
- [Use Cases](https://rustunnel.com/use-cases)
- [AI Tools Hub](https://rustunnel.com/ai-tools)
- [Compare with ngrok](https://rustunnel.com/compare/ngrok)
- [Status Page](https://status.rustunnel.com)
- [Documentation](https://rustunnel.com/docs)
- [GitHub Repository](https://github.com/joaoh82/rustunnel)

---
Source: https://selfhost.directory/project/rustunnel