Expose Local Services
to the World

AiTun is a secure tunnel service that makes your local servers accessible from the public internet, supporting IPv6/IPv4 P2P direct connection and server relay.

Step 1: Install the Client

Recommended — pip install (cross-platform, bundles the binary):

pip install aitun

Alternative — one-line install script (Linux/macOS):

curl -fsSL https://aitun.cc/install.sh | bash

Windows (PowerShell):

irm https://aitun.cc/install.ps1 | iex

Or download the binary directly:

Download for your platform from the Downloads tab, or use wget:

wget https://aitun.cc/downloads/aitun-client-linux-amd64

chmod +x aitun-client-linux-amd64

Step 2: Start a Free Tunnel (No Sign-Up)

One-line install (HTTP tunnel):

aitun -p 8080

With binary (HTTP tunnel):

./aitun-client -p 8080

TCP-only (SSH/RDP, no HTTP):

aitun -k TOKEN --tcp-ports 22

Step 3: Get Your Public URL

The client outputs your public URL, e.g. https://aitun.cc/abc123. Share it with anyone to access your local service.

Step 4: Register for a Permanent Subdomain (Optional)

Sign in on the website, create a token, then:

aitun -k YOUR_TOKEN -p 8080

HTTP + TCP forwarding:

aitun -k YOUR_TOKEN -p 8080 --tcp-ports 22

TCP-only (SSH/RDP without HTTP):

aitun -k YOUR_TOKEN --tcp-ports 22

# Install via pip (recommended, cross-platform, bundles the binary) pip install aitun # Or install via one-line script (Linux/macOS) curl -fsSL https://aitun.cc/install.sh | bash # Windows (PowerShell) irm https://aitun.cc/install.ps1 | iex # Start an HTTP tunnel (local service must be running first) aitun -p 8080 # Expected output: [OK] Tunnel established [OK] Tunnel code: abc123 [OK] Proxy URL: https://aitun.cc/abc123 [OK] Valid until: 2025-06-14 (24h)

AiTun for AI Agents

Let AI agents expose their locally-built web pages to the public internet with a single command. AiTun provides instant secure tunnels that give local services a public URL, making it easy for AI agents to share their work.

🤖 How It Works

When an AI agent (like OpenClaw, Claude, or ChatGPT) builds a web page locally, it typically has no way to share it publicly. AiTun solves this by creating an instant secure tunnel that gives the local page a public URL. The agent simply installs aitun, starts a tunnel, and shares the URL with the user. No configuration, no sign-up required for basic tunnels.

Quick Integration

# 1. Install aitun (pip recommended, cross-platform, bundles the binary) pip install aitun # Or one-line install script (Linux/macOS) curl -fsSL https://aitun.cc/install.sh | bash # Windows (PowerShell) irm https://aitun.cc/install.ps1 | iex # 2. Serve the local web page python3 -m http.server 8080 --directory /path/to/site # 3. Create a tunnel (no sign-up needed) aitun -p 8080 # Result: Your site is live at https://aitun.cc/abc123 # TCP-only mode (SSH/RDP without HTTP port) aitun -k TOKEN --tcp-ports 22

API Integration for AI Agents

AiTun provides a simple REST API that AI agents can use programmatically to check subdomain availability and register custom domains for permanent URLs.

# Check subdomain availability curl https://aitun.cc/aitun-api/subdomain/check/myapp # Register a custom subdomain (requires auth token) curl -X POST https://aitun.cc/aitun-api/subdomain/register -H "Authorization: Bearer YOUR_TOKEN" -H "Content-Type: application/json" -d '{"name":"myapp","domain_base":"t.aitun.cc"}'
🌐 Custom Subdomain

Register your own subdomain. Active for 30 days (renewable). Requires sign-in.

myapp.t.aitun.cc
⚡ Free Tunnel

No sign-up needed. Instant proxy URL (path-based routing), valid for 24 hours, auto-renewed on restart.

aitun.cc/abc123
🔒 Token-Based Auth

Use -k TOKEN flag with your auth token. Tokens can be renewed from the dashboard.

aitun -k TOKEN -p 8080
🔌 TCP-Only Mode

Forward SSH, RDP, or databases without a local HTTP port. Omit -p and use --tcp-ports only.

aitun -k TOKEN --tcp-ports 22
🔄 P2P + Relay

Supports P2P direct connection with automatic relay fallback. Low latency, high reliability.

aitun -p 8080 --p2p
🤖

ClawHub Skills for AI Agents

AiTun publishes 9 specialized skills on ClawHub, the skill registry for OpenClaw AI agents. Install the skill matching your use case, and your AI agent can expose local services to the internet with a single command.

# Install any AiTun skill for your AI agent clawhub install aitun-tunnel clawhub install sendfile clawhub install webhook-receiver
🚇 aitun-tunnel

Expose local web pages and HTTP services to the public internet. The core tunneling skill for sharing any local service.

View on ClawHub →
📁 sendfile

Send files to users in chat via temporary download links. P2P or relay delivery, no size limits, works in any browser.

