$git clone https://github.com/joaoh82/rustunnelThe open-source tunnel that scales with you. Don't pay for idle time. Secure, Rust-fast, and Pay-as-you-go.
| 1 | # rustunnel |
| 2 | |
| 3 | [](https://github.com/joaoh82/rustunnel/actions/workflows/ci.yml) |
| 4 | [](LICENSE) |
| 5 | [](https://www.rust-lang.org) |
| 6 | [](https://smithery.ai/servers/joaoh82/rustunnel) |
| 7 | |
| 8 |  |
| 9 | |
| 10 | The open-source tunnel that scales with you. Don't pay for idle time. Secure, Rust-fast, and Pay-as-you-go. |
| 11 | |
| 12 | Expose local services through a public server over encrypted WebSocket connections with TLS termination, HTTP/TCP proxying, a live dashboard, Prometheus metrics, and audit logging. |
| 13 | |
| 14 | You can self-host or use our managed service. |
| 15 | |
| 16 | **Using an AI agent?** rustunnel ships an [MCP server](https://rustunnel.com/docs/guides/mcp-server) — one-click setup for Cursor (then add your [API token](https://rustunnel.com)): |
| 17 | |
| 18 | [](https://cursor.com/install-mcp?name=rustunnel&config=eyJjb21tYW5kIjoicnVzdHVubmVsLW1jcCIsImFyZ3MiOlsiLS1zZXJ2ZXIiLCJldS5lZGdlLnJ1c3R1bm5lbC5jb206NDA0MCIsIi0tYXBpIiwiaHR0cHM6Ly9ldS5lZGdlLnJ1c3R1bm5lbC5jb206ODQ0MyJdLCJlbnYiOnsiUlVTVFVOTkVMX1RPS0VOIjoiWU9VUl9UT0tFTiJ9fQ==) |
| 19 | |
| 20 | For Claude Code, Claude Desktop, Windsurf, and others, see the [agent integration guide](https://rustunnel.com/docs/guides/agent-integration) or the agent manual at [rustunnel.com/agents.md](https://rustunnel.com/agents.md). |
| 21 | |
| 22 | --- |
| 23 | |
| 24 | ## Table of Contents |
| 25 | |
| 26 | - [Hosted service](#hosted-service) |
| 27 | - [Architecture overview](#architecture-overview) |
| 28 | - [Requirements](#requirements) |
| 29 | - [Local development setup](#local-development-setup) |
| 30 | - [Build](#build) |
| 31 | - [Run tests](#run-tests) |
| 32 | - [Run the server locally](#run-the-server-locally) |
| 33 | - [Run the client locally](#run-the-client-locally) |
| 34 | - [Git hooks](#git-hooks) |
| 35 | - [Production deployment (Ubuntu / systemd)](#production-deployment-ubuntu--systemd) |
| 36 | - [1 — Install dependencies](#1--install-dependencies) |
| 37 | - [2 — Build release binaries](#2--build-release-binaries) |
| 38 | - [3 — Create system user and directories](#3--create-system-user-and-directories) |
| 39 | - [4 — Install the server binary](#4--install-the-server-binary) |
| 40 | - [5 — Create the server config file](#5--create-the-server-config-file) |
| 41 | - [6 — TLS certificates (Let's Encrypt + Cloudflare)](#6--tls-certificates-lets-encrypt--cloudflare) |
| 42 | - [7 — Set up systemd service](#7--set-up-systemd-service) |
| 43 | - [8 — Open firewall ports](#8--open-firewall-ports) |
| 44 | - [9 — Verify the server is running](#9--verify-the-server-is-running) |
| 45 | - [Updating the server](#updating-the-server) |
| 46 | - [Docker deployment](#docker-deployment) · [full guide](docs/docker-deployment.md) |
| 47 | - [Client configuration](#client-configuration) |
| 48 | - [Installation](#installation) |
| 49 | - [Setup wizard](#setup-wizard) |
| 50 | - [Quick start (CLI flags)](#quick-start-cli-flags) |
| 51 | - [Machine-readable output (`--json`)](#machine-readable-output---json) |
| 52 | - [Config file](#config-file) |
| 53 | - [Token management](#token-management) |
| 54 | - [Port reference](#port-reference) |
| 55 | - [Config file reference (server)](#config-file-reference-server) |
| 56 | - [REST API](#rest-api) |
| 57 | - [AI agent integration (MCP server)](#ai-agent-integration-mcp-server) |
| 58 | - [OpenClaw skill](#openclaw-skill) |
| 59 | - [Monitoring](#monitoring) |
| 60 | - [Roadmap](#roadmap) |
| 61 | - [Contributing](#contributing) |
| 62 | - [License](#license) |
| 63 | - [Contact](#contact) |
| 64 | |
| 65 | --- |
| 66 | |
| 67 | ## Hosted service |
| 68 | |
| 69 | You can use rustunnel without running your own server. We operate a global fleet of public edge servers that you can connect to immediately. |
| 70 | |
| 71 | ### Available regions |
| 72 | |
| 73 | | Region ID | Server | Location | Control plane | Status | |
| 74 | |-----------|--------|----------|---------------|--------| |
| 75 | | `eu` | `eu.edge.rustunnel.com` | Helsinki, FI | `:4040` | Live | |
| 76 | | `us` | `us.edge.rustunnel.com` | Hillsboro, OR | `:4040` | Live | |
| 77 | | `ap` | `ap.edge.rustunnel.com` | Singapore | `:4040` |