Overview
The OneBot configuration file (onebot.json) manages OneBot 11 protocol settings, including network adapters, message formatting, and additional features like music signing and file URL conversion.
Configuration File Location
Configuration Schema
Network Configuration
Network adapter configuration. Contains arrays of different adapter types (HTTP servers, WebSocket servers, clients, etc.).See the Network Adapters page for detailed configuration of each adapter type.
Message Format Settings
Format for posting messages. Available in each network adapter configuration.
array: Message segments as an array of objects (CQ code format)string: Message as a plain string
Whether to report messages sent by the bot itself. Available in most network adapters.
Music Signing
URL for music card signing service. Required for sending music cards (QQ music, NetEase music, etc.).Example:
https://your-signing-service.com/signFile and Media Options
Convert local file paths to URLs automatically. Useful when your bot needs to serve files over HTTP.
HTTP proxy for downloading images. Format:
http://proxy-host:portUseful in restricted network environments or to avoid rate limiting.Message Parsing
Parse forwarded/merged messages (multi-message nodes) into individual messages.When enabled, composite messages will be expanded into their constituent parts.
Configuration Examples
Network Adapter Types
Thenetwork object contains arrays for different adapter types:
- httpServers: HTTP server adapters (receive requests)
- httpSseServers: HTTP SSE server adapters (server-sent events)
- websocketServers: WebSocket server adapters (bidirectional)
- httpClients: HTTP client adapters (reverse connections, POST events)
- websocketClients: WebSocket client adapters (reverse connections)
- plugins: Plugin adapters for custom integrations
Notes
- You can enable multiple network adapters simultaneously
- Each network adapter must have a unique
namefield - Token authentication is optional but strongly recommended for production use
- The configuration file is validated and merged with default values on startup
- Message format affects how your application receives and parses messages
