Setup
On first use, read setup.md, explain planned local storage in ~/home-server/, and ask for confirmation before creating files.
When to Use
User needs help designing, deploying, or operating a home server environment.
Agent handles architecture choices, secure exposure, service operations, backup strategy, and recovery planning.
Architecture
Memory lives in ~/home-server/. See memory-template.md for setup.
CODEBLOCK0
Quick Reference
| Topic | File |
|---|
| Setup behavior | INLINECODE4 |
| Memory structure |
memory-template.md |
| Service inventory model |
service-catalog.md |
| Operational routines |
operations-checklists.md |
| Incident response flow |
incident-playbook.md |
Core Rules
1. Define Trust Boundaries First
- - Classify every service as LAN-only, VPN-only, or internet-facing before deployment.
- Never expose admin panels or databases directly to the internet.
2. Design Around Recoverable Data
- - Identify where each service stores state before changing configs or images.
- Back up data paths first, then update workloads.
- Never request or store raw secrets, full
.env dumps, or private keys in workspace memory.
3. Prefer Stable, Reproducible Deployments
- - Use pinned image tags and declarative Compose files.
- Keep runtime variables documented so rebuilds are deterministic.
4. Secure the Host Before Scaling Services
- - Enforce key-based SSH, minimal open ports, and regular security updates.
- Apply least privilege for containers, users, and file permissions.
5. Operate with Observable Signals
- - Track health checks, disk usage, certificate expiry, and backup freshness.
- Treat silent failures as incidents and document root cause quickly.
6. Validate Recovery Paths Continuously
- - Test restore procedures on a schedule, not only after failures.
- Require rollback plans before major upgrades or topology changes.
Common Traps
- - Installing services before defining backup paths -> data loss during first migration.
- Publishing many ports directly on the router -> large attack surface and hard troubleshooting.
- Using
latest tags everywhere -> surprise upgrades and inconsistent behavior. - Skipping restore drills -> backups exist but cannot be trusted in real incidents.
- Running all workloads on one Docker network -> accidental lateral access between services.
Security & Privacy
Data that may leave your machine (only when configured):
- - DNS or dynamic DNS updates to your selected provider.
- Telemetry from optional monitoring stacks you install.
Data that stays local by default:
- - Service configs, logs, backup manifests, and incident notes in your home-server workspace.
This skill does NOT:
- - Open ports automatically.
- Deploy services without explicit user instruction.
- Send undeclared external requests.
Related Skills
Install with
clawhub install <slug> if user confirms:
- -
self-host — self-hosted service strategy and security baselines - INLINECODE13 — server deployment and troubleshooting patterns
- INLINECODE14 — container build and runtime discipline
- INLINECODE15 — multi-service orchestration patterns
- INLINECODE16 — host administration and system diagnostics
Feedback
- - If useful: INLINECODE17
- Stay updated: INLINECODE18
设置
首次使用时,请阅读 setup.md,说明计划存储在 ~/home-server/ 中的本地存储,并在创建文件前请求确认。
使用时机
用户需要帮助设计、部署或运维家庭服务器环境时。
助手负责处理架构选择、安全暴露、服务运维、备份策略和恢复规划。
架构
内存数据存储在 ~/home-server/ 中。参见 memory-template.md 了解设置方式。
text
~/home-server/
├── memory.md # 当前环境与偏好设置
├── services.md # 服务清单与归属
├── backup-status.md # 备份覆盖范围与恢复检查
└── incidents.md # 故障时间线与恢复记录
快速参考
memory-template.md |
| 服务清单模型 | service-catalog.md |
| 运维例行 | operations-checklists.md |
| 事件响应流程 | incident-playbook.md |
核心规则
1. 首先定义信任边界
- - 在部署前将每项服务分类为仅局域网、仅VPN或面向互联网。
- 切勿将管理面板或数据库直接暴露到互联网。
2. 围绕可恢复数据设计
- - 在更改配置或镜像前,确定每项服务的状态存储位置。
- 先备份数据路径,再更新工作负载。
- 切勿在工作区内存中请求或存储原始密钥、完整 .env 转储或私钥。
3. 优先采用稳定、可复现的部署
- - 使用固定镜像标签和声明式Compose文件。
- 记录运行时变量,确保重建具有确定性。
4. 在扩展服务前确保主机安全
- - 强制使用基于密钥的SSH、最小开放端口和定期安全更新。
- 对容器、用户和文件权限应用最小权限原则。
5. 通过可观测信号进行运维
- - 跟踪健康检查、磁盘使用率、证书过期时间和备份新鲜度。
- 将静默故障视为事件处理,并快速记录根本原因。
6. 持续验证恢复路径
- - 按计划测试恢复流程,而不仅限于故障后。
- 在重大升级或拓扑变更前要求制定回滚计划。
常见陷阱
- - 在定义备份路径前安装服务 → 首次迁移时数据丢失。
- 在路由器上直接开放大量端口 → 攻击面大且难以排查。
- 到处使用 latest 标签 → 意外升级和行为不一致。
- 跳过恢复演练 → 备份存在但在真实事件中不可信。
- 将所有工作负载运行在同一个Docker网络上 → 服务间意外横向访问。
安全与隐私
可能离开您机器的数据(仅在配置时):
- - 向您选择的提供商发送DNS或动态DNS更新。
- 来自您安装的可选监控堆栈的遥测数据。
默认保留在本地的数据:
- - 家庭服务器工作区中的服务配置、日志、备份清单和事件记录。
此技能不会:
- - 自动开放端口。
- 在没有明确用户指令的情况下部署服务。
- 发送未声明的外部请求。
相关技能
如果用户确认,使用 clawhub install
安装:
- - self-host — 自托管服务策略与安全基线
- server — 服务器部署与故障排查模式
- docker — 容器构建与运行时规范
- docker-compose — 多服务编排模式
- linux — 主机管理与系统诊断
反馈
- - 如有帮助:clawhub star home-server
- 保持更新:clawhub sync