哪吒监控面板安装

作者仓库

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}]

设置后记得设为启动就行。

所有评论(63)

  1. fenghui说道:

    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.

  2. 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/

  3. 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/

  4. 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/

  5. 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

  6. 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/

  7. 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/

  8. 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/

  9. Ashly说道:

    are there casinos in saskatchewan united states, casino in montana usa and
    australian gambling law, or best no deposit casino codes
    (Ashly) online casino sites for real money canada

  10. free slots united states, best usa casino websites and how to bet on united statesn european roulette small Bets, or new zealandn eagle
    free slots

  11. Basil说道:

    free 11 enjoy online casino (Basil) cash no deposit
    usa, free spins or no deposit bonus and 500 poker chips united kingdom,
    or trusted uk casinos

  12. name In casinos说道:

    online gambling sites in the usa, united statesn casino online and online gambling south
    australia, or free slot games name In casinos canada

  13. united states gambling sites, online usa real money Cahuilla Casino Free Play and online poker real money usa 2021, or
    how to play united statesn poker

  14. no deposit bonus casino united states, cash online poker canada and best online Promo codes For casino Games canada no deposit bonus, or 100 slots bonus
    usa

  15. can i use td australia visa debit for online gambling, online cascades casino Langley Match
    no deposit bonus no download instant play united states and online pokies australia no deposit signup bonus,
    or top ten slots usa

  16. Cecilia说道:

    new zealandn no deposit bonus casinos, bouka spins no deposit bonus and
    no deposit slots usa, or real poker online australia

    my site – the roulette code (Cecilia)

  17. sportwetten bonus schweiz (https://Dev.debuhne.nl) anbieter bonus
    ohne einzahlung

  18. wettquoten england deutschland

    Stop by my homepage – Buchmacher Hamburg

  19. jungleedge.com说道:

    esport wetten deutschland

    Here is my blog post: kostenlose basketball wett tipps für heute [jungleedge.com]

  20. Deana说道:

    neue wettseiten

    Feel free to surf to my blog – sportwetten vorhersagen app (Deana)

  21. Deana说道:

    neue wettseiten

    Feel free to surf to my blog – sportwetten vorhersagen app (Deana)

  22. wetten vorhersagen app

    Here is my web-site :: sportwetten für heute (http://www.localhost-it.No)

  23. Shugakukai.Co.Jp说道:

    sportwetten bonus auszahlen

    my blog wetten ergebnisse vorhersage (Shugakukai.Co.Jp)

  24. Alejandra说道:

    beste wetter-app österreich

    my web page; live wetten bonus (Alejandra)

  25. paysafecard wettanbieter

    My web-site :: Wetten prognose Heute

  26. multi wette pferderennen

    Feel free to surf to my site: kombiwetten Booster

  27. sportwetten strategie immer gewinnen

    my homepage :: WettbüRo Frankfurt

  28. Barry说道:

    sportwetten steuern

    Feel free to surf to my website; live wetten bonus ohne einzahlung
    Barry

  29. beste neue wettanbieter

    Also visit my homepage – Kombiwette Mehrweg Rechner

  30. Aurora说道:

    spiel wette

    Feel free to visit my webpage … sportwetten österreich
    anbieter (Aurora)

  31. die besten wettanbieter in deutschland

    Feel free to surf to my blog post: wettbüRo Duisburg

  32. Cornell说道:

    online buchmacher

    Review my web blog :: bester sportwetten bonus (Cornell)

  33. handicap wetten erklärt

    Also visit my website :: wettanbieter beste quoten

  34. wett online说道:

    sportwetten quoten vergleich

    Here is my page – wett online

  35. esport wetten deutschland verboten

    Feel free to visit my webpage kombiwetten absichern (https://jpoxynew.Stagingapplications.com/)

  36. wetten quote erklärung

    Feel free to surf to my web page: Geld ZurüCk Online Sportwetten

  37. poradnia.eu说道:

    wetten quoten vergleich

    Feel free to surf to my site: buchmacher mütze [poradnia.eu]

  38. Ramonita说道:

    futsal live wetten

    my blog alle wettanbieter in deutschland – Ramonita,

  39. wie am besten wetten

    my blog post :: wettbüRo ludwigshafen – Blogerama.ff.uns.ac.Rs,

  40. wetten die man nicht gewinnen kann

    Feel free to visit my site – Sportwetten Lizenz

  41. sportwetten kombi tipps

    Here is my web site … wettbüro krefeld (gratis-wetten.com)

  42. Kristeen说道:

    sportwetten system strategie

    my blog post die besten wettanbieter online (Kristeen)

  43. web Page说道:

    I’m not sure where you are getting your info, but good topic.
    I needs to spend some time learning more or understanding more.
    Thanks for excellent info I was looking for this info for my mission.

    Feel free to visit my website; web Page

  44. verkaufte spiele wetten

    Here is my site :: sportwetten profi tipps (bellevuecanna.com)

  45. Alisha说道:

    Hey! I know this is kind of off-topic but I needed to ask.
    Does running a well-established blog such as yours take a lot of
    work? I’m completely new to running a blog however
    I do write in my journal daily. I’d like to start a blog
    so I can easily share my personal experience and thoughts online.
    Please let me know if you have any suggestions or tips bank account for gamblers – Alisha – brand new aspiring bloggers.
    Thankyou!

  46. Percy说道:

    quoten wetten strategie doppelte chance (Percy)

  47. Alice说道:

    wettquote bundestagswahl

    Also visit my web-site – handicap wette beispiel (Alice)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注