| name | openclaw-china-docker |
| description | Deploy and configure OpenClaw AI bot gateway with Chinese IM platforms (Feishu, DingTalk, QQ, WeChat Work) using Docker |
| triggers | ["set up openclaw with chinese messaging platforms","deploy openclaw docker for feishu and dingtalk","configure openclaw china im integration","how do i use openclaw docker cn im","integrate openclaw with qq bot and wechat work","deploy ai bot gateway for chinese platforms","configure openclaw with agent reach and aiclient","troubleshoot openclaw china docker deployment"] |
OpenClaw China Docker Skill
Skill by ara.so — Hermes Skills collection.
This skill helps you deploy and configure OpenClaw-China-Docker, a pre-configured Docker image that integrates OpenClaw AI bot gateway with mainstream Chinese IM platforms including Feishu (Lark), DingTalk, QQ Bot, and WeChat Work (WeCom).
What is OpenClaw-China-Docker?
OpenClaw-China-Docker is a production-ready Docker image that packages OpenClaw with pre-installed plugins for Chinese IM platforms. It provides:
- Multi-platform support: Feishu (official/legacy), DingTalk, QQ Bot, WeChat Work
- Extended capabilities: Agent Reach integration (Twitter, Xiaohongshu, Weibo, Douyin)
- Configuration-driven: Environment variable based setup with
.env files
- Enhanced tooling: FFmpeg, Playwright, Chinese TTS, OpenCode AI
- Security: Docker-in-Docker sandbox mode for code execution
- Production features: Data persistence, isolated utility containers
Installation
Prerequisites
- Docker and Docker Compose installed
- API keys for AI models (OpenAI, Claude, etc.)
- Bot credentials for desired IM platforms
Quick Start
git clone https://github.com/justlovemaki/openclaw-china-docker.git
cd openclaw-china-docker
cp .env.example .env
cp .env.minimal .env
nano .env
docker compose up -d
docker compose logs -f openclaw
docker compose down
Pull Docker Image Directly
docker pull justlikemaki/openclaw-docker-cn-im:latest
Core Configuration
Environment Variables (.env)
The project uses environment variables for configuration. Key sections:
AI Model Configuration
OPENCLAW_AI_PROVIDER=openai
OPENCLAW_OPENAI_API_KEY=${OPENAI_API_KEY}
OPENCLAW_OPENAI_BASE_URL=https://api.openai.com/v1
OPENCLAW_OPENAI_MODEL=gpt-4o
OPENCLAW_AI_PROVIDER=anthropic
OPENCLAW_ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
OPENCLAW_ANTHROPIC_MODEL=claude-3-5-sonnet-20241022
OPENCLAW_OPENAI_BASE_URL=http://your-aiclient-api:8000/v1
Feishu (Lark) Configuration
OPENCLAW_FEISHU_ENABLED=true
OPENCLAW_FEISHU_APP_ID=cli_xxx
OPENCLAW_FEISHU_APP_SECRET=xxx
OPENCLAW_FEISHU_VERIFICATION_TOKEN=xxx
OPENCLAW_FEISHU_ENCRYPT_KEY=xxx
OPENCLAW_FEISHU_OLD_ENABLED=true
OPENCLAW_FEISHU_OLD_APP_ID=cli_xxx
DingTalk Configuration
OPENCLAW_DINGTALK_ENABLED=true
OPENCLAW_DINGTALK_CLIENT_ID=dingxxx
OPENCLAW_DINGTALK_CLIENT_SECRET=xxx
OPENCLAW_DINGTALK_ROBOT_CODE=xxx
QQ Bot Configuration
OPENCLAW_QQBOT_ENABLED=true
OPENCLAW_QQBOT_APPID=xxx
OPENCLAW_QQBOT_SECRET=xxx
OPENCLAW_QQBOT_INTENT=1
WeChat Work (WeCom) Configuration
OPENCLAW_WECOM_ENABLED=true
OPENCLAW_WECOM_CORP_ID=wwxxx
OPENCLAW_WECOM_AGENT_ID=1000xxx
OPENCLAW_WECOM_SECRET=xxx
OPENCLAW_WECOM_TOKEN=xxx
OPENCLAW_WECOM_ENCODING_AES_KEY=xxx
Sandbox Configuration
OPENCLAW_SANDBOX_MODE=all
Docker Compose Setup
Minimal docker-compose.yml:
version: '3.8'
services:
openclaw:
image: justlikemaki/openclaw-docker-cn-im:latest
container_name: openclaw-cn-im
restart: unless-stopped
env_file:
- .env
ports:
- "3000:3000"
volumes:
- ./workspace:/openclaw/workspace
- ./data:/openclaw/data
environment:
- TZ=Asia/Shanghai
Key Commands
Container Management
docker compose up -d
docker compose logs -f
docker compose logs -f openclaw
docker compose restart openclaw
docker compose down
docker compose down -v
Enter Container
docker compose exec openclaw bash
docker compose exec openclaw openclaw --version
Upgrade
git pull origin main
docker compose pull
docker compose up -d --force-recreate
docker image prune -f
Plugin Installation (Feishu Example)
docker compose run --rm openclaw-utils bash
cd /openclaw
npx openclaw plugin:install larksuite/openclaw-lark
Common Patterns
Pattern 1: Full Setup with Multiple Platforms
OPENCLAW_AI_PROVIDER=openai
OPENCLAW_OPENAI_API_KEY=${OPENAI_API_KEY}
OPENCLAW_OPENAI_MODEL=gpt-4o
OPENCLAW_FEISHU_ENABLED=true
OPENCLAW_DINGTALK_ENABLED=true
OPENCLAW_QQBOT_ENABLED=true
OPENCLAW_WECOM_ENABLED=true
OPENCLAW_FEISHU_APP_ID=cli_xxx
OPENCLAW_DINGTALK_CLIENT_ID=dingxxx
OPENCLAW_QQBOT_APPID=xxx
OPENCLAW_WECOM_CORP_ID=wwxxx
docker compose up -d
docker compose logs -f | grep -E 'feishu|dingtalk|qqbot|wecom'
Pattern 2: Integration with AIClient-2-API
OPENCLAW_AI_PROVIDER=openai
OPENCLAW_OPENAI_BASE_URL=http://aiclient-api:8000/v1
OPENCLAW_OPENAI_API_KEY=dummy-key
OPENCLAW_OPENAI_MODEL=gpt-4o
services:
aiclient-api:
image: justlikemaki/aiclient-2-api:latest
ports:
- "8000:8000"
volumes:
- aiclient-data:/app/data
openclaw:
depends_on:
- aiclient-api
Pattern 3: Enable Agent Reach for Web Search
Initialize Agent Reach in conversation:
禁止使用web_search,web_fetch 工具, 必须使用 agent-reach 的工具来替代你自带的web_search,web_fetch ,并写入tools和记忆文档中
This switches from built-in web tools to Agent Reach for searching Twitter, Xiaohongshu, Weibo, Douyin, etc.
Pattern 4: Sandbox Mode for Secure Code Execution
OPENCLAW_SANDBOX_MODE=all
services:
openclaw:
volumes:
- /var/run/docker.sock:/var/run/docker.sock
"""
Create a Python script that analyzes data
"""
Pattern 5: Custom Configuration with openclaw.json
services:
openclaw:
volumes:
- ./openclaw.json:/openclaw/openclaw.json
{
"ai": {
"provider": "openai",
"openai": {
"apiKey": "${OPENAI_API_KEY}",
"baseURL": "https://api.openai.com/v1",
"model": "gpt-4o"
}
},
"channels": {
"feishu": {
"enabled": true,
"appId": "${FEISHU_APP_ID}",
"appSecret": "${FEISHU_APP_SECRET}"
}
}
}
Pattern 6: Data Persistence
services:
openclaw:
volumes:
- ./workspace:/openclaw/workspace
- ./data:/openclaw/data
- ./logs:/openclaw/logs
tar -czf openclaw-backup-$(date +%Y%m%d).tar.gz workspace/ data/
tar -xzf openclaw-backup-20260517.tar.gz
Troubleshooting
Issue: Container fails to start
docker compose logs openclaw
grep "OPENCLAW_.*_ENABLED=true" .env
netstat -tlnp | grep 3000
Issue: Feishu plugin not working
docker compose exec openclaw bash
npx openclaw plugin:list | grep lark
npx openclaw plugin:install larksuite/openclaw-lark
curl -X POST http://your-server:3000/api/feishu/webhook
Issue: AI model not responding
docker compose exec openclaw bash
curl -H "Authorization: Bearer ${OPENCLAW_OPENAI_API_KEY}" \
${OPENCLAW_OPENAI_BASE_URL}/models
echo $OPENCLAW_OPENAI_MODEL
Issue: Docker sandbox not working
docker compose exec openclaw ls -la /var/run/docker.sock
docker compose exec openclaw env | grep SANDBOX
docker compose exec openclaw docker ps
Issue: Permission errors in volumes
sudo chown -R 1000:1000 workspace/ data/ logs/
services:
openclaw:
user: "${UID}:${GID}"
Issue: Memory or performance problems
docker stats openclaw
services:
openclaw:
deploy:
resources:
limits:
cpus: '2'
memory: 4G
reservations:
memory: 2G
Issue: Plugin conflicts
docker compose exec openclaw npx openclaw plugin:list
docker compose exec openclaw npx openclaw plugin:uninstall plugin-name
docker compose exec openclaw rm -rf /openclaw/.openclaw/plugins/.cache
docker compose restart openclaw
Advanced Configuration
Environment Variable Reference
Key variables (see .env.example for complete list):
OPENCLAW_AI_PROVIDER: openai, anthropic, google, etc.
OPENCLAW_SANDBOX_MODE: all, non-main, none
OPENCLAW_LOG_LEVEL: debug, info, warn, error
OPENCLAW_SERVER_PORT: Default 3000
OPENCLAW_SERVER_HOST: Default 0.0.0.0
Multi-Stage Deployment
cp .env.minimal .env.dev
docker compose -f docker-compose.yml -f docker-compose.dev.yml up
cp .env.example .env.prod
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d
Health Checks
services:
openclaw:
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
Documentation References
- Quick Start:
docs/quick-start.md
- Configuration:
docs/configuration.md
- AIClient Integration:
docs/aiclient-2-api.md
- Advanced Usage:
docs/advanced.md
- FAQ:
docs/faq.md
- Developer Notes:
docs/developer-notes.md
Best Practices
- Always use
.env files instead of hardcoding credentials
- Enable only needed platforms to reduce resource usage
- Mount volumes for workspace and data persistence
- Use AIClient-2-API for cost-effective unlimited token usage
- Enable sandbox mode for secure code execution
- Monitor logs regularly with
docker compose logs -f
- Backup data before upgrades with
tar -czf
- Keep repository synced with
git pull before upgrading