Openclaw Deploy
2026-03-31
新闻来源:网淘吧
围观:6
电脑广告
手机广告
SKILL.md 元数据格式示例
名称: openclaw-deploy 描述: 将 OpenClaw 构建并部署为 Docker 镜像或便携式包 作者: zfanmy-梦月儿 版本: 1.0.1 主页: 许可证: MIT 关键词:
- openclaw
- 部署
- docker
- 便携式
- 备份
- 迁移
要求:
二进制文件:
- node
- npm
- tar
OpenClaw 部署
将 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
更新日志
v1.0.1
- 修复了硬编码路径
- 添加了环境变量支持
- 改进了错误处理和依赖项检查
- 添加了路径验证
v1.0.0
- 初始版本
作者
zfanmy-梦月儿
文章底部电脑广告
手机广告位-内容正文底部
上一篇:Enteriva
下一篇:molt-chess


微信扫一扫,打赏作者吧~