GitHub项目 - 哪吒监控
开源、轻量、易用的服务器监控与运维工具
月付 85折 优惠码 spring85
年付 8折 优惠码 spring80
月付 85折 优惠码 wuyi85
年付 8折 优惠码 wuyi80
全场 8折 优惠码 MayDay80
月付 85折 优惠码 fb255185
年付 64折 优惠码 fb255180
集成 Vue 功能组件
VitePress 主题美化
传世经典著作
山医命相卜
流媒体账号合租
共享车位
zshrc、系统优化一键脚本
Clash/Loon/QX... 配置
搭建哪吒监控的 Dashboard,你需要:
提示
如果你想使用CDN,请准备两个域名:
一个配置好CDN,用作公开访问,CDN 需支持 WebSocket
协议;
另一个域名不使用CDN,用作 Agent
与 Dashboard
的通信。
本文档以 dashboard.example.com
和 data.example.com
为例。
curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh
curl -L https://gitee.com/naibahq/scripts/raw/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo CN=true ./nezha.sh
以 Docker 安装为例,安装完成后按提示输入以下信息:
请输入站点标题
: - 自定义站点标题。请输入暴露端口
: - 公开访问端口(默认 8008,可自定义)。请指定后台语言
: - 选择语言偏好。输入完成后,等待拉取 Docker 镜像。安装结束后,如果一切正常,你可以通过域名和端口号访问 Dashboard,例如:
http://dashboard.example.com:8008
如果需要再次运行安装脚本,可输入以下命令:
./nezha.sh
后台管理界面的路径为 /dashboard
,你只需访问: http://dashboard.example.com:8008/dashboard
首次登录的默认用户名和密码均为 admin
。
警告
默认密码为弱密码,对于高权限的面板来说,使用弱密码非常危险!
建议安装后立即进入管理页面:点击头像 → “个人信息” → “更新个人资料”修改密码。
建议密码长度至少 18 位,并混合大小写字母、数字及符号。
http://cdn.example.com
http://127.0.0.1:8008
然后点击“保存”location / {
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
proxy_set_header Origin https://$host;
proxy_set_header nz-realip $http_CF_Connecting_IP;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
add_header Strict-Transport-Security "max-age=31536000";
}
location ~ ^/(ws|terminal/.+|file/.+)$ {
proxy_pass http://127.0.0.1:8008;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $http_host;
}
现在,你应该可以直接使用域名,如:http://cdn.example.com 来访问面板了
哪吒监控支持在 Windows
、macOS
和 Linux
上一键安装 Agent
。遵循本文档的步骤,你可以轻松地在服务器上部署它。
在安装前,需要提前在管理面板中设置通信域名,该域名不建议接入 CDN。本文档以示例通信域名 data.example.com
为例。
data.example.com:8008
”。服务器
页面中,点击 安装命令
并选择对应操作系统,安装命令将自动复制到你的剪贴板。服务器
页面查看是否上线。