名称: openclaw-deploy 描述: 将 OpenClaw 构建并部署为 Docker 镜像或便携式包 作者: zfanmy-梦月儿 版本: 1.0.1 主页: 许可证: MIT 关键词:
- openclaw
- 部署
- docker
- 便携式
- 备份
- 迁移 要求: 二进制文件:
- node
- npm
- tar
将 OpenClaw 构建并部署为 Docker 镜像或便携式包。

- 构建 Docker 镜像(精简版/完整版)
- 创建用于部署的便携式包
- 通过一条命令部署到远程服务器
- 备份和恢复配置
# Build both clean and full versions ./scripts/build-portable.sh # Export for deployment ./scripts/export-portable.sh
# Deploy clean version ./export/deploy.sh user@remote-server clean /opt/openclaw # Deploy full version ./export/deploy.sh user@remote-server full /opt/openclaw
openclaw-deploy/ ├── portable/clean/ # Clean version (no personal data) ├── portable/full/ # Full version (with config) ├── export/ # Deployment packages │ ├── openclaw-clean-portable.tar.gz │ ├── openclaw-full-portable.tar.gz │ └── deploy.sh └── scripts/ ├── build-portable.sh ├── export-portable.sh └── deploy.sh
# Install Node.js ./install-node.sh # Start OpenClaw cd clean && ./start.sh # or cd full && ./start.sh # Access WebUI open http://localhost:18789
- Node.js 22.x
- Docker(可选,用于Docker构建)
- curl、rsync(用于部署)
您可以使用环境变量自定义路径:
# OpenClaw installation directory (default: auto-detect) export OPENCLAW_INSTALL_DIR=/path/to/openclaw
OpenClaw config directory (default: ~/.openclaw)
export OPENCLAW_CONFIG_DIR=/path/to/.openclaw
Output directory (default: ./openclaw-portable-output)
export OUTPUT_DIR=/path/to/output
export OPENCLAW_INSTALL_DIR=/opt/openclaw export OPENCLAW_CONFIG_DIR=/opt/config/.openclaw export OUTPUT_DIR=/tmp/openclaw-packages ./scripts/build-portable.sh
- 修复了硬编码路径
- 添加了环境变量支持
- 改进了错误处理和依赖项检查
- 添加了路径验证
- 初始版本
zfanmy-梦月儿
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/275137.html