2026-09-04 13:19:15 +08:00
2026-09-04 00:37:21 +08:00
2026-09-04 13:19:15 +08:00
2026-08-11 13:02:14 +08:00
2026-09-04 00:37:21 +08:00

NodeFlare

NodeFlare 是一个自部署的服务器监控面板,支持 SQLite、PostgreSQL、实时状态、延迟检测、通知、主题、登录设备管理和带 TOTP 验证的远程命令执行。

安装服务端

安装脚本只下载 latest Release 中对应平台的完整包并校验 SHA-256,不会在服务器上编译源码。

支持 Linux x64/ARM64(glibc、musl)、Windows x64、macOS ARM64、FreeBSD 13+ x64/ARM64。Linux 检测到 glibc 2.28 或更高版本时优先使用 glibc 包,否则使用静态 musl 包;支持 systemd 和 OpenRC。

Linux 或 macOS:

curl -fsSL https://github.com/imengying/NodeFlare/releases/latest/download/install.sh | sudo sh

FreeBSD:

fetch -qo - https://github.com/imengying/NodeFlare/releases/latest/download/install.sh | sudo sh

Windows PowerShell(管理员):

Invoke-WebRequest https://github.com/imengying/NodeFlare/releases/latest/download/install.ps1 -OutFile "$env:TEMP\nodeflare-install.ps1"
Unblock-File "$env:TEMP\nodeflare-install.ps1"
& "$env:TEMP\nodeflare-install.ps1"

安装时输入管理员用户名、密码和数据库地址。数据库直接回车时使用 SQLite,也可填写 PostgreSQL:

postgres://用户:密码@127.0.0.1:5432/nodeflare?sslmode=prefer

安装完成后访问 http://服务器地址:8080/admin/login。默认只监听 127.0.0.1:8080,对外使用时请配置 HTTPS 反向代理,例如 Caddy:

monitor.example.com {
    reverse_proxy 127.0.0.1:8080
}

Linux systemd 常用命令:

systemctl status nodeflare
systemctl restart nodeflare
journalctl -u nodeflare -f

重新执行安装命令即可更新。Linux 和 macOS 卸载时默认保留配置和数据库:

curl -fsSL https://github.com/imengying/NodeFlare/releases/latest/download/install.sh | sudo sh -s -- --uninstall

同时删除配置和数据:

curl -fsSL https://github.com/imengying/NodeFlare/releases/latest/download/install.sh | sudo sh -s -- --uninstall --purge

FreeBSD:

fetch -qo - https://github.com/imengying/NodeFlare/releases/latest/download/install.sh | sudo sh -s -- --uninstall

彻底删除时在末尾添加 --purge。

Windows 使用 install.ps1 -Uninstall,彻底删除数据时再加 -Purge。

数据库与备份

管理后台的“数据库”页面可直接导出或恢复 ZIP,SQLite 和 PostgreSQL 都支持。

  • 备份包含设置、节点、监控历史、通知、主题、远程任务和安全配置。
  • 登录会话等临时数据不会导出;恢复完成后需要重新登录。
  • 建议使用相同版本的 NodeFlare 恢复备份。
  • pg_dump 和 SQLite .backup 仍可作为额外的数据库原生备份方式,但不是使用内置 ZIP 功能的前提。

切换 database_url 只会连接或初始化目标数据库,不会自动迁移原数据库的数据。需要迁移时使用后台 ZIP 导出和恢复。

安装 Agent

进入“服务器”,创建节点并复制页面生成的安装命令。Linux 命令格式如下:

curl -fsSL https://monitor.example.com/agent/agent.sh \
  | sudo sh -s -- -e 'https://monitor.example.com' -t 'Agent Token'

Agent 服务名为 nodeflare-agent:

systemctl status nodeflare-agent
curl -fsSL https://monitor.example.com/agent/agent.sh | sudo sh -s -- --uninstall

除本机调试外,Agent 只接受 HTTPS 服务地址。远程执行需要管理员登录和当前 TOTP 验证码,命令由系统级 Agent 服务运行。

支持的平台:

  • Linux x86_64 / ARM64(glibc 2.28+ 或静态 musl)
  • Windows x64
  • macOS ARM64
  • FreeBSD 13+ x64 / ARM64

默认目录

平台 程序 配置和服务端数据
Linux /opt/nodeflare /etc/nodeflare
Windows %ProgramFiles%\NodeFlare %ProgramData%\NodeFlare\Server
macOS /usr/local/libexec/nodeflare /Library/Application Support/NodeFlare/Server
FreeBSD /usr/local/libexec/nodeflare /var/db/nodeflare/server

默认 SQLite 文件位于对应数据目录下。首次初始化成功后,安装密码会自动从配置中清空。NodeFlare 不创建额外的系统用户。

从源码开发

git clone https://github.com/imengying/NodeFlare.git
cd NodeFlare
bun install --frozen-lockfile
cp backend/config.example.toml backend/config.toml
./dev.sh

测试与构建:

bun test --cwd frontend
cargo test --locked --manifest-path backend/Cargo.toml
cargo test --locked --manifest-path agent/Cargo.toml
bun run build

License

MIT

S
Description
NodeFlare 是一款轻量级的自托管服务器监控面板,通过 Web 界面查看服务器状态,并由轻量级 Agent 采集数据上报。
https://elysia62.github.io/NodeFlareWiki/demo
Readme MIT
2 MiB
0 Stars 1 Watchers 0 Forks
Languages
Rust 51.3%
TypeScript 30%
Shell 7.3%
CSS 5.7%
JavaScript 3.1%
Other 2.5%