You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
127 lines
2.1 KiB
127 lines
2.1 KiB
|
1 month ago
|
# mem0 记忆系统部署文档
|
||
|
|
|
||
|
|
## 快速开始
|
||
|
|
|
||
|
|
### 1. 系统检查
|
||
|
|
```bash
|
||
|
|
./scripts/01-system-check.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 2. 安装 Tailscale
|
||
|
|
```bash
|
||
|
|
./scripts/02-install-tailscale.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 3. 创建目录
|
||
|
|
```bash
|
||
|
|
./scripts/03-create-directories.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 4. 启动中心服务
|
||
|
|
```bash
|
||
|
|
./scripts/05-start-center.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 5. 安装 mem0 Skill
|
||
|
|
```bash
|
||
|
|
./scripts/06-create-mem0-skill.sh
|
||
|
|
./scripts/07-install-dependencies.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 6. 测试
|
||
|
|
```bash
|
||
|
|
python3 /root/.openclaw/workspace/skills/mem0-integration/mem0_client.py
|
||
|
|
```
|
||
|
|
|
||
|
|
## 服务信息
|
||
|
|
|
||
|
|
### 中心节点 (vps-vaym)
|
||
|
|
- **Tailscale IP**: 100.115.94.1
|
||
|
|
- **节点名称**: mem0-general-center
|
||
|
|
- **业务类型**: general
|
||
|
|
|
||
|
|
### 服务端口
|
||
|
|
| 服务 | 端口 | 访问方式 |
|
||
|
|
|------|------|---------|
|
||
|
|
| Qdrant | 6333 | Tailscale 内网 |
|
||
|
|
| Dozzle | 9999 | Tailscale 内网 |
|
||
|
|
|
||
|
|
## 管理命令
|
||
|
|
|
||
|
|
### 查看服务状态
|
||
|
|
```bash
|
||
|
|
cd /opt/mem0-center && docker compose ps
|
||
|
|
```
|
||
|
|
|
||
|
|
### 查看日志
|
||
|
|
```bash
|
||
|
|
cd /opt/mem0-center && docker compose logs -f
|
||
|
|
```
|
||
|
|
|
||
|
|
### 重启服务
|
||
|
|
```bash
|
||
|
|
cd /opt/mem0-center && docker compose restart
|
||
|
|
```
|
||
|
|
|
||
|
|
### 停止服务
|
||
|
|
```bash
|
||
|
|
cd /opt/mem0-center && docker compose down
|
||
|
|
```
|
||
|
|
|
||
|
|
## 监控
|
||
|
|
|
||
|
|
### 运行监控脚本
|
||
|
|
```bash
|
||
|
|
./scripts/12-monitoring.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 查看 Dozzle 日志
|
||
|
|
访问:http://100.115.94.1:9999
|
||
|
|
|
||
|
|
## 备份
|
||
|
|
|
||
|
|
### 创建备份
|
||
|
|
```bash
|
||
|
|
./scripts/10-create-backup.sh
|
||
|
|
```
|
||
|
|
|
||
|
|
### 恢复备份
|
||
|
|
```bash
|
||
|
|
cd /root/.openclaw/workspace/backup
|
||
|
|
tar -xzf backup-YYYYMMDD-HHMMSS.tar.gz
|
||
|
|
```
|
||
|
|
|
||
|
|
## 故障排除
|
||
|
|
|
||
|
|
### Qdrant 无法启动
|
||
|
|
```bash
|
||
|
|
cd /opt/mem0-center
|
||
|
|
docker compose logs qdrant-master
|
||
|
|
```
|
||
|
|
|
||
|
|
### mem0 初始化失败
|
||
|
|
```bash
|
||
|
|
export OPENAI_API_KEY="your-api-key"
|
||
|
|
export OPENAI_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
|
||
|
|
python3 -c "from mem0 import Memory; print('OK')"
|
||
|
|
```
|
||
|
|
|
||
|
|
### Tailscale 断开
|
||
|
|
```bash
|
||
|
|
tailscale status
|
||
|
|
tailscale up --authkey=YOUR_AUTH_KEY
|
||
|
|
```
|
||
|
|
|
||
|
|
## 下一步:部署 Agent 节点
|
||
|
|
|
||
|
|
1. 在新节点安装 Tailscale
|
||
|
|
2. 使用相同 Auth Key 认证
|
||
|
|
3. 部署 Agent Docker Compose
|
||
|
|
4. 配置连接到中心 Qdrant (100.115.94.1)
|
||
|
|
|
||
|
|
## 联系支持
|
||
|
|
|
||
|
|
- Tailscale 管理:https://login.tailscale.com/admin
|
||
|
|
- mem0 文档:https://docs.mem0.ai
|
||
|
|
- Qdrant 文档:https://qdrant.tech/documentation
|