Overview • Install • Platform Support • Channel Support • Directory Trees • Operations • Security Baseline
LunaeClaw is built for operators who need an agent runtime they can actually deploy and maintain, not just demo.
| What you get | Why it matters |
|---|---|
lunaeclaw gateway |
Long-running service loop for real traffic |
lunaeclaw webui |
Visual config and diagnostics without rewriting JSON by hand |
| Multi-channel adapters | One runtime across Telegram/Discord/Feishu/DingTalk/QQ/Slack/WhatsApp/Email/Mochat |
| MCP + Skills + aliases | Keep workflows customizable without forking core logic |
status + doctor |
Fast diagnostics when something breaks |
Tip
No channel is hardcoded as “the only first-class path”. Enable only what your deployment needs.
| Scenario | Recommendation |
|---|---|
| Local development (macOS/Linux) | uv sync --extra dev |
| Windows workstation | WSL2 + Ubuntu + uv |
| Server / NAS / homelab | Docker Compose |
| Minimal editable install | pip install -e . |
Prerequisites: Python 3.11+, uv; Node.js 20+ only if enabling WhatsApp bridge.
git clone <your-repo-url>
cd LunaeClaw
uv sync --extra dev
uv run lunaeclaw onboard
uv run lunaeclaw gateway
# another shell
uv run lunaeclaw webui --host 0.0.0.0 --port 18791# inside Ubuntu (WSL2)
sudo apt update
sudo apt install -y curl git python3 python3-venv python3-pip
curl -LsSf https://astral.sh/uv/install.sh | sh
git clone <your-repo-url>
cd LunaeClaw
uv sync --extra dev
uv run lunaeclaw onboard
uv run lunaeclaw gatewaygit clone <your-repo-url>
cd LunaeClaw
mkdir -p ./.lunaeclaw-data
docker compose up -d --build lunaeclaw-gateway lunaeclaw-webui
docker compose logs -f --tail=200Default ports:
- Gateway
18790 - WebUI
18791
Notes:
./.lunaeclaw-datais the default host bind-mount for runtime state (config.json,.env,runtime/, sessions, tokens). On servers this appears as<repo>/.lunaeclaw-dataand is expected.- To change host storage location, set
LUNAECLAW_HOST_DATA_DIR=/abs/pathbeforedocker compose up. - If no provider/model is configured yet, gateway stays in
waiting_config(no restart storm). Configure API key/model in WebUI orconfig.json, then it will switch torunning.
git clone <your-repo-url>
cd LunaeClaw
pip install -e .
lunaeclaw onboard
lunaeclaw gateway~/.lunaeclaw/config.json
{
"providers": {
"endpoints": {
"openai": {
"type": "openai_compatible",
"apiBase": "https://api.openai.com/v1",
"apiKey": "${OPENAI_API_KEY}",
"models": ["gpt-4o-mini", "gpt-4.1-mini"]
}
}
},
"agents": {
"defaults": {
"model": "openai/gpt-4o-mini",
"temperature": 0.1
}
}
}~/.lunaeclaw/.env
OPENAI_API_KEY=sk-xxxRun a health check:
lunaeclaw doctorCurrent CI is
ubuntu-latest. Other environments are supported by dependency/runtime design and common operator usage; always runlunaeclaw doctorafter setup.
| Platform | Status | Best install path | Notes |
|---|---|---|---|
| Linux server (x86_64/arm64) | Recommended | Docker Compose | Predictable production footprint |
| macOS (Apple Silicon/Intel) | Recommended | Local uv |
Best DX for iteration |
| Windows | Supported (WSL2 recommended) | WSL2 + Ubuntu | Native Windows shell is not primary path |
| NAS/homelab | Recommended | Docker Compose | Host-mounted data directory simplifies backup |
| Channel | Runtime requirement | Key config fields |
|---|---|---|
| Telegram | Python runtime | channels.telegram.token, allowFrom |
| Discord | Python runtime | channels.discord.token, allowFrom |
| Feishu | Python runtime | channels.feishu.appId, appSecret, allowFrom |
| DingTalk | Python runtime | channels.dingtalk.clientId, clientSecret, allowFrom |
| Python runtime | channels.qq.appId, secret, allowFrom |
|
| Slack | Python runtime | channels.slack.botToken, appToken |
Python + Node.js bridge (bridge/, Node 20+) |
channels.whatsapp.bridgeUrl, optional bridgeToken, allowFrom |
|
| Python + IMAP/SMTP | channels.email.imap*, smtp*, allowFrom, consentGranted |
|
| Mochat | Python runtime | channels.mochat.baseUrl, clawToken, allowFrom |
LunaeClaw/
├── lunaeclaw/ # runtime source (app/core/capabilities/platform/services)
├── bridge/ # WhatsApp Node.js bridge
├── tests/public/ # public regression tests
├── docs/public/ # publishable governance docs
├── scripts/ # quality/release helper scripts
├── docker-compose.yml # local production-like deployment
├── Dockerfile # runtime image build
└── pyproject.toml # package metadata + dependencies
~/.lunaeclaw/
├── config.json
├── .env
├── env/
├── workspace/
├── mcp/
├── skills/
├── media/
├── exports/
└── bridge/ # copied/compiled WhatsApp bridge runtime
# overall runtime status
lunaeclaw status
# config/runtime diagnostics
lunaeclaw doctor
# per-channel config status
lunaeclaw channels status
# WhatsApp bridge login flow
lunaeclaw channels loginBefore exposing the runtime to real users:
- configure
allowFromon every enabled channel (empty list means open access) - set file permissions:
~/.lunaeclawas700, config/env as600 - run with a non-root user
- if WhatsApp is enabled, set
channels.whatsapp.bridgeToken - apply SECURITY.md
- Upstream foundation: HKUDS/nanobot
- Core libraries used heavily:
litellm,pydantic,python-telegram-bot,websockets,@whiskeysockets/baileys
Thanks to upstream and ecosystem maintainers.
MIT. See LICENSE.