Skip to content

Open-source WSS gateway for connecting phones to moltbots. Speaks OpenClaw v3 protocol.

License

Notifications You must be signed in to change notification settings

loserbcc/openclaw-gateway

Repository files navigation

OpenClaw Gateway

Your bots, your phone, your data. No middleman.

Open-source WebSocket gateway for connecting your phone directly to your AI agents. No Telegram. No Discord. No third-party servers seeing your messages.

ShellPhone

TestFlight MIT License ScrappyLabs

Get the App

ShellPhone on TestFlight — free iOS client for this gateway. Join the public beta.

Why?

Every bot platform sees everything:

  • Telegram reads your bot conversations
  • Discord logs every message
  • "AI assistant" apps route through their servers

OpenClaw Gateway runs on your hardware. Messages travel directly from your phone to your server over encrypted WebSocket. Zero third-party visibility.


Quick Start

Docker (Recommended)

git clone https://github.com/loserbcc/openclaw-gateway.git
cd openclaw-gateway
docker compose up

Python

pip install openclaw-gateway
openclaw-gateway

The gateway starts on port 8770. Your auth token is printed to the console on first run.


Connect Your Phone

Option 1: Scan QR Code (Easiest)

openclaw-gateway --qr

Opens a QR code in your terminal. Scan it with Open-Shell-Phone to connect instantly.

Or visit http://localhost:8770/setup for a web-based QR code.

Option 2: Manual Entry

In Open-Shell-Phone, add a new gateway:

  • URL: wss://your-server:8770/gateway
  • Token: paste the auth token from console

Remote Access (Tailscale)

For secure access from anywhere without port forwarding:

tailscale serve https 8770

Then use your Tailscale hostname: wss://your-machine.ts.net/gateway


How It Works

┌─────────────────┐         ┌──────────────────┐         ┌─────────────────┐
│  Open-Shell     │  WSS    │  OpenClaw        │         │  Your LLM       │
│  Phone App      │ ──────► │  Gateway         │ ──────► │  (ollama/etc)   │
└─────────────────┘         └──────────────────┘         └─────────────────┘
                                    │
                                    ├──► TTS (ScrappyLabs / local)
                                    └──► ASR (ScrappyLabs / Whisper)
  1. Phone connects via encrypted WebSocket
  2. You send text or voice
  3. Gateway routes to your LLM (local or cloud)
  4. Response streams back in real-time
  5. Optional: TTS audio for spoken responses

Configuration

Environment variables or .env file:

Variable Default Description
OPENCLAW_PORT 8770 Server port
OPENCLAW_AUTH_TOKEN auto Auth token (auto-generated if not set)
OPENCLAW_LLM_PROVIDER auto auto, openai, anthropic, ollama
OPENCLAW_LLM_BASE_URL Custom OpenAI-compatible endpoint
OPENCLAW_LLM_API_KEY API key for cloud LLM
OPENCLAW_TTS_PROVIDER scrappylabs scrappylabs, openai, local, disabled
OPENCLAW_ASR_PROVIDER scrappylabs scrappylabs, whisper, disabled

Zero-Config Local LLM

If you have ollama running, the gateway auto-detects it. No config needed.

# Start ollama with any model
ollama run llama3

# Start gateway — it finds ollama automatically
openclaw-gateway

ScrappyLabs Integration (Free)

TTS and speech recognition powered by ScrappyLabs:

  • 50+ voices including character clones
  • Voice design from text descriptions
  • Fast speech recognition

No API key needed. No account. No rate limits for reasonable use. Just works.


REST API

Endpoint Method Description
/ GET Server info
/health GET Health check
/setup GET QR code for phone connection
/messages GET Message history
/voice POST Upload audio for transcription

Roadmap

  • WebSocket gateway with OpenClaw v3 protocol
  • Auto-detect local ollama
  • ScrappyLabs TTS/ASR integration
  • QR code connection setup (--qr flag + /setup endpoint)
  • Web dashboard for message history
  • Multi-user support
  • Plugin system for custom handlers
  • Matrix/XMPP bridge

Community

This is a community project. Take it where you want.

  • Issues: Bug reports, feature requests
  • PRs: Contributions welcome
  • Discussions: Ideas, use cases, show & tell

License

MIT — do whatever you want with it.


Part of the ScrappyLabs ecosystem
Free tools for builders. No money. No spam.

About

Open-source WSS gateway for connecting phones to moltbots. Speaks OpenClaw v3 protocol.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •