«

小智mqtt服务器搭建配置

熊猫老师 发布于 阅读:23


PUBLIC_IP=122.51.216.154
MQTT_PORT=1883
UDP_PORT=8884
API_PORT=8007
MQTT_SIGNATURE_KEY=Qx7A9dKpM2
SERVER_SECRET=ffa04144-b19e-4051-a782-6c17aeacd40f
m2 start ecosystem.config.js

added 85 packages, and audited 86 packages in 21s

16 packages are looking for funding
run npm fund for details

found 0 vulnerabilities
npm notice
npm notice New major version of npm available! 10.8.2 -> 11.7.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.7.0
npm notice To update run: npm install -g npm@11.7.0
npm notice
[PM2][WARN] Applications xz-mqtt not running, starting...
[PM2] App [xz-mqtt] launched (1 instances)
┌────┬────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├────┼────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ xz-mqtt │ default │ 1.0.0 │ fork │ 159200 │ 0s │ 0 │ online │ 0% │ 36.3mb │ yzk │ disabled │
└────┴────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
yzk@yzkserver:~/xiaozhi-mqtt-gateway$ pm2 logs xz-mqtt
[TAILING] Tailing last 15 lines for [xz-mqtt] process (change the value with --lines option)
/home/yzk/.pm2/logs/xz-mqtt-error.log last 15 lines:
0|xz-mqtt | 2025-12-15T08:14:26: MQTT 服务器正在监听端口 1883
0|xz-mqtt | 2025-12-15T08:14:26: UDP 服务器正在监听 122.51.216.154:8884

/home/yzk/.pm2/logs/xz-mqtt-out.log last 15 lines:
0|xz-mqtt | 2025-12-15T08:14:26: 配置已更新 /home/yzk/xiaozhi-mqtt-gateway/config/mqtt.json
0|xz-mqtt | 2025-12-15T08:14:26: 管理API服务启动在端口 8007
0|xz-mqtt | 2025-12-15T08:14:26: API今日临时密钥: Authorization: Bearer b4f183f3908b5ea92a10cf0ad8f0bb9fb7351463f51bc94ad5318d796880a718