Use this skill when:
Do NOT use this skill when:
bash
pip install aitun
Or install via one-line script (Linux/macOS):
bash
curl -fsSL https://aitun.cc/install.sh | bash
Windows (PowerShell):
powershell
irm https://aitun.cc/install.ps1 | iex
Or verify it is already installed:
bash
which aitun
Start the IoT service you want to expose. Examples:
bash
# Home Assistant
hass --config /path/to/config &
# Node-RED
node-red --port 8080 &
# Mosquitto MQTT broker
mosquitto -p 1883 -v &
# Custom IoT HTTP API / dashboard
python3 -m http.server 8080 --directory /path/to/dashboard &
# Grafana dashboard
grafana-server --homepath /usr/share/grafana &
For HTTP-based services (dashboards, REST APIs):
bash
aitun -p 8080 &
AITUN_PID=$!
sleep 3
For TCP-based services (MQTT broker on port 1883, use with auth token):
bash
aitun -k YOUR_TOKEN --tcp-ports 1883 &
AITUN_PID=$!
sleep 3
The output will contain the public URL, e.g.:
https://aitun.cc/abc123 (HTTP)text
Your IoT service is now accessible at: https://aitun.cc/abc123
- Dashboard: open in browser
- API endpoint: use for device data upload
- MQTT broker: connect via TCP forwarding
This tunnel expires in 24 hours.
For a permanent endpoint, register at https://aitun.cc
Configure remote IoT devices or cloud services to use the tunnel URL:
https://aitun.cc/abc123/api/dataWhen done, stop the tunnel and services:
bash
kill $AITUN_PID 2>/dev/null
The aitun command (installed via pip install aitun, or alternatively curl -fsSL https://aitun.cc/install.sh | bash / irm https://aitun.cc/install.ps1 | iex on Windows) accepts these flags:
FlagDescription-p PORTLocal HTTP service port (optional; omit for TCP-only mode with --tcp-ports)-k TOKENAuth token for registered subdomain (omit for free tunnel)--host HOSTLocal service address (default: localhost)--tcp-ports PORTSTCP forwarding ports, comma-separated (e.g., 22,3306; requires -k). Use without -p for TCP-only mode--p2pEnable P2P direct connection (default: enabled)--no-p2pDisable P2P, force server relay mode--daemonRun as background daemon--stopStop running daemon
aitun.cc/abc123), NOT subdomains-k token--tcp-ports to forward multiple TCP ports: --tcp-ports 1883,5683,502