Skip to content

Basic Configuration ​

Before editing files, stop the service and back up the original. Preserve existing fields and JSON structure. See manual configuration for the procedure and common mistakes.

Dice!Next stores its configuration as JSON in the config/ directory; the first launch creates one file per area.

Almost everything can be changed in the web panel, so you rarely need to edit files by hand. The files created at first launch contain only a few keys; many keys only appear in the file after you set them in the panel (built-in defaults apply while they are missing).

Configuration Files ​

Each area is saved separately. Changes saved in the panel, and manual edits that pass hot-reload validation, are written back to the matching file:

FileContent
server.jsonWebUI/API listening address, database path and log level
webui.jsonWebUI login settings
adapters.jsonAdapter connections
dice.jsonDice behavior, masters, rules and AI settings
events.jsonFriend and group invitation handling and event policies
i18n.jsonDefault language and per-platform language preferences
backup.jsonManual and automatic backup settings
hot_reload.jsonHot reload of configuration and resources

The example below shows one file (what you actually get after startup is authoritative):

File: config/server.json (a field illustration; do not overwrite an existing file):

json
{
  "host": "0.0.0.0",
  "port": 18088,
  "api_key": "",
  "db_path": "./data/dice.db",
  "log_level": "info"
}

Main Settings ​

server ​

FieldDescriptionDefault
hostAddress the service listens on0.0.0.0
portWeb panel / API port. If it is in use at startup, the next free port is used and written back here18088
api_keyBackend API access key (generated on first launch; panel requests send it in the X-API-Key header)Automatic
db_pathMain database path (character sheets / logs / chat and others have their own db files)./data/dice.db
log_levelMinimum recorded level: trace/debug/info/success/warn/error. Affects new log entries immediately; old warning/critical values are still acceptedinfo

WebUI login password vs. api_key

The panel uses a WebUI login password. Clearing password in webui.json requires setup again; it does not allow anonymous access. Password login can trust a device for 30 days, provided both the browser cookie and the server’s config/webui_sessions.json remain available. server.api_key is a separate API credential: keep it secure and do not enter it as a panel login password. See password recovery.

dice ​

The main switches for dice behavior. Common keys (most can be changed visually in the panel's system settings):

FieldDescription
command_prefixesArray of command prefixes, default . 。 ! ! /
mastersList of dice masters ({platform, id}, multiple allowed)
summon_wordSummon word (empty = off)
whitelist_onlyAllowlist mode: only allowlisted groups get responses
silent_global / disabled_globalGlobal silence / list of globally disabled commands
disabled_jrrpDisable .jrrp globally
respond_selfWhether to respond to messages sent by the bot account itself (self-control, off by default)
console_start_hiddenHide the console and minimize to the tray at startup (default true)
api_enabled / api_whitelist / api_timeoutSwitch, domain allowlist and timeout for {api:URL} external requests in replies
image_sendHow images are sent (base64 or relayed through host)
message_formatOutgoing display style: traditional, standard or visual (advanced visual); the old value card is treated as standard. See Adapter Configuration
save_log_imagesWhether session logs save images in messages locally
logsite_url / logsite_formatLog site upload address (empty = official site) and protocol format
aliasesOld account permission links ({platform, alias, main}, maintained by the dice master with .admin account-alias; not the .alias shortcuts)
noticeDice master notification windows and event subscriptions (best managed on the Notifications page)
aiAll AI subsystem settings (models / polishing / translation / conversation / memory / tools…, best managed on the AI pages)
rules.default_dice_sidesDefault number of sides when .r has no argument
rules.coc_enabled and othersSwitches for each rule system and the COC critical success / fumble ranges

events ​

Event and approval policies (can be changed in the panel's permission / system settings):

FieldDescription
friend_policy / auto_approve_friend / friend_keywordFriend request approval policy / automatic approval / verification keyword
friend_welcomeWelcome message for new friends (empty = built-in text)
group_invite_policy / auto_approve_group / group_keywordGroup invitation approval policy
group_invite_reject_blacklist / group_invite_reject_nonfriendReject invitations from blacklisted groups / non-friends
poke_enabled / poke_commandPoke reply switch / map pokes to a command

i18n ​

FieldDescription
default_localeDefault reply language (zh-Hans / zh-Hant / en / ja)
platform_defaultsDefault language per platform
resource_dirLanguage pack directory (default i18n; a <language code>.json placed here is loaded automatically as a custom language)

log ​

FieldDescription
raw_eventsWhether to record raw adapter events in the log (for debugging)

hot_reload ​

FieldDescription
enabledWhen on, changes to files under config/ and data/ are detected and applied automatically
debounce_ms / watch_pathsDebounce interval and watched directories

adapters ​

Adapter settings are stored in config/adapters.json. What the Adapters page saves is authoritative; if you edit it by hand, keep the file valid JSON. For the fields, see Adapter Configuration.

Hot Reload and Restarts ​

With hot_reload.enabled on, manual changes to configuration files are detected and applied automatically; settings changed in the web panel are also saved and applied immediately.

Settings that need a restart

Changes to server.port / server.host only take effect after a restart. We recommend changing them on the panel's WebUI Settings page, which tells you this and offers a "Restart now" button.

Upgrade Notes ​

To upgrade, extract the new package over the old files completely. The config/ directory is not in the release package and won't be overwritten; see Installation.

Released under the AGPLv3 License