OpenClaw: AI gateway supporting Qwen, Gemini, Claude with Docker deployment.
1.4K
This is an AI agent service based on OpenClaw, integrating multiple AI tools and models, supporting unified management through a gateway.
data directory structure is complete:
data/
├── openclaw/
├── .qwen/
├── .gemini/
└── workspace/
docker compose up -d
Proxy server configured in docker-compose.yml:
environment:
- HTTP_PROXY=http://proxy-server:port
- HTTPS_PROXY=http://proxy-server:port
- http_proxy=http://proxy-server:port
- https_proxy=http://proxy-server:port
Complete docker-compose.yml example:
services:
agent:
build:
context: .
dockerfile: Dockerfile
args:
- HTTP_PROXY=http://proxy-server:port
- HTTPS_PROXY=http://proxy-server:port
- http_proxy=http://proxy-server:port
- https_proxy=http://proxy-server:port
container_name: agent
ports:
- "18789:18789"
volumes:
- ./data/openclaw:/home/agent/.openclaw
- ./data/.qwen:/home/agent/.qwen
- ./data/.gemini:/home/agent/.gemini
- ./data/workspace:/home/agent/workspace
environment:
- NODE_ENV=production
- PYTHONPATH=/home/agent
- TZ=Asia/Shanghai
- HTTP_PROXY=http://proxy-server:port
- HTTPS_PROXY=http://proxy-server:port
- http_proxy=http://proxy-server:port
- https_proxy=http://proxy-server:port
- OPENCLAW_GATEWAY_TOKEN=your_gateway_token_here
command: ["openclaw","gateway","run", "--verbose"]
networks:
- ai-agent-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:18789/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
volumes:
agent-data:
driver: local
networks:
ai-agent-network:
driver: bridge
Set the same gateway token in the following two configuration files:
data/openclaw/config.yamldata/openclaw/openclaw.jsonIt is critical that the tokens in both files match exactly. If the tokens are inconsistent, the OpenClaw gateway will fail to start properly and you will encounter "gateway token mismatch" errors, preventing proper communication between gateway components. This mismatch will cause the service to be unavailable.
NODE_ENV: Runtime environment (production)PYTHONPATH: Python module search pathTZ: Timezone setting (Asia/Shanghai)OPENCLAW_GATEWAY_TOKEN: Gateway authentication token - This is critical for securing your OpenClaw gateway. Without this token, unauthorized clients could connect to your gateway. If not set correctly, you may encounter "gateway token mismatch" errors, preventing proper communication between gateway components.Enter the container to check service status:
docker compose exec agent openclaw status
View service logs:
docker compose logs -f
Gateway Token Mismatch Error
gateway.auth.token and gateway.remote.token in both config.yaml and openclaw.json are set to the same valueProxy Connection Issues
Permission Issues
/home/agent/.openclaw directorychmod 700 /home/agent/.openclawdocker compose down && docker compose up -d
Regularly check and update OpenClaw version:
openclaw update
Regularly backup the data directory to preserve configurations and data.
The service includes integrated support for Telegram bot communication. To configure Telegram integration:
data/openclaw/openclaw.json file with your bot token:
{
"channels": {
"telegram": {
"enabled": true,
"dmPolicy": "pairing",
"botToken": "YOUR_BOT_TOKEN_HERE",
"groupPolicy": "allowlist",
"streamMode": "partial",
"proxy": "http://proxy-server:port"
}
}
}
openclaw config set channels.telegram.botToken YOUR_BOT_TOKEN_HERE
Note: The bot token in the default configuration is a placeholder. Replace it with your actual bot token for Telegram functionality to work properly.
Content type
Image
Digest
sha256:99ab4ca5e…
Size
1.8 GB
Last updated
7 months ago
docker pull osins/openclaw