Cloud AI assistants are convenient until they're not. Rate limits during peak hours. Data leaving your network. Monthly subscriptions that add up. No way to customize behavior beyond what the provider allows.
LemonClaw is a self-hosted AI assistant that runs on your own hardware. It connects to Telegram, Discord, or any chat platform, uses any AI model through a unified API, and keeps all conversation data on your machine.
If you are deciding whether to self-host at all, read this alongside the Mac Studio local AI guide and the China developer guide. The first answers the hardware question. The second answers the payment and provider question.
What LemonClaw Does
At its core, LemonClaw is a gateway between chat platforms and AI models. You send a message on Telegram, LemonClaw routes it to your chosen AI model, and sends the response back.
But it goes further than a simple relay:
- Multi-model support: Switch between GPT-4.1, Claude, DeepSeek, and local models mid-conversation
- Persistent memory: Conversations persist across restarts with configurable context windows
- MCP server support: Connect to external tools (databases, APIs, file systems) through the Model Context Protocol
- Plugin system: Add custom commands, scheduled tasks, and integrations
- Multi-user: Each user gets their own conversation history and model preferences
- Image understanding: Send photos and get AI analysis (using vision-capable models)
- Voice messages: Speech-to-text processing for voice inputs
Architecture
Telegram/Discord โโ LemonClaw Gateway โโ AI API (LemonData/OpenAI/Local)
โ
โโโโโโดโโโโโ
โ Plugins โ
โ MCP โ
โ Memory โ
โโโโโโโโโโโ
LemonClaw runs as a single Node.js process. No database required for basic usage (conversations stored as JSON files). For production deployments, it supports persistent volumes on Kubernetes.
Quick Start (5 Minutes)
Option 1: One-Line Self-Hosted Install (Recommended)
curl -fsSL https://raw.githubusercontent.com/hedging8563/lemonclaw/main/deploy/self-hosted/install.sh | bash
The current installer prefers uv tool install when available, otherwise falls back to an isolated venv and runs lemonclaw init at the end.
Option 2: Manual Install
uv tool install --upgrade lemonclaw
lemonclaw init
Option 3: LemonData Hosted
If you don't want to manage infrastructure, LemonData offers hosted LemonClaw instances. Each instance runs in an isolated Kubernetes pod with persistent storage.
Sign up at lemondata.cc, navigate to the Claw section in your dashboard, and launch an instance. You get a dedicated subdomain (claw-yourname.lemondata.cc) with web terminal access.
The Current Self-Hosted Flow
The current local flow is:
lemonclaw init
lemonclaw gateway
lemonclaw status
Runtime data lives under:
~/.lemonclaw/config.json~/.lemonclaw/workspace/~/.lemonclaw/workspace/sessions/~/.lemonclaw/lemonclaw.log
That matters operationally. When teams say a self-hosted assistant is โjust a bot,โ they usually have not thought through where session state, logs, and credentials actually live.
Configuration
The config file (~/.lemonclaw/config.json) controls everything:
{
"api": {
"key": "sk-lemon-xxx",
"baseUrl": "https://api.lemondata.cc/v1"
},
"telegram": {
"token": "BOT_TOKEN_FROM_BOTFATHER"
},
"discord": {
"token": "DISCORD_BOT_TOKEN"
},
"agents": {
"defaults": {
"model": "claude-sonnet-4-6",
"compaction": { "mode": "default" }
}
}
}
Common commands worth knowing now:
lemonclaw initlemonclaw gatewaylemonclaw statuslemonclaw doctorlemonclaw channels loginlemonclaw channels status
Model Selection
Switch models per-conversation or set defaults:
/model claude-sonnet-4-6 # Switch to Claude
/model gpt-4.1-mini # Switch to GPT-4.1 Mini (cheaper)
/model deepseek-chat # Switch to DeepSeek (budget)
MCP Servers
Connect external tools through MCP (Model Context Protocol):
{
"mcp": {
"servers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-filesystem", "/path/to/allowed/dir"]
},
"postgres": {
"command": "npx",
"args": ["-y", "@anthropic/mcp-postgres", "postgresql://..."]
}
}
}
}
With MCP servers configured, your AI assistant can read files, query databases, and interact with external services directly from the chat interface.
Hosted vs Self-Hosted: Which One Fits
Use self-hosted when:
- data locality matters
- you want direct control over runtime and storage
- you need custom MCP servers or local tools
- you are comfortable operating a small service
Use hosted when:
- you want the Claw experience without maintaining a runtime
- your team values speed over control
- you need isolated instances but not low-level runtime ownership
For many teams, the best first step is hosted Claw plus a later move to self-hosted if the workflow becomes central.
Use Cases
Personal Knowledge Assistant
Connect LemonClaw to your notes directory via MCP filesystem server. Ask questions about your own documents, get summaries, find connections between notes.
Team DevOps Bot
Deploy in your team's Slack or Discord. Connect to your Kubernetes cluster, monitoring dashboards, and CI/CD pipelines. Team members can check deployment status, view logs, and trigger rollbacks through natural language.
Customer Support Automation
Connect to your product database and knowledge base. LemonClaw handles first-line support queries, escalating to humans when confidence is low.
Code Review Assistant
Connect to your Git repository. Send diffs for review, get security analysis, style suggestions, and bug detection without leaving your chat app.
Cost Comparison
| Setup | Monthly Cost | Models | Data Privacy |
|---|---|---|---|
| ChatGPT Plus | $20/user | GPT-4o, limited | Data on OpenAI servers |
| Claude Pro | $20/user | Claude only | Data on Anthropic servers |
| LemonClaw (self-hosted) | API usage only | Any model | Data on your server |
| LemonClaw (LemonData hosted) | $20/instance + API | Any model | Isolated K8s pod |
For a team of 5, ChatGPT Plus costs $100/month with limited model access. LemonClaw with shared API credits might cost $30-50/month total, with access to every model and full data control.
Hardware Requirements
- Minimum: Any machine with Node.js 18+ and 512MB RAM
- Recommended: 1 CPU core, 1GB RAM, 10GB storage
- For local models (Ollama): Add GPU/Apple Silicon requirements per model
LemonClaw itself is lightweight. The AI inference happens on the API provider's servers (or your local Ollama instance).
That distinction matters. You do not need a GPU to self-host LemonClaw. You only need a GPU if you also want to self-host the models.
Try LemonClaw: self-host with any AI API, or launch a hosted instance at LemonData. If you want to compare the cost side before choosing, the pricing comparison is the next page to read.