Overview
The NapCat core configuration file (napcat.json) controls fundamental bot behavior including logging, time synchronization, and security bypass options.
Configuration File Location
The configuration file should be placed in your NapCat config directory:Configuration Schema
Logging Options
Enable file-based logging. When enabled, logs will be written to files in the logs directory.
Enable console logging. Outputs log messages to the console/terminal.
Set the log level for file output. Available levels:
debug, info, warn, error.Set the log level for console output. Available levels:
debug, info, warn, error.Packet Backend Settings
Specify the packet backend to use. Set to
auto for automatic selection, or specify a custom backend.URL of the packet server. Leave empty to use default settings.
Advanced Options
O3 hook mode configuration. Controls how NapCat hooks into NTQQ’s message handling.
0: Default mode- Other values: Advanced hook modes (use with caution)
Automatically synchronize time with the server. Helps prevent authentication issues due to clock drift.
Security Bypass Options
Configure which security checks to bypass. This is an advanced feature that should be used carefully.
Configuration Examples
Notes
- All configuration fields are optional and will use their default values if not specified
- The configuration is validated using JSON5 format, so you can include comments
- Changes to most settings require a restart of NapCat to take effect
- Debug log levels can generate large log files quickly; use them sparingly in production
