进阶教程 较易 15分钟
安全与隐私最佳实践
保护你的数据和隐私安全
#Security
#Privacy
#Best Practices
准备工作
- OpenClaw deployed
- Understanding of security concepts
操作步骤
1
保护 API Key
API Key 是敏感信息,需要妥善保管。
命令 / 操作
All Systems
• 不要在代码中硬编码 API Key
• 使用环境变量存储
• 定期轮换 API Key
• 为不同用途创建不同的 Key 小提示
- • If API Key is leaked, regenerate immediately on provider website
- • Set API call limit
2
配置访问控制
限制谁能访问你的 OpenClaw。
命令 / 操作
All Systems
设置 → 安全 → 启用访问认证 → 设置强密码 → 配置 IP 白名单(可选) 小提示
- • Don't use default password
- • If public access, must enable authentication
3
数据备份
定期备份配置和记忆数据。
命令 / 操作
All Systems
设置 → 备份 → 导出配置 → 保存到安全位置 小提示
- • Recommend backing up weekly
- • Backup files contain sensitive info, store encrypted
4
隐私设置
控制对话数据的存储。
命令 / 操作
All Systems
设置 → 隐私 → 选择数据保留策略 → 配置敏感词过滤(可选) 小提示
- • Can set to not save certain types of conversations
- • Regularly clean unnecessary history
常见问题
忘记管理员密码?
可以通过命令行重置:`docker exec openclaw python reset_password.py`
如何完全删除数据?
删除 Docker 数据卷:`docker volume rm openclaw_data`(会丢失所有配置和记忆)