From 5e2d707c3889a19a3c718288c31bbc68b919ab6d Mon Sep 17 00:00:00 2001 From: fscarmen2 Date: Sun, 3 Dec 2023 00:26:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=9D=9E=E5=AE=B9=E5=99=A8?= =?UTF-8?q?=E6=96=B9=E6=A1=88=EF=BC=9B=E5=A2=9E=E5=8A=A0=E9=80=9A=E8=BF=87?= =?UTF-8?q?=20Github=20=E8=A7=A6=E5=8F=91=E5=A4=87=E4=BB=BD=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8A=9F=E8=83=BD=E3=80=82=20(#47)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/case/case5.md | 156 ++++++++++++++++++++------------------- docs/en_US/case/case5.md | 148 +++++++++++++++++++------------------ 2 files changed, 160 insertions(+), 144 deletions(-) diff --git a/docs/case/case5.md b/docs/case/case5.md index 4eeb771f..0d340858 100644 --- a/docs/case/case5.md +++ b/docs/case/case5.md @@ -11,12 +11,14 @@ # 目录 - [项目特点](case5.md#项目特点) -- [Argo 认证的获取方式: json 或 token](case5.md#argo-认证的获取方式-json-或-token) - [准备需要用的变量](case5.md#准备需要用的变量) +- [Argo 认证的获取方式: json 或 token](case5.md#argo-认证的获取方式-json-或-token) - [PaaS 部署实例](case5.md#PaaS-部署实例) -- [VPS 部署实例](case5.md#VPS-部署实例) +- [VPS 部署方式 1 --- docker](case5.md#vps-部署方式-1-----docker) +- [VPS 部署方式 2 --- 宿主机](case5.md#vps-部署方式-2-----宿主机) - [客户端接入](case5.md#客户端接入) - [SSH 接入](case5.md#ssh-接入) +- [手动备份数据](case5.md#手动备份数据) - [自动还原备份](case5.md#自动还原备份) - [手动还原备份](case5.md#手动还原备份) - [完美搬家](case5.md#完美搬家) @@ -27,7 +29,7 @@ * * * ## 项目特点: -* 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 Nas 虚拟机 , Container PaaS 等 +* 适用范围更广 --- 只要能连通网络,就能安装哪吒服务端,如 LXC, OpenVZ VPS,Nas 虚拟机 , Container PaaS 等 * Argo 隧道突破需要公网入口的限制 --- 传统的哪吒需要有两个公网端口,一个用于面板的访问,另一个用于客户端上报数据,本项目借用 Cloudflare Argo 隧道,使用内网穿透的办法 * IPv4 / v6 具备更高的灵活性 --- 传统哪吒需要处理服务端和客户端的 IPv4/v6 兼容性问题,还需要通过 warp 等工具来解决不对应的情况。然而,本项目可以完全不需要考虑这些问题,可以任意对接,更加方便和简便 * 一条 Argo 隧道分流多个域名和协议 --- 建立一条内网穿透的 Argo 隧道,即可分流三个域名(hostname)和协议(protocal),分别用于面板的访问(http),客户端上报数据(tcp)和 ssh(可选) @@ -38,32 +40,7 @@ * 默认内置本机探针 --- 能很方便的监控自身服务器信息 * 数据更安全 --- Argo 隧道使用TLS加密通信,可以将应用程序流量安全地传输到 Cloudflare 网络,提高了应用程序的安全性和可靠性。此外,Argo Tunnel也可以防止IP泄露和DDoS攻击等网络威胁 -image - - -## Argo 认证的获取方式: json 或 token -Argo 隧道认证方式有 json 和 token,使用两个方式其中之一 - -### (方式 1 - Josn): -#### 通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc - -image - -#### 到 Cloudflare 官网,在相应的域名 `DNS` 记录里加上客户端上报数据(tcp)和 ssh(可选)的域名,打开橙色云启用 CDN - -image -image - -### (方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息 -#### 到 cf 官网:https://dash.cloudflare.com/ ,进入 zero trust 里生成 token 隧道和信息。 - -image -image -image -image -image -image -image +image ## 准备需要用的变量 @@ -88,6 +65,29 @@ Argo 隧道认证方式有 json 和 token,使用两个方式其中之一 image +## Argo 认证的获取方式: json 或 token +Argo 隧道认证方式有 json 和 token,使用两个方式其中之一。推荐前者,理由脚本会处理好所有的 Argo 隧道参数和路径,后者需要到 Cloudflare 官网手动设置,容易出错。 + +### (方式 1 - Json): +#### 通过 Cloudflare Json 生成网轻松获取 Argo 隧道 json 信息: https://fscarmen.cloudflare.now.cc + +image + +### (方式 2 - Token): 通过 Cloudflare 官网,手动生成 Argo 隧道 token 信息 +#### 到 cf 官网:https://dash.cloudflare.com/ +* 进入 zero trust 里生成 token 隧道和信息。 +* 其中数据路径 443/https 为 `proto.NezhaService` +* ssh 路径 22/ssh 为 < client id > + +image +image +image +image +image +image +image + + ## PaaS 部署实例 镜像 `fscarmen/argo-nezha:latest` , 支持 amd64 和 arm64 架构 @@ -97,30 +97,27 @@ Argo 隧道认证方式有 json 和 token,使用两个方式其中之一 | GH_USER | 是 | github 的用户名,用于面板管理授权 | | GH_CLIENTID | 是 | 在 github 上申请 | | GH_CLIENTSECRET| 是 | 在 github 上申请 | - | GH_BACKUP_USER | 否 | 在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致 | + | GH_BACKUP_USER | 否 | 在 github 上备份哪吒服务端数据库的 github 用户名,不填则与面板管理授权的账户 GH_USER 一致 | | GH_REPO | 否 | 在 github 上备份哪吒服务端数据库文件的 github 库 | | GH_EMAIL | 否 | github 的邮箱,用于备份的 git 推送到远程库 | | GH_PAT | 否 | github 的 PAT | | ARGO_AUTH | 是 | Json: 从 https://fscarmen.cloudflare.now.cc 获取的 Argo Json
Token: 从 Cloudflare 官网获取 | - | DATA_DOMAIN | 是 | 客户端与服务端的通信 argo 域名 | - | WEB_DOMAIN | 是 | 面板 argo 域名 | - | SSH_DOMAIN | 否 | ssh 用的 argo 域名 | - | SSH_PASSWORD | 否 | ssh 的密码,只有在设置 SSH_JSON 后才生效,默认值 password | + | ARGO_DOMAIN | 是 | Argo 域名 | Koyeb -[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&name=nezha&ports=80;http;/&env[GH_USER]=&env[GH_CLIENTID]=&env[GH_CLIENTSECRET]=&env[GH_REPO]=&env[GH_EMAIL]=&env[GH_PAT]=&env[ARGO_AUTH]=&env[DATA_DOMAIN]=&env[WEB_DOMAIN]=&env[SSH_DOMAIN]=&env[SSH_PASSWORD]=&image=docker.io/fscarmen/argo-nezha) +[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&name=nezha&ports=80;http;/&env[GH_USER]=&env[GH_CLIENTID]=&env[GH_CLIENTSECRET]=&env[GH_REPO]=&env[GH_EMAIL]=&env[GH_PAT]=&env[ARGO_AUTH]=&env[ARGO_DOMAIN]=&image=docker.io/fscarmen/argo-nezha) image image -image +image image image -## VPS 部署实例 -* 注意: ARGO_JSON= 后面需要有单引号,不能去掉 -* 如果 VPS 是 IPv6 only 的,请先安装 WARP IPv4 或者双栈: https://github.com/fscarmen/warp +## VPS 部署方式 1 --- docker +* 注意: ARGO_DOMAIN= 后面需要有单引号,不能去掉 +* 如果 VPS 是 IPv6 only 的,请先安装 WARP IPv4 或者双栈: https://gitlab.com/fscarmen/warp * 备份目录为当前路径的 dashboard 文件夹 ### docker 部署 @@ -128,6 +125,7 @@ Koyeb ``` docker run -dit \ --name nezha_dashboard \ + --pull always \ --restart always \ -e GH_USER=<填 github 用户名> \ -e GH_EMAIL=<填 github 邮箱> \ @@ -136,10 +134,8 @@ docker run -dit \ -e GH_CLIENTID=<填获取的> \ -e GH_CLIENTSECRET=<填获取的> \ -e ARGO_AUTH='<填获取的 Argo json 或者 token>' \ - -e WEB_DOMAIN=<填自定义的> \ - -e DATA_DOMAIN=<填自定义的> \ - -e SSH_DOMAIN=<填自定义的> \ - -e SSH_PASSWORD=<填自定义的> \ + -e ARGO_DOMAIN=<填自定义的> \ + -e GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> \ fscarmen/argo-nezha ``` @@ -149,6 +145,7 @@ version: '3.8' services: argo-nezha: image: fscarmen/argo-nezha + pull: always container_name: nezha_dashboard restart: always environment: @@ -159,33 +156,46 @@ services: - GH_CLIENTID=<填获取的> - GH_CLIENTSECRET=<填获取的> - ARGO_AUTH='<填获取的 Argo json 或者 token>' - - WEB_DOMAIN=<填自定义的> - - DATA_DOMAIN=<填自定义的> - - SSH_DOMAIN=<填自定义的> - - SSH_PASSWORD=<填自定义的> + - ARGO_DOMAIN=<填自定义的> + - GH_BACKUP_USER=<如与 GH_USER 一致,可以不要该环境变量> +``` + + +## VPS 部署方式 2 --- 宿主机 +``` +bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh) ``` ## 客户端接入 通过gRPC传输,无需额外配置。使用面板给到的安装方式,举例 ``` -curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent data.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls +curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh install_agent nezha.seales.nom.za 443 eAxO9IF519fKFODlW0 --tls ``` ## SSH 接入 * 以 macOS + WindTerm 为例,其他根据使用的 SSH 工具,结合官方官方说明文档: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh/#2-connect-as-a-user * 官方 cloudflared 下载: https://github.com/cloudflare/cloudflared/releases -* 以下输入命令举例 +* 以下输入命令举例: + SSH 用户名: root, 密码: ``` -/cloudflared access ssh --hostname ssh.seales.nom.za +/cloudflared access ssh --hostname nezha.seales.nom.za/ ``` -image -image +image +image image +## 手动备份数据 +方法一: 把 Github 备份库里的 `README.md` 文件内容改为 `backup` + +image + +方法二: ssh 进去后,容器版本运行 `/dashboard/backup.sh`; 非容器版本运行 `/opt/nezha/dashboard/backup.sh` + + ## 自动还原备份 * 把需要还原的文件名改到 github 备份库里的 `README.md`,定时服务会每分钟检测更新,并把上次同步的文件名记录在本地 `/dbfile` 处以与在线的文件内容作比对 @@ -212,28 +222,24 @@ tar czvf dashboard.tar.gz /dashboard ## 主体目录文件及说明 ``` -. -|-- dashboard -| |-- app # 哪吒面板主程序 -| |-- argo.json # Argo 隧道 json 文件,记录着使用隧道的信息 -| |-- argo.yml # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用 -| |-- backup.sh # 备份数据脚本 -| |-- data -| | |-- config.yaml # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息 -| | `-- sqlite.db # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息 -| |-- entrypoint.sh # 主脚本,容器运行后执行 -| |-- nezha.csr # SSL/TLS 证书签名请求 -| |-- nezha.key # SSL/TLS 证书的私钥信息 -| |-- nezha.pem # SSL/TLS 隐私增强邮件 -| `-- restore.sh # 还原备份脚本 -|-- usr -| `-- local -| `-- bin -| |-- cloudflared # Cloudflare Argo 隧道主程序 -| |-- grpcwebproxy # gRPC 反代主程序 -| `-- nezha-agent # 哪吒客户端,用于监控本地 localhost -|-- dbfile # 记录最新的还原或备份文件名 -`-- version # 记录当前的面板 app 版本 +/dashboard/ +|-- app # 哪吒面板主程序 +|-- argo.json # Argo 隧道 json 文件,记录着使用隧道的信息 +|-- argo.yml # Argo 隧道 yml 文件,用于在一同隧道下,根据不同域名来分流 web, gRPC 和 ssh 协议的作用 +|-- backup.sh # 备份数据脚本 +|-- restore.sh # 还原备份脚本 +|-- dbfile # 记录最新的还原或备份文件名 +|-- resource # 面板主题、语言和旗帜等资料的文件夹 +|-- data +| |-- config.yaml # 哪吒面板的配置,如 Github OAuth2 / gRPC 域名 / 端口 / 是否启用 TLS 等信息 +| `-- sqlite.db # SQLite 数据库文件,记录着面板设置的所有 severs 和 cron 等信息 +|-- entrypoint.sh # 主脚本,容器运行后执行 +|-- nezha.csr # SSL/TLS 证书签名请求 +|-- nezha.key # SSL/TLS 证书的私钥信息 +|-- nezha.pem # SSL/TLS 证书文件 +|-- cloudflared # Cloudflare Argo 隧道主程序 +|-- grpcwebproxy # gRPC 反代主程序 +`-- nezha-agent # 哪吒客户端,用于监控本地 localhost ``` @@ -242,12 +248,14 @@ tar czvf dashboard.tar.gz /dashboard * 哪吒官网: https://nezha.wiki/ , TG 群: https://t.me/nezhamonitoring * 共穷国际老中医: http://solitud.es/ * Akkia's Blog: https://blog.akkia.moe/ +* 胡桃's Blog: https://blog.萝莉.org/ * HiFeng's Blog: https://www.hicairo.com/ * 用 Cloudflare Tunnel 进行内网穿透: https://blog.outv.im/2021/cloudflared-tunnel/ * 如何给 GitHub Actions 添加自己的 Runner 主机: https://cloud.tencent.com/developer/article/1756690 * github self-hosted runner 添加与启动: https://blog.csdn.net/sinat_32188225/article/details/125978331 * 如何从Docker镜像中导出文件: https://www.pkslow.com/archives/extract-files-from-docker-image * grpcwebproxy: https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy +* Applexad 的哪吒官方改版的面板二进制文件: https://github.com/applexad/nezha-binary-build ## 免责声明: diff --git a/docs/en_US/case/case5.md b/docs/en_US/case/case5.md index 20b2981e..f61b0ac8 100644 --- a/docs/en_US/case/case5.md +++ b/docs/en_US/case/case5.md @@ -14,9 +14,11 @@ Mirror backup (not live update): [Argo-Nezha-Service-Container](https://github.c - [How to get Argo authentication: json or token](case5.md#How-to-get-Argo-authentication-json-or-token) - [Variables to be used](case5.md#prepare-variables-to-be-used) - [PaaS Deployment Example](case5.md#paas-deployment-example) -- [VPS Deployment Example](case5.md#vps-deployment-example) +- [VPS Deployment Method 1 --- docker](case5.md#vps-deployment-method-1-----docker) +- [VPS Deployment Method 2 --- hosts](case5.md#vps-deployment-method-2-----hosts) - [Client Access](case5.md#client-access) - [SSH Access](case5.md#ssh-access) +- [Manual Backup data](case5.md#manual-backup-data) - [Auto Restore Backup](case5.md#automatically-restore-backups) - [Manual Restore Backup](case5.md#manually-restore-the-backup) - [Migrating data](case5.md#migrating-data) @@ -27,7 +29,7 @@ Mirror backup (not live update): [Argo-Nezha-Service-Container](https://github.c * * * ## Project Features. -* Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as Nas Virtual Machine, Container PaaS, etc. +* Wider scope of application --- As long as there is a network connection, Nezha server can be installed, such as LXC, OpenVZ VPS, Nas Virtual Machine, Container PaaS, etc. * Argo tunnel breaks through the restriction of requiring a public network portal --- The traditional Nezha requires two public network ports, one for panel visiting and the other for client reporting, this project uses Cloudflare Argo tunnels and uses intranet tunneling. * IPv4 / v6 with higher flexibility --- The traditional Nezha needs to deal with IPv4/v6 compatibility between server and client, and also needs to resolve mismatches through tools such as warp. However, this project does not need to consider these issues at all, and can be docked arbitrarily, which is much more convenient and easy! * One Argo tunnel for multiple domains and protocols --- Create an intranet-penetrating Argo tunnel for three domains (hostname) and protocols, which can be used for panel access (http), client reporting (tcp) and ssh (optional). @@ -38,32 +40,7 @@ Mirror backup (not live update): [Argo-Nezha-Service-Container](https://github.c * Default built-in local probes --- can easily monitor their own server information * More secure data --- Argo Tunnel uses TLS encrypted communication to securely transmit application traffic to the Cloudflare network, improving application security and reliability. In addition, Argo Tunnel protects against network threats such as IP leaks and DDoS attacks. -image - - -## How to get Argo authentication: json or token -The Argo Tunnel authentication methods are json and token, use one of the two methods. - -### (Methods 1 - Josn): -#### Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc - -image - -#### Visit Cloudflare website, add the domain name of the client reporting data (tcp) and ssh (optional) in the `DNS` record of the corresponding domain, and turn on Orange Cloud to enable CDN. - -image -image - -### (Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website. -#### Go to the cf website: https://dash.cloudflare.com/ and go to zero trust to generate token tunnels and messages. - -image -image -image -image -image -image -image +image ## Prepare variables to be used @@ -88,6 +65,29 @@ Add `https://` to the beginning of the panel's domain name and `/oauth2/callback image +## How to get Argo authentication: json or token +Argo tunnel authentication methods include json and token, use one of the two methods. The former is recommended because the script will handle all the Argo tunnel parameters and paths, while the latter needs to be set manually on the Cloudflare website and is prone to errors. + +### (Methods 1 - Json): +#### Easily get Argo tunnel json information through Cloudflare Json Generation Network: https://fscarmen.cloudflare.now.cc + +image + +### (Methods 2 - Token): Manually generate Argo tunnel token information via Cloudflare website. +#### Go to the cf website: https://dash.cloudflare.com/ +* Go to zero trust and generate token tunnel and message. +* The data path 443/https is proto. +* ssh path 22/ssh for < client id >. + +image +image +image +image +image +image +image + + ## PaaS Deployment Example Image `fscarmen/argo-nezha:latest`, supports amd64 and arm64 architectures. @@ -102,24 +102,21 @@ Variables used | GH_EMAIL | No | github's mailbox for git push backups to remote repositories | | GH_PAT | No | github's PAT | | ARGO_AUTH | Yes | Argo Json from https://fscarmen.cloudflare.now.cc
Argo token from Cloudflare official website | - | DATA_DOMAIN | Yes | Client-server communication argo domain name | - | WEB_DOMAIN | Yes | Panel argo domain | - | SSH_DOMAIN | No | ssh for argo domain | - | SSH_PASSWORD | no | password for ssh, only works after setting SSH_JSON, default password | + | ARGO_DOMAIN | Yes | Argo domain | Koyeb -[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&name=nezha&ports=80;http;/&env[GH_USER]=&env[GH_CLIENTID]=&env[GH_CLIENTSECRET]=&env[GH_REPO]=&env[GH_EMAIL]=&env[GH_PAT]=&env[ARGO_AUTH]=&env[DATA_DOMAIN]=&env[WEB_DOMAIN]=&env[SSH_DOMAIN]=&env[SSH_PASSWORD]=&image=docker.io/fscarmen/argo-nezha) +[![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&name=nezha&ports=80;http;/&env[GH_USER]=&env[GH_CLIENTID]=&env[GH_CLIENTSECRET]=&env[GH_REPO]=&env[GH_EMAIL]=&env[GH_PAT]=&env[ARGO_AUTH]=&env[ARGO_DOMAIN]=&image=docker.io/fscarmen/argo-nezha) image image -image +image image image -## VPS Deployment Example -* Note: ARGO_JSON= must be followed by single quotes, which cannot be removed. +## VPS Deployment Method 1 --- docker +* Note: ARGO_DOMAIN= must be followed by single quotes, which cannot be removed. * If the VPS is IPv6 only, please install WARP IPv4 or dual-stack first: https://github.com/fscarmen/warp * The backup directory is the dashboard folder in the current path. @@ -128,6 +125,7 @@ Koyeb ``` docker run -dit \ --name nezha_dashboard \ + --pull always \ --restart always \ -e GH_USER= \ -e GH_EMAIL= \ @@ -136,10 +134,8 @@ docker run -dit \ -e GH_CLIENTID= \ -e GH_CLIENTSECRET= \ -e ARGO_AUTH='' \ - -e WEB_DOMAIN= \ - -e DATA_DOMAIN= \ - -e SSH_DOMAIN= \ - -e SSH_PASSWORD= \ + -e ARGO_DOMAIN= \ + -e GH_BACKUP_USER= \ fscarmen/argo-nezha ``` @@ -149,6 +145,7 @@ version: '3.8' services. argo-nezha. image: fscarmen/argo-nezha + --pull always container_name: nezha_dashboard restart: always environment: @@ -159,10 +156,14 @@ services. - GH_CLIENTID= - GH_CLIENTSECRET= - ARGO_AUTH='' - - WEB_DOMAIN= - - DATA_DOMAIN= - - SSH_DOMAIN= - - SSH_PASSWORD= + - ARGO_DOMAIN= + - GH_BACKUP_USER= +``` + + +## VPS Deployment Method 2 --- hosts +``` +bash <(wget -qO- https://raw.githubusercontent.com/fscarmen2/Argo-Nezha-Service-Container/main/dashboard.sh) ``` @@ -176,16 +177,25 @@ curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh - ## SSH access * Take macOS + WindTerm as an example, and other SSH tools depending on the one used, combined with the official documentation: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/use_cases/ssh /#2-connect-as-a-user * Official cloudflared download: https://github.com/cloudflare/cloudflared/releases -* The following are examples of input commands +* The following are examples of input commands. + SSH user: root, SSH password: ``` -/cloudflared access ssh --hostname ssh.seals.nom.za +/cloudflared access ssh --hostname ssh.seals.nom.za/ ``` -image -image +image +image image +## Manually backing up your data +Method 1: Change the contents of the `README.md` file in the Github backup repository to `backup` + +image + +Method 2: After ssh, run `/dashboard/backup.sh` for container version; `/opt/nezha/dashboard/backup.sh` for VPS host version. + + ## Automatically restore backups * Change the name of the file to be restored to `README.md` in the github backup repository, the timer service will check for updates every minute and record the last synchronized filename in the local `/dbfile` to compare with the online file content. @@ -213,28 +223,24 @@ tar czvf dashboard.tar.gz /dashboard ## Main catalog files and descriptions ``` -. -|-- dashboard -| |-- app # Nezha panel main program -| |-- argo.json # Argo tunnel json file, which records information about using the tunnel. -| |-- argo.yml # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains. -| |-- backup.sh # Backup data scripts -| |-- data -| | |-- config.yaml # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not. -| | `-- sqlite.db # SQLite database file that records all severs and cron settings for the panel. -| |-- entrypoint.sh # The main script, which is executed after the container is run. -| |-- nezha.csr # SSL/TLS certificate signing request -| |-- nezha.key # Private key information for SSL/TLS certificate. -| |-- nezha.pem # SSL/TLS Privacy Enhancement Email -| `-- restore.sh # Restore backup scripts -|-- usr -| `-- local -| `-- bin -| |-- cloudflared # Cloudflare Argo tunnel main program. -| |-- grpcwebproxy # gRPC reverse proxy main program. -| `-- nezha-agent # Nezha client, used to monitor the localhost. -|-- dbfile # Record the name of the latest restore or backup file -`-- version # Record the current panel app version +/dashboard/ +|-- app # Nezha panel main program +|-- argo.json # Argo tunnel json file, which records information about using the tunnel. +|-- argo.yml # Argo tunnel yml file, used for streaming web, gRPC and ssh protocols under a single tunnel with different domains. +|-- backup.sh # Backup data scripts +|-- restore.sh # Restore backup scripts +|-- dbfile # Record the name of the latest restore or backup file +|-- resource # Folders of information on panel themes, languages, flags, etc. +|-- data +| |-- config.yaml # Configuration for the Nezha panel, e.g. Github OAuth2 / gRPC domain / port / TLS enabled or not. +| `-- sqlite.db # SQLite database file that records all severs and cron settings for the panel. +|-- entrypoint.sh # The main script, which is executed after the container is run. +|-- nezha.csr # SSL/TLS certificate signing request +|-- nezha.key # Private key information for SSL/TLS certificate. +|-- nezha.pem # SSL/TLS certificate file. +|-- cloudflared # Cloudflare Argo tunnel main program. +|-- grpcwebproxy # gRPC reverse proxy main program. +`-- nezha-agent # Nezha client, used to monitor the localhost. ``` @@ -243,12 +249,14 @@ tar czvf dashboard.tar.gz /dashboard * Nezha website: https://nezha.wiki/ , TG Group: https://t.me/nezhamonitoring * Common Poverty International Old Chinese Medicine: http://solitud.es/ * Akkia's Blog: https://blog.akkia.moe/ +* Ayaka's Blog: https://blog.xn--pn1aul.org/ * HiFeng's Blog: https://www.hicairo.com/ * Intranet Penetration with Cloudflare Tunnel: https://blog.outv.im/2021/cloudflared-tunnel/ * How to add your own Runner host to GitHub Actions: https://cloud.tencent.com/developer/article/1756690 * github self-hosted runner addition and startup: https://blog.csdn.net/sinat_32188225/article/details/125978331 * How to export a file from a Docker image: https://www.pkslow.com/archives/extract-files-from-docker-image * grpcwebproxy: https://github.com/improbable-eng/grpc-web/tree/master/go/grpcwebproxy +* Applexad's binary of Nezha's officially dashboard: https://github.com/applexad/nezha-binary-build ## Disclaimer