https://github.com/cuihairu/cockpit
Personal Hybrid Infrastructure Console
https://github.com/cuihairu/cockpit
cmdb homelab nas openwrt pve server-management
Last synced: 28 days ago
JSON representation
Personal Hybrid Infrastructure Console
- Host: GitHub
- URL: https://github.com/cuihairu/cockpit
- Owner: cuihairu
- License: apache-2.0
- Created: 2026-05-04T00:38:02.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-24T00:04:19.000Z (30 days ago)
- Last Synced: 2026-05-24T00:08:05.269Z (30 days ago)
- Topics: cmdb, homelab, nas, openwrt, pve, server-management
- Language: Go
- Homepage: https://cuihairu.github.io/cockpit/
- Size: 55.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cockpit
> 个人混合基础设施控制台 —— Git-first 的 Homelab CMDB 与监控平台
[](https://github.com/cuihairu/cockpit/actions/workflows/go.yml)
[](https://github.com/cuihairu/cockpit/actions/workflows/docs.yml)
[](https://codecov.io/gh/cuihairu/cockpit)
[](https://go.dev/)
[](https://github.com/cuihairu/cockpit/releases)
[](https://github.com/cuihairu/cockpit/releases)
[](https://github.com/cuihairu/cockpit/releases)
[](https://github.com/cuihairu/cockpit/releases)
## 介绍
Cockpit 是一个针对个人混合基础设施的管理平台,提供:
- **统一资产视图**:物理机、PVE VM/LXC、Docker、域名、证书、CI/CD 等
- **跨地域监控**:支持异地机房、NAT 后设备的主动上报心跳
- **Git-first 配置**:所有配置存储在 Git,支持 diff/rollback
- **第三方集成**:同步到 Nezha、Homepage 等已有工具
## 架构
```
┌─────────────────────────────────────────────────────────────┐
│ Cockpit Server │
│ ┌─────────────────────────────────────────────────────┐ │
│ │ WebSocket Server (Agent 连接) │ │
│ │ Agent Registry (连接池管理) │ │
│ │ RPC Router (转发 API 调用) │ │
│ │ SQLite (配置 + 运行时状态) │ │
│ │ Web UI / API │ │
│ └─────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
↑ WebSocket (Agent 主动连接)
│
┌─────────────────────────────────────────────────────────────┐
│ 各地 Agent(物理机/VM/容器,跨地域/NAT 均可) │
└─────────────────────────────────────────────────────────────┘
```
## 快速开始
### 安装 Server
```bash
# 克隆仓库
git clone https://github.com/cuihairu/cockpit.git
cd cockpit
# 初始化配置
./cockpit init
# 启动 Server
./cockpit server start
```
### 部署 Agent
```bash
# 在目标机器上
./cockpit-agent start --server wss://your-server.com:8080
```
## 文档
完整文档请访问:[cuihairu.github.io/cockpit](https://cuihairu.github.io/cockpit/)
## 许可证
Apache License 2.0