This guide connects nanobot to WeChat through the `weixin` channel. The channel uses HTTP long polling with QR-code login through the supported upstream API.
If you are already chatting in the WebUI, keep it open and continue below. It has already started the gateway. To reopen it later, use the same installation's `nanobot webui` command; there is no need to install nanobot again.
For terminal or server setup, use the manual configuration section below. Reuse the config/home and executable from your working instance. Docker users should use the [container commands](../deployment.md#docker-compose).
Open **Channels → WeChat (Weixin)**, install support if prompted, and follow the QR connection flow using your WeChat account. Enable the channel, save, and follow any restart prompt. New private senders receive a pairing code until approved.
In the WebUI, follow any restart prompt and keep the launcher running for the first test. You do not need to start another gateway. For unattended operation afterward, use [background or service mode](../cli-reference.md#gateway).
For manual config changes, restart the existing gateway through its owning terminal, `nanobot gateway restart` for background mode, or its service/container supervisor. If none is running, start `nanobot gateway` and leave it running. Run diagnostic CLI commands in a separate terminal using the same installation and config.
Send a private WeChat message to the bot. It should reply with a pairing code. Return to the WebUI pairing prompt and enter the code from your own private chat. Only a matching pending code is approved; do not enter another person's code. Then send your message again.
<details>
<summary>Terminal-only pairing</summary>
In a separate local terminal, using the same instance: