Skip to main content

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

boolean
default:false
Enable file-based logging. When enabled, logs will be written to files in the logs directory.
boolean
default:true
Enable console logging. Outputs log messages to the console/terminal.
string
default:"debug"
Set the log level for file output. Available levels: debug, info, warn, error.
string
default:"info"
Set the log level for console output. Available levels: debug, info, warn, error.

Packet Backend Settings

string
default:"auto"
Specify the packet backend to use. Set to auto for automatic selection, or specify a custom backend.
string
default:""
URL of the packet server. Leave empty to use default settings.

Advanced Options

number
default:0
O3 hook mode configuration. Controls how NapCat hooks into NTQQ’s message handling.
  • 0: Default mode
  • Other values: Advanced hook modes (use with caution)
boolean
default:true
Automatically synchronize time with the server. Helps prevent authentication issues due to clock drift.

Security Bypass Options

object
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