You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> - Please control usage frequency appropriately. Sending messages too frequently may be identified as abnormal behavior, increasing the risk of triggering risk control mechanisms.
6
+
> - This project is strictly prohibited from being used for any purpose that violates laws and regulations. If you intend to use AstrBot for illegal industries or activities, we **explicitly oppose and refuse** your use of this project.
7
+
> - AstrBot connects to the OneBot v11 protocol through the `aiocqhttp` adapter. OneBot v11 protocol is an open communication protocol and does not represent any specific software or service.
Refer to this article: [NapCat.Shell - Windows Manual Start Tutorial](https://napneko.github.io/guide/boot/Shell#napcat-shell-win%E6%89%8B%E5%8A%A8%E5%90%AF%E5%8A%A8%E6%95%99%E7%A8%8B)
Refer to this article: [NapCat.Installer - Linux One-Click Script (Supports Ubuntu 20+/Debian 10+/Centos9)](https://napneko.github.io/guide/boot/Shell#napcat-installer-linux%E4%B8%80%E9%94%AE%E4%BD%BF%E7%94%A8%E8%84%9A%E6%9C%AC-%E6%94%AF%E6%8C%81ubuntu-20-debian-10-centos9)
32
25
33
26
> [!TIP]
34
-
> **Napcat WebUI 在哪打开**:
35
-
> 在 napcat 的日志里会显示 WebUI 链接。
27
+
> **Where to open Napcat WebUI**:
28
+
> The WebUI link will be displayed in napcat's logs.
36
29
>
37
-
> 如果是 linux 命令行一键部署的napcat:`docker log <qq号>`。
30
+
> If napcat is deployed via Linux command line one-click deployment: `docker log <account>`.
38
31
>
39
-
> Docker部署的 NapCat:`docker logs napcat`。
32
+
> For Docker-deployed NapCat: `docker logs napcat`.
> If deploying with Docker Compose, no configuration is needed on the NapCat side. Just log in via NapCat WebUI (running on port 6099) or`docker logs napcat`, enable the aiocqhttp adapter on the AstrBot side to connect, and you can directly implement normal receiving and sending of `voice data` and `file data`.
> If deploying with Docker, you will not be able to properly receive `voice data` and `file data`. This means voice-to-text and sandbox file input functions will not be available. You can receive text messages, image messages, and other types of messages.
58
51
59
-
默认您安装了 Docker。
52
+
This tutorial assumes you have Docker installed.
60
53
61
-
在终端执行以下命令即可一键部署。
54
+
Execute the following command in the terminal for one-click deployment.
62
55
63
56
```bash
64
57
docker run -d \
@@ -72,70 +65,76 @@ docker run -d \
72
65
mlikiowa/napcat-docker:latest
73
66
```
74
67
75
-
执行成功后,需要查看日志以得到登录二维码和管理面板的 URL。
68
+
After successful execution, you need to check the logs to get the login QR code and the management panel URL.
76
69
77
70
```bash
78
71
docker logs napcat
79
72
```
80
73
81
-
请复制管理面板的 URL,然后在浏览器中打开备用。
74
+
Please copy the management panel URL and open it in your browser.
75
+
76
+
Then use the account you want to log in with to scan the QR code that appears.
77
+
78
+
If there are no issues during the login stage, deployment is successful.
82
79
83
-
然后使用你要登录的 QQ 扫描出现的二维码,即可登录。
80
+
## Connect to AstrBot
84
81
85
-
如果登录阶段没有出现问题,即成功部署。
82
+
## Configure aiocqhttp in AstrBot
86
83
87
-
## 连接到 AstrBot
84
+
1. Enter AstrBot's management panel
85
+
2. Click `Bots` in the left sidebar
86
+
3. Then in the interface on the right, click `+ Create Bot`
87
+
4. Select `OneBot v11`
88
88
89
-
## 在 AstrBot 配置 aiocqhttp
89
+
Fill in the configuration items that appear:
90
+
- ID(id): Fill in arbitrarily, only used to distinguish different messaging platform instances.
91
+
- Enable: Check this.
92
+
- Reverse WebSocket Host Address: Please fill in your machine's IP address, generally fill in `0.0.0.0` directly
93
+
- Reverse WebSocket Port: Fill in a port, default is `6199`.
94
+
- Reverse Websocket Token: Only needs to be filled when a token is configured in NapCat's network settings.
90
95
91
-
1. 进入 AstrBot 的管理面板
92
-
2. 点击左边栏 `机器人`
93
-
3. 然后在右边的界面中,点击 `+ 创建机器人`
94
-
4. 选择 `接入QQ个人号(OneBot v11)`
96
+
Example image: (At the fastest, just check Enable, then save)
- 反向 WebSocket 主机地址:请填写你的机器的 IP 地址。一般情况下请直接填写 `0.0.0.0`
103
-
- 反向 WebSocket 端口:填写一个端口,例如 `6199`。
101
+
Click `Save`.
104
102
105
-
点击 `保存`。
103
+
### Configure Administrator
106
104
107
-
### 配置管理员
105
+
After filling in, go to the `Configuration File` page, click the `Platform Configuration` tab, find `Administrator ID`, and fill in your account number (not the bot's account number).
> 1. If deploying with Docker and both AstrBot and NapCat containers are connected to the same network, use `ws://astrbot:6199/ws` (refer to the Docker script in this documentation).
123
+
> 2. Due to Docker network isolation, when not on the same network, please use the internal network IP address or public network IP address ***(unsafe)*** to connect, i.e., `ws://(internal/public IP):6199/ws`.
Go to AstrBot WebUI `Console`, if you see the blue log `aiocqhttp(OneBot v11) adapter connected.`, it means the connection is successful. If not, and after several seconds ` aiocqhttp adapter has been closed` appears, it indicates connection timeout (failed), please check if the configuration is correct.
At this point, your AstrBot and NapCat should be successfully connected! Use `private message` to send `/help`to the bot to check if the connection is successful.
0 commit comments