家庭实验室操作
- 作者仓库星标 0
- 作者仓库 skills-registry
- 领域
- 运维部署
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @tomevault-io · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- Docker
- 运行环境要求
- Docker
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Homelab — Platform Operations
You can manage the homelab platform through shell scripts and Docker commands.
## Repository Layout
The homelab repo lives at `~/homelab` on the Mac mini. Key paths:
| Path | Purpose |
| -------------------------- | ---------------------------------------------- |
| `scripts/platform-up` | Start all platform services (Caddy, Authentik…) |
| `scripts/app-up <app>` | Start a single app (e.g., `immich`) |
| `scripts/app-backup <app>` | Snapshot an app's volumes to backup dir |
| `scripts/app-update <app>` | Pull latest images and recreate an app |
| `scripts/dr-verify` | Verify disaster-recovery readiness |
| `platform/` | Platform service compose files |
| `apps/` | App compose files (immich, etc.) |
| `DESIGN.md` | Architecture reference |
| `docs/` | Operational procedures, runbooks, ADRs |
## Docker Compose Commands
All services use Docker Compose. Compose files live in their respective directories.
```bash
# List running containers
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
# Restart a specific service
cd ~/homelab/platform/caddy && docker compose restart
# View logs (last 50 lines, follow)
docker compose -f ~/homelab/apps/immich/compose.yml logs --tail 50 -f
# Pull latest images for an app
cd ~/homelab/apps/immich && docker compose pull && docker compose up -d
# Check resource usage
docker stats --no-stream --format "table {{.Name}}\t{{.CPUPerc}}\t{{.MemUsage}}"
```
## Platform Scripts
Always use the provided scripts when they exist — they handle ordering, health checks, and logging.
### Start the entire platform
```bash
~/homelab/scripts/platform-up
```
Starts services in dependency order: networking → Caddy → Authentik → Homepage → Dockge → Uptime Kuma.
### Backup an application
```bash
~/homelab/scripts/app-backup immich
```
Creates a timestamped snapshot of all named volumes for the app. Backups go to the configured backup directory.
### Update an application
```bash
~/homelab/scripts/app-update immich
```
Pulls latest images, recreates containers, verifies health.
### Verify disaster recovery
```bash
~/homelab/scripts/dr-verify
```
Checks backup freshness, volume integrity, and restore readiness.
## Service Quick Reference
| Service | Directory | Network | Key Ports |
| ------------ | ------------------------------- | ----------- | ------------- |
| Caddy | `platform/caddy` | caddy-net | 80, 443 |
| Authentik | `platform/authentik` | caddy-net | 9000, 9443 |
| PostgreSQL | `platform/authentik` (bundled) | authentik | 5432 |
| Redis | `platform/authentik` (bundled) | authentik | 6379 |
| Homepage | `platform/homepage` | caddy-net | 3000 |
| Dockge | `platform/dockge` | caddy-net | 5001 |
| Uptime Kuma | `platform/uptime-kuma` | caddy-net | 3001 |
| Immich | `apps/immich` | caddy-net + immich-internal | 2283 |
## Guidelines
- **Never run destructive commands** (`docker system prune`, `docker volume rm`) without explicit confirmation and a fresh backup.
- Prefer the platform scripts over raw `docker compose` commands — they handle dependency ordering.
- When updating, always check `docker ps` after to verify containers are healthy.
- The Caddy reverse proxy resolves `*.home` hostnames. If a service is unreachable, check Caddy first.
- All compose files use `restart: unless-stopped`. Manual `docker stop` persists across reboots.
---
> Source: [briancunningham6/homelab](https://github.com/briancunningham6/homelab) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-05-22 -->
章节与文件索引
按说明文件中的顺序排列。
存储库布局
Docker 撰写命令
平台脚本
启动整个平台
备份应用程序
文件/命令 -> ~/homelab · scripts/platform-up · scripts/app-up <app> · immich · scripts/app-backup <app> · scripts/app-update <app> · scripts/dr-verify · platform/
内容校验值 -> 98f975987eae
当前原文的自动摘译,尚未人工审校。
存储库布局
Homelab 存储库位于 Mac mini 上的
~/homelab。关键路径:路径 · 目的scripts/platform-up· 启动所有平台服务(Caddy、Authentik…)scripts/app-up <app>· 启动单个应用程序(例如,immich)scripts/app-backup <app>· 将应用程序的卷快照到备份目录Docker 撰写命令
所有服务都使用 Docker Compose。撰写文件位于各自的目录中。
平台脚本
始终使用提供的脚本(如果存在)——它们处理排序、运行状况检查和日志记录。
启动整个平台
按依赖顺序启动服务:networking → Caddy → Authentik → Homepage → Dockge → Uptime Kuma。
备份应用程序
为应用程序创建所有命名卷的带时间戳的快照。备份转到配置的备份目录。