Connect to Lagrange
TIP
- Please control message frequency responsibly. Sending messages too frequently may trigger risk control.
- This project must not be used for illegal purposes.
- For the latest deployment steps, always refer to the official Lagrange Docs.
Download
Download the latest Lagrange.OneBot from GitHub Releases.
- Windows:
Lagrange.OneBot_win-x64_xxxx - Linux x86_64:
Lagrange.OneBot_linux-x64_xxx - Linux ARM64:
Lagrange.OneBot_linux-arm64_xxx - macOS Apple Silicon:
Lagrange.OneBot_osx-arm64_xxx - macOS Intel:
Lagrange.OneBot_osx-x64_xxx
Deploy
Follow the official docs:
- Run guide: https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/Config/#运行
- Config file guide: https://lagrangedev.github.io/Lagrange.Doc/Lagrange.OneBot/Config/#配置文件
In your config file, add this under Implementations:
json
{
"Type": "ReverseWebSocket",
"Host": "127.0.0.1",
"Port": 6199,
"Suffix": "/ws",
"ReconnectInterval": 5000,
"HeartBeatInterval": 5000,
"AccessToken": ""
}Make sure Suffix is exactly /ws.
Connect to AstrBot
Configure aiocqhttp Adapter
- Open AstrBot Dashboard.
- Click
Botsin the left sidebar. - Click
+ Create Bot. - Select
aiocqhttp (OneBot v11).
Fill in:
- ID (
id): any unique identifier. - Enable (
enable): checked. - Reverse WebSocket host: your machine IP (usually
0.0.0.0). - Reverse WebSocket port: an available port, for example
6199.
