diff --git a/docs/en_US/guide/dashboard.md b/docs/en_US/guide/dashboard.md index 59c753a4..74e50264 100644 --- a/docs/en_US/guide/dashboard.md +++ b/docs/en_US/guide/dashboard.md @@ -6,12 +6,12 @@ To setup a Nezha monitorning Dashboard, you need these things: If you want to use CDN, please prepare two domains, one connect to CDN for public access, CDN needs to support WebSocket protocol; the other domain should not connect to CDN, use it as Agent to send data to Dashboard. This document uses "cdn.example.com" and "data.example.com" domains to demonstrate respectively ::: -3. A Github account +3. A Github or Gitlab account **This document will use the aaPanel as an example, with future versions of the changes, some of the features may change, this document is for reference only**

-## Get the Client ID and Client Secret on Github +## Get the Client ID and Client Secret on Github/Gitlab Nezha Monitor uses a Github account as the login account for the admin panel + First we need to create a new authentication application, after logging into Github, open https://github.com/settings/developers and select "OAuth Apps" - "New OAuth App " `Application name` - Fill in as you like @@ -20,7 +20,11 @@ Nezha Monitor uses a Github account as the login account for the admin panel + Click on "Registration Application" + Remember the Client ID in the page, then click "Generate a new client secret" to create a new Client Secret, the new secret will be displayed only once, please save it properly
-
+
++ If you're using Gitlab, you'll need to go to https://gitlab.com/-/profile/applications to create a new application ++ Fill in `Redirect URL` with the callback address ++ In `Scopes`, select `read_user` and `read_api` ++ Once created, save the Application ID and Secret ## Installing Dashboard on the server * In the panel server, run the installation script: ```bash @@ -28,10 +32,10 @@ curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install_en.s ``` * After waiting for the Docker installation to complete, input the following settings: -`OAuth2 provider` - Github +`OAuth2 provider` - Github or Gitlab `Client ID` - Previously saved Client ID `Client Secret` - Previously saved secret -`GitHub/Gitee login name` - Github username +`GitHub/Gitee login name` - Github o Gitlab username `Site title` - Custom site title `Site access port` - Public access port, customizable, default 8008 `RPC port` - The communication port between Agent and Dashboard, default 5555 diff --git a/docs/en_US/guide/settings.md b/docs/en_US/guide/settings.md index 32258de9..18cd9e95 100644 --- a/docs/en_US/guide/settings.md +++ b/docs/en_US/guide/settings.md @@ -3,7 +3,7 @@ You can customize your site title here
## Admin List -+ If you have changed your Github/Gitee username, you can change it in this item, otherwise you can't log in, please separate multiple users with commas: `user1,user2` ++ If you have changed your Github, Gitlab, Jihulab, Gitee username, you can change it in this item, otherwise you can't log in, please separate multiple users with commas: `user1,user2` + To change your administrator account, please go to `/opt/nezha/dashboard/data/config.yaml` to set the new administrator `Client ID` and `Client Secret`.
diff --git a/docs/guide/dashboard.md b/docs/guide/dashboard.md index 36a5a239..954f6dcf 100644 --- a/docs/guide/dashboard.md +++ b/docs/guide/dashboard.md @@ -7,15 +7,18 @@ 如果你想使用CDN,请准备两个域名,一个配置好CDN用作公开访问,CDN需要支持WebSocket协议;另一个域名不要使用CDN,用作Agent端与Dashboard的通信 本文档分别以 "cdn.example.com" 和 "data.example.com" 两个域名来演示 ::: -3. 一个Github/Gitee账号 +3. 一个Github账号(或:Gitlab、Jihulab、Gitee) +::: tip +如果您位于中国大陆,访问 Github 有困难,我们建议您选择 Jihulab 作为OAuth提供商 +::: **本文档将以宝塔面板反代面板的过程作为范例,随着未来版本的变化,部分功能的入口可能会发生改变,本文档仅供参考**

-## 获取Github的Client ID和密钥 +## 获取Github/Jihulab的Client ID和密钥 -哪吒监控接入Github和Gitee作为后台管理员账号 +哪吒监控接入Github、Gitlab、Jihulab、Gitee作为后台管理员账号 + 首先我们需要新建一个验证应用,以Github为例,登录Github后,打开 https://github.com/settings/developers ,依次选择“OAuth Apps” - “New OAuth App” `Application name` - 随意填写 `Homepage URL` - 填写面板的访问域名,如:"http://cdn.example.com" @@ -23,7 +26,11 @@ + 点击“Register application” + 保存页面中的Client ID,然后点击 “Generate a new client secret“,创建一个新的Client Secret,新建的密钥仅会显示一次,请妥善保存
-
+
++ JihuLab的应用创建入口为:https://jihulab.com/-/profile/applications ++ `Redirect URL` 中应填入回调地址 ++ 在下方`范围`中勾选 `read_user` 和 `read_api` ++ 创建完成后,保存好应用程序ID和密码 ## 在服务器中安装Dashboard @@ -37,10 +44,10 @@ curl -L https://jihulab.com/nezha/nezha/-/raw/master/script/install.sh -o nezha. ```` * 等待Docker安装完毕后,分别输入以下值: -`OAuth提供商` - Github或Gitee +`OAuth提供商` - Github,Gitlab,Jihulab,Gitee中选择一个 `Client ID` - 之前保存的Client ID `Client Secret` - 之前保存的密钥 -`用户名` - Github或Gitee的用户名 +`用户名` - OAuth提供商中的用户名 `站点标题` - 自定义站点标题 `访问端口` - 公开访问端口,可自定义,默认8008 `Agent的通信端口` - Agent与Dashboard的通信端口,默认5555 diff --git a/docs/guide/settings.md b/docs/guide/settings.md index 907f93e6..750fc00a 100644 --- a/docs/guide/settings.md +++ b/docs/guide/settings.md @@ -3,7 +3,7 @@
## 管理员列表 -+ 如果你修改了自己的Github/Gitee用户名,可以在此项中同步修改,否则无法登录,多个用户请用逗号隔开: `user1,user2` ++ 如果你修改了自己的Github, Gitlab, Jihulab或Gitee的用户名,可以在此项中同步修改,否则无法登录,多个用户请用逗号隔开: `user1,user2` + 如需更改管理员账户,请前往 `/opt/nezha/dashboard/data/config.yaml` ,重新设置新的管理员 `Client ID` 和 `Client Secret`