一行命令,部署完整 ThingsPanel IoT 平台
curl -fsSL https://install.thingspanel.io/install.sh | sh安装完成后访问:http://localhost:8080
如果需要离线安装,请先从 Release 下载 images.tar.part-*,然后把这些文件和 install.sh 放到同一个目录再执行安装。脚本会自动检测本地镜像分片并优先加载,不需要额外参数。
- 下载最新 ThingsPanel-Setup.exe
- 右键 → 以管理员身份运行
- 按向导完成安装
- 下载最新 ThingsPanel-x.x.x.pkg
- 双击安装
- 等待安装完成,访问 http://localhost:8080
| 服务 | 说明 | 端口 |
|---|---|---|
| frontend | ThingsPanel Vue 前端(镜像内置 nginx) | 内部 |
| backend | ThingsPanel Go 后端 API | 内部 |
| postgres | TimescaleDB 时序数据库 | 内部 |
| redis | 缓存 | 内部 |
| gmqtt | MQTT Broker | 内部 |
| modbus | Modbus 协议插件 | 502/503 |
| http-adapter | HTTP 协议适配器 | 内部 |
| thingsvis-server | ThingsVis 大屏服务端 | 内部 |
| thingsvis-studio | ThingsVis 大屏编辑器 | 内部 |
| gateway | Nginx 统一入口(镜像内置 nginx) | 8080 |
| 项目 | 最低 | 推荐 |
|---|---|---|
| 内存 | 2 GB | 4 GB |
| CPU | 2 核 | 4 核 |
| 磁盘 | 10 GB | 20 GB |
| Docker | 20.10+ | 最新版 |
| Docker Compose | v2.0+ | 最新版 |
# 查看所有服务状态(健康/不健康 一目了然)
docker compose -f /opt/thingspanel/docker-compose.yml ps
# 查看后端日志
docker compose -f /opt/thingspanel/docker-compose.yml logs -f backend
# 查看所有日志
docker compose -f /opt/thingspanel/docker-compose.yml logs --tail=100
# 重启某个服务
docker compose -f /opt/thingspanel/docker-compose.yml restart backend
# 停止所有服务
docker compose -f /opt/thingspanel/docker-compose.yml down
# 启动所有服务
docker compose -f /opt/thingspanel/docker-compose.yml up -d
# 删除所有服务、镜像、数据、网络
docker compose -f /opt/thingspanel/docker-compose.yml down --rmi all -v --remove-orphans
# Linux / macOS
/opt/thingspanel/upgrade.sh
# 指定版本
/opt/thingspanel/upgrade.sh v1.2.0
# Windows (管理员 PowerShell)
C:\ThingsPanel\upgrade.ps1# Linux / macOS(保留数据)
/opt/thingspanel/uninstall.sh
# 彻底删除(含数据库)
/opt/thingspanel/uninstall.sh --purge
# Windows (管理员 PowerShell)
C:\ThingsPanel\uninstall.ps1 -Purge安装后配置文件位于 /opt/thingspanel/.env(Windows:C:\ThingsPanel\.env)。
修改配置后执行以下命令使其生效:
docker compose -f /opt/thingspanel/docker-compose.yml up -d完整配置说明请参考 docs/configuration.md。
用户请求 :8080
│
▼
┌────────────────────────────────────┐
│ gateway (前端镜像内置 nginx) │
│ / → 静态文件 SPA │
│ /api/ → backend:9999 │
│ /mqtt → gmqtt:1883 (WS) │
│ /thingsvis/ → thingsvis-server │
│ /main/ → thingsvis-studio │
└────────────────────────────────────┘
│
▼
frontend(前端镜像,同一个 nginx)
│
▼
backend thingsvis
(Go API) (Server)
欢迎提 Issue 和 PR!本仓库专注于 All-in-One 打包和分发,功能性问题请到对应子项目提 Issue。