
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://img.shields.io/docker/pulls/fourplayers/openclaw.svg?maxAge=604800](https://hub.docker.com/r/fourplayers/openclaw/)
A ready-to-deploy Docker image for https://github.com/openclaw/openclaw, the powerful open-source AI assistant that brings Claude and GPT to your favorite messaging apps. Built for ODIN Fleet and any Docker-compatible platform.
Features:
bash# 1. Configure cp .env.example .env # Edit .env: set your API key and gateway auth (password or token) # 2. Build & start docker compose up -d --build # 3. Access Control UI # With password: https://localhost:18789 (enter password when prompted) # With token: https://localhost:18789/?token=YOUR_TOKEN
OpenClaw stores all configuration and state in /home/node/.openclaw inside the container. This directory must be mounted as a volume to prevent data loss when the container is recreated.
yamlvolumes: - ./data:/home/node/.openclaw
This folder contains:
openclaw.json — main configuration (gateway settings, API keys, TLS config)| Variable | Purpose | Default |
|---|---|---|
OPENCLAW_GATEWAY_HOST | Gateway public IP/FQDN | localhost |
OPENCLAW_GATEWAY_PORT | Gateway port | 18789 |
OPENCLAW_GATEWAY_PASSWORD | Gateway password (user-friendly) | - |
OPENCLAW_GATEWAY_TOKEN | Gateway token (machine-friendly) | Auto-generated |
ANTHROPIC_API_KEY | *** API key | - |
OPENAI_API_KEY | OpenAI API key | - |
GEMINI_API_KEY | Google *** API key | - |
OPENCLAW_AUTH_CHOICE | Auth provider if no API key | skip |
OPENCLAW_TLS_ENABLED | Enable HTTPS | false |
OPENCLAW_SKIP_ONBOARD | Skip auto-setup (for OAuth) | false |
OPENCLAW_MODEL | AI model to use | Auto-detected |
OPENCLAW_AUTO_UPDATE | Auto-update on startup | false |
OPENCLAW_UPDATE_CHANNEL | Update channel | stable |
OPENCLAW_SSH_ENABLED | Enable SSH server | false |
OPENCLAW_SSH_PORT | SSH server port | 22 |
OPENCLAW_SSH_AUTHORIZED_KEYS | SSH public keys (one per line) | - |
Auth modes: Set
OPENCLAW_GATEWAY_PASSWORDfor password auth, orOPENCLAW_GATEWAY_TOKENfor token auth. If neither is set, a token is auto-generated and printed in the logs.
Set OPENCLAW_TLS_ENABLED=true to enable HTTPS with an auto-generated self-signed certificate.
Custom certificates (mounted):
yamlvolumes: - ./certs/cert.pem:/certs/cert.pem:ro - ./certs/key.pem:/certs/key.pem:ro
Docker Secrets:
yamlsecrets: - tls_cert - tls_key
Disable TLS:
yamlenvironment: - OPENCLAW_TLS_ENABLED=false
Enable SSH for remote access and debugging. Uses public key authentication only (no passwords).
yamlenvironment: - OPENCLAW_SSH_ENABLED=true - OPENCLAW_SSH_AUTHORIZED_KEYS=ssh-ed25519 AAAA... user@host ports: - "2222:22"
Multiple keys (via environment):
yamlenvironment: - OPENCLAW_SSH_ENABLED=true - | OPENCLAW_SSH_AUTHORIZED_KEYS= ssh-ed25519 AAAA... user1@host ssh-rsa AAAA... user2@host
Via mounted file:
yamlvolumes: - ./authorized_keys:/ssh/authorized_keys:ro
Via Docker secret:
yamlsecrets: - ssh_authorized_keys
Then connect: ssh -p 2222 node@<host>
bash# 1. Interactive setup docker compose run --rm openclaw openclaw onboard # 2. Set OPENCLAW_SKIP_ONBOARD=true in .env # 3. Start docker compose up -d
bash# WhatsApp (shows QR code) docker compose exec -it openclaw openclaw channels login --channel whatsapp # Telegram docker compose exec openclaw openclaw channels add --channel telegram --token <BOT_TOKEN> # Discord docker compose exec openclaw openclaw channels add --channel discord --token <BOT_TOKEN> # Slack docker compose exec openclaw openclaw channels add --channel slack --bot-token <xoxb-...> --app-token <xapp-...>
bashdocker compose exec openclaw openclaw health docker compose exec openclaw openclaw channels list docker compose exec openclaw openclaw <command>
Set OPENCLAW_AUTO_UPDATE=true to automatically run openclaw update every time the container starts. This keeps OpenClaw at the latest version without rebuilding the image.
bashOPENCLAW_AUTO_UPDATE=true
You can also choose a release channel (stable, beta, or dev):
bashOPENCLAW_UPDATE_CHANNEL=beta
bashdocker compose pull docker compose up -d
Or rebuild from source:
bashdocker compose build --no-cache docker compose up -d
bashdocker compose logs -f # View logs rm -rf ./data && docker compose up -d # Reset and re-run setup
Permission denied on ./data directory:
If you see EACCES: permission denied errors for /home/node/.openclaw/openclaw.json, fix the data directory permissions:
bashsudo chown -R 1000:1000 ./data
The node user inside the container has UID 1000. This is common on Linux hosts where Docker creates the directory as root.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务
以下是 fourplayers/openclaw 相关的常用 Docker 镜像,适用于 不同场景 等不同场景: