Skip to main content

Step 1 — Install the client

brew tap joaoh82/rustunnel
brew install rustunnel
This installs both rustunnel (the CLI client) and rustunnel-mcp (the MCP server for AI agent integration). No Rust toolchain required.
Download the archive for your platform from the latest GitHub Release, extract it, and move the binary onto your $PATH.
PlatformArchive
macOS Apple Siliconrustunnel-<version>-aarch64-apple-darwin.tar.gz
macOS Intelrustunnel-<version>-x86_64-apple-darwin.tar.gz
Linux x86_64 (glibc)rustunnel-<version>-x86_64-unknown-linux-gnu.tar.gz
Linux x86_64 (musl)rustunnel-<version>-x86_64-unknown-linux-musl.tar.gz
Linux arm64rustunnel-<version>-aarch64-unknown-linux-gnu.tar.gz
Windows x86_64rustunnel-<version>-x86_64-pc-windows-msvc.zip
Requires Rust 1.76 or later.
git clone https://github.com/joaoh82/rustunnel.git
cd rustunnel
cargo build --release -p rustunnel-client
sudo install -Dm755 target/release/rustunnel /usr/local/bin/rustunnel
Verify the installation:
rustunnel --version

Step 2 — Get an auth token

Access to the hosted service requires an auth token.
1

Open a token request issue

Go to github.com/joaoh82/rustunnel/issues/new and open an issue titled “Token request”.
2

Include your contact

Add your email address or Discord username in the body. Tokens are issued manually while the service is in early access.
3

Run the setup wizard

Once you receive your token, run:
rustunnel setup
The wizard prompts for your server address, token, and region, then writes ~/.rustunnel/config.yml.
Tunnel server address [edge.rustunnel.com:4040]: (press Enter)
Auth token: <paste your token>
Region [auto / eu / us / ap] (default: auto): (press Enter)

Created: /Users/you/.rustunnel/config.yml
If you are self-hosting, skip token requests entirely — use the admin_token you set in your server.toml. See the Self-Hosting guide.

Step 3 — Open your first tunnel

# Expose a local HTTP service on port 3000
rustunnel http 3000

# Connect to a specific region
rustunnel http 3000 --region eu

# Request a custom subdomain
rustunnel http 3000 --subdomain myapp

# Expose a raw TCP service (e.g. PostgreSQL)
rustunnel tcp 5432
The client prints the public URL as soon as the tunnel is established:
  Selecting nearest region… eu 12ms · us 143ms · ap 311ms → eu (Helsinki, FI) 12ms
✓ tunnel open  https://abc123.eu.edge.rustunnel.com
Press Ctrl-C to close the tunnel.

Available regions

RegionLocationServer
euHelsinki, FIeu.edge.rustunnel.com:4040
usHillsboro, ORus.edge.rustunnel.com:4040
apSingaporeap.edge.rustunnel.com:4040
The client auto-selects the nearest region by default when region: auto is set in your config.

Next steps

Client Guide

All commands, flags, config options, reconnection behavior, and error reference.

Self-Hosting

Run your own rustunnel server on a VPS with systemd and Let’s Encrypt.

Docker Deployment

Spin up the server locally or in production using Docker Compose.

MCP Server

Let AI agents manage tunnels on your behalf via the Model Context Protocol.