哪吒监控面板安装
作者仓库
https://github.com/naiba/nezha
准备工作
准备一个域名
注册一个github的账户
准备一条vps作为面板机器,并搭建好宝塔面板。
1、安装宝塔
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh
2解析域名
一个带套,用户之后访问,用于之后日常访问
一个不带套,用户小鸡和面板机的数据传输。
3 注册github
创建一个OAuth Apps,
打开:https://github.com/settings/developers
然后点击New OAuth App按钮,填入你带套的域名
https://你的域名
https://你的域名/oauth2/callback
输入完成后,能看到OAuth Apps的Client ID和Client secrets两个数值,(其中Client secrets需要自己创建一下)保存下来。
4、部署面板
国外机
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && ./nezha.sh
国内机
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && ./nezha.sh
选择1开始安装面板
所涉及到的数值,前面都有提到。
4.反代设置
宝塔面板无需手机登陆
echo "{\"uid\":1000,\"username\":\"admin\",\"serverid\":1}" > /www/server/panel/data/userInfo.json
进入服务器宝塔后台,创建一个站点,用你带套的那个域名。
然后网站设置,添加反向代理
location /
{
proxy_pass http://127.0.0.1:8008;
proxy_set_header Host $host;
}
location /ws
{
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 $host;
}
location /terminal
{
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 $host;
}
5.申请ssl
这个比较简单,直接在宝塔上完成就行。
6.被控机的安装
登陆面板机后台,添加一个主机,会生成秘钥,然后在被控机上输入代码(其实和安装主控的代码是一样的)
国外机
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && ./nezha.sh
国内机
curl -L https://raw.sevencdn.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && ./nezha.sh
选择8,然后第一个输入你刚才不带套的那个域名,端口默认,秘钥就是刚才添加主机时的那个秘钥。
7.TG机器人设置
先申请一个机器人 @Botfather ,然后/newbot ,创建新的机器人(bot)时,会提供的 token(在提示 Use this token to access the HTTP API:后面一行)这里 ‘bot’ 三个字母不可少;然后获取自己TG的数字Id, 和这个机器人 @userinfobot 对话可获得一串数字;这两个保存下来,一会备用。
进入面板机后台,报警——先添加通知方式,格式为
https://api.telegram.org/botXXXXXX/sendMessage?chat_id=YYYYYY&text=#NEZHA#
其中bot后面的XXX为机器人的token,chat_id为你自己TG的ID。
然后添加报警规则,常用的离线规则为
[{"Type":"offline","Duration":10}]
上面的语法为,被控机10秒内没有数据传至面板机,就视为离线,TG机器人就会通知你哪台机器离线,考虑到国内外机器的网络情况,这个数值太小,误报几率大,建议设置大一点,我设置的为300秒,相对准确,不会被骚扰。
[{"Type":"offline","Duration":300}]
设置后记得设为启动就行。
This message is used to verify that this feed (feedId:72183643688658944) belongs to me (userId:72183028814935040). Join me in enjoying the next generation information browser https://follow.is.
You neeed to take part in a contest for one of tthe besst blpgs on the internet.
I will recommend thi web site! https://w4i9o.mssg.me/
My programmer is trying to persuade mme to move to .net from PHP.
I have always disliked the idea because of the costs. But he’s
tryiong none the less. I’ve been using Movable-type on a number of websites for about a year and am
anxious about switching to another platform. I have heard great things about blogengine.net.
Is tere a way I can transfer all mmy wordpres posts into it?
Any kind of help would be really appreciated! https://Yv6bg.mssg.me/
I am really enjoying the theme/design oof your website.
Do you ever run into any browser compatibility issues?
A number of my blog audience have complained about my blog not working correctly in Exploresr but
looks great in Safari. Do yyou have any tips to help fix this issue? https://u7bm8.mssg.me/
I like the helpful info you provide in your articles.
I will bookmark your weblog and check again here regularly.
I am quite certain I will learn plenty of new stuff right here!
Good luck for the next! https://glassi-info.blogspot.com/2025/08/deposits-and-withdrawals-methods-in.html
My relatives always say that I am wasting my time heree at net, except I know I amm gettin know-how all the
time by reading thes good posts. https://bookofdead34.wordpress.com/
I am truly glad to read this weblog posts which carries plenty of helpful data, thanks for providing these kinds of information. https://www.Pakalljobz.com/companies/tonebet-casino/
Heya i aam for the first time here. I found this board
aand I tto ind It really helpful & it helped me out
much. I am hoping to give something back and help others
like you aided me. https://Ariaqa.com/employer/tonebet-casino/