@tclawio/bridge
v0.3.3
Published
Local daemon that bridges OpenClaw instances to Teleclaw cloud service
Readme
tclaw-bridge
Local daemon that bridges your OpenClaw instance to the Teleclaw cloud service.
What it does
- Connects your local OpenClaw (localhost) to Teleclaw without exposing ports
- Outbound WebSocket connection (works through firewalls/NAT)
- Handles commands from Teleclaw Mini App
- Sends status updates and logs to Teleclaw
- Auto-reconnects if connection drops
Installation & Usage
Quick Start
npx tclaw-bridge \
--user-id YOUR_TELEGRAM_ID \
--token YOUR_CONNECTION_TOKENEnvironment Variables
Instead of passing flags, you can set:
export OPENCLAW_URL=http://localhost:18789
export OPENCLAW_TOKEN=your-openclaw-gateway-token
export TELECLAW_SERVER=wss://api.teleclaw.ioThen just run:
npx tclaw-bridge --user-id 123456 --token abc...Full Options
npx tclaw-bridge \
--user-id 123456789 \
--token abc123...xyz \
--server wss://api.teleclaw.io \
--openclaw-url http://localhost:18789 \
--openclaw-token your-tokenHow It Works
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ OpenClaw │ ←── │ tclaw-bridge │ ──→ │ Teleclaw │
│ (localhost) │ │ (local) │ │ (cloud) │
└──────────────┘ └──────────────┘ └──────────────┘- Bridge polls OpenClaw locally (every 30s)
- Bridge connects OUTBOUND to Teleclaw WebSocket server
- Teleclaw sends commands → Bridge → OpenClaw
- OpenClaw responses → Bridge → Teleclaw → Your Mini App
Security
- ✅ No inbound ports opened (outbound-only connection)
- ✅ TLS encrypted (wss://)
- ✅ Token-based authentication
- ✅ OpenClaw gateway never exposed to internet
Requirements
- Node.js 18+ (LTS recommended)
- OpenClaw running locally
- OpenClaw gateway token
Troubleshooting
"OpenClaw unreachable"
Check if OpenClaw is running:
openclaw statusMake sure gateway is on port 18789 (default) or set OPENCLAW_URL to the correct port.
"Connection refused"
Check your internet connection and firewall. The bridge needs outbound WebSocket (wss://) access.
"Unauthorized"
Your Teleclaw connection token may be invalid. Get a new one from the Teleclaw Mini App → Settings → Connections.
License
MIT