View on ClawHub →
🔗 webhook-receiver

Receive external webhooks and callbacks in real time. GitHub, Stripe, OAuth, form submissions — all routed to your local handler.

View on ClawHub →
👀 live-preview

Share a live preview of a website under development with hot-reload support. Users see your changes as you iterate.

View on ClawHub →
🔌 remote-api

Expose a local API service for external testing and integration. Share REST, GraphQL, or any HTTP API instantly.

View on ClawHub →
✏️ collab-edit

Real-time collaborative editing and whiteboarding. Co-edit code, documents, or drawings with users in real time.

View on ClawHub →
📡 iot-bridge

Bridge IoT devices to the cloud. Expose local MQTT brokers, device dashboards, and HTTP APIs so remote devices can connect, report data, and receive commands.

View on ClawHub →
🖥️ sshtunnel

Expose local SSH servers for remote access via TCP tunnel. Provide SSH access to dev machines, servers, or containers behind NAT/firewall.

View on ClawHub →
💻 rdptunnel

Expose local RDP (Remote Desktop) servers for remote desktop access via TCP tunnel. Connect to Windows machines, xrdp Linux desktops, or VDI instances behind NAT/firewall from anywhere on the internet.

View on ClawHub →
⬇️ Download SKILL.md View All on ClawHub

What the Skill Does for AI Agents

1️⃣
Install & Detect

Agent downloads the aitun client binary and verifies it is available on the system PATH.

2️⃣
Start Local Server

Agent spins up a local HTTP server to serve the built web page or application.

3️⃣
Create Tunnel

Agent runs aitun -p 8080 to get an instant public URL. For TCP-only (SSH/RDP), use aitun -k TOKEN --tcp-ports 22. No registration required for free tunnels.

4️⃣
Share with User

Agent delivers the public URL to the user, who can open it in any browser on any device.

Common Use Cases

Web Development

Share locally built websites with clients for instant preview and feedback.

API Testing

Expose local APIs for webhook testing and third-party integration development.

AI Agent Demos

Let AI agents showcase their generated applications in real-time to users.

IoT & Devices

Access IoT device dashboards and services running on local networks remotely.

⚠️ Important: Free tunnels expire after 24 hours. For permanent URLs, register a custom subdomain at the top of this page.
v4.9.22 Latest Release
# Install via pip (recommended, cross-platform, bundles the binary)
pip install aitun
# Or download the client for your platform below
wget https://aitun.cc/downloads/aitun-client-linux-amd64 && chmod +x aitun-client-linux-amd64

Sign in to manage your tunnels and subdomains

🔗

P2P Direct Connection

Supports IPv6/IPv4 P2P direct tunneling between client and connector, reducing latency and server load. Falls back to relay automatically when P2P is unavailable.

🔄

Server Relay

When direct P2P connection is not possible, traffic is securely relayed through the AiTun server, ensuring your services are always accessible regardless of network conditions.

🌐

Custom Subdomains

Get a custom subdomain (e.g., myapp.t.aitun.cc) for each tunnel. Easily share your local development server, API, or webhook with anyone on the internet.

🔐

Secure & Encrypted

All tunnel traffic is encrypted end-to-end. Authentication tokens ensure only authorized clients can create tunnels. Your data stays private and secure.

Zero-Config Quick Start

No sign-up required. Just run the client and it automatically creates a tunnel with a proxy URL (e.g., aitun.cc/abc123) with 24-hour validity, auto-renewed on each restart. Perfect for quick demos and testing.

🌐

Distributed Relay Network

Clients optionally participate as relay nodes, creating a distributed network that improves speed and resilience. Every participant makes the network stronger for everyone.

💻

Cross-Platform

Clients available for Linux (amd64/arm64), macOS (Intel/Apple Silicon), and Windows. Download the binary for your platform and start tunneling in seconds.

🚀

AI Agent Ready

Integrate AiTun into your AI agents and workflows. Use our CLI or API to expose locally-built web pages to the public internet with a single command.

How AiTun Tunnel Works

AiTun supports P2P direct connection, server relay, and distributed relay network modes.

Local Service
localhost:8080
AiTun Client
aitun
AiTun Server
aitun.cc
Public URL
myapp.t.aitun.cc

P2P Mode (Preferred)

When the client and connector both support IPv6/IPv4 and can reach each other directly, AiTun establishes a P2P tunnel with minimal latency. The server only assists in the initial handshake and then steps back, allowing direct data transfer between the two endpoints.

Relay Mode (Fallback)

When P2P is not possible (e.g., both behind symmetric NAT), all traffic is securely relayed through the AiTun server. This ensures your service is always accessible, regardless of network topology. The relay adds minimal overhead thanks to efficient multiplexing.

Distributed Relay Network

Clients connect by relay mode automatically serve as relay nodes in the distributed network. This improves overall throughput and resilience by providing multiple relay paths. Each relay node only forwards encrypted traffic and cannot read the content. Participating clients help make the network faster for everyone.