Skip to content

Conversation

@paulotruta
Copy link
Member

Overview

This PR adds Clawdbot as a new Edgebox app - a containerized AI agent gateway that integrates WhatsApp, Telegram, Discord, and iMessage.

What's Included

  • Dockerfile: Node.js 22 with Clawdbot and dependencies
  • docker-compose.yml: Full configuration with persistent storage and all ports exposed (18789, 18790, 18793)
  • entrypoint.sh: Initialization script that creates config and workspace directories
  • Configuration templates:
    • clawdbot.json.template - Default Clawdbot config
    • edgeapp.template.env - Dashboard-compatible variables for Telegram, Discord, API keys
  • Documentation: Comprehensive README with setup, architecture, and troubleshooting

Features

✅ Centralized messaging gateway (WhatsApp, Telegram, Discord, iMessage)
✅ Bridge protocol for iOS/Android Clawdbot app pairing
✅ Canvas host for WebView asset serving
✅ Dashboard configuration UI for channel setup
✅ Persistent config and workspace storage
✅ Health checks and proper signal handling
✅ Multi-agent support for different use cases

Ports Exposed

  • 18789: Gateway WebSocket (agent control plane)
  • 18790: Bridge for node pairing (iOS/Android)
  • 18793: Canvas host (WebView assets)
  • 80: Web UI (via Traefik reverse proxy)

Configuration

Users can configure via the Edgebox dashboard:

  • Telegram Bot Token (from @Botfather)
  • Discord Bot Token (from Developer Portal)
  • Gateway Token (for remote access)
  • Primary LLM Model selection
  • API keys for Claude/OpenAI

Integration Notes

  • Follows edgebox-iot/apps patterns exactly (template bootstrap, compose naming, metadata)
  • Compatible with edgebox-iot/ws build system (./ws -b)
  • Ready for deployment to production Edgebox systems

Testing

Local testing can be done with:

make build apps="clawd"
make run apps="clawd"

Access at: http://clawd.local

References

- Adds Clawdbot as a containerized Edgebox app
- Centralized gateway for WhatsApp, Telegram, Discord, and iMessage
- Supports local client connections via Bridge protocol
- Configurable via Edgebox dashboard (channel tokens, model selection)
- Exposes ports 18789 (Gateway), 18790 (Bridge), 18793 (Canvas)
- Persistent configuration and workspace storage
- Comprehensive documentation and configuration templates
@paulotruta paulotruta force-pushed the feat/add-clawdbot-app branch from 35e400f to 1a556bf Compare January 21, 2026 20:17
- Remove src/ (nginx config, install files - not needed for Clawdbot)
- Remove edgebox-hosts.txt (template artifact)
- Remove edgebox-postinstall.sh/txt (not used)
- Remove .run marker file
- Remove appdata/ (local test artifacts)

Keeps only essential files for production deployment
- First line: 'clawd' (hostname)
- Second line: empty (required for hosts file parsing)
- Essential for accessing dashboard at clawd.local
- Changed bind from 0.0.0.0 (invalid) to 'lan'
- Added gateway.mode=local to config template
- Removed invalid gateway.bind and channels.whatsapp.enabled keys
- Tested successfully in Multipass VM isolation
- Created init-clawdbot.sh script for automatic agent setup
- Reads CLAWDBOT_AGENT_NAME and CLAWDBOT_AGENT_MODEL from env vars
- Falls back to sensible defaults (agent name 'Clawd', model 'opus-4.5')
- Idempotent - only runs if agent doesn't already exist
- Updated entrypoint to call init script before starting gateway
- Updated Dockerfile to include and run init script

App now starts fully configured without manual onboarding!
- Set bind to 'lan' for network accessibility
- Added default auth token 'clawd-default-token'
- Required for proper WebSocket connections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant