Configuration File Guide
Explains Saba-chan's actual config files (settings.json, bot-config.json, instances.json, etc.) based on what the code itself reads.
Configuration File Guide
All of Saba-chan's settings and state live exclusively under the user folder %APPDATA%\saba-chan (= C:\Users\<your-name>\AppData\Roaming\saba-chan). This document summarizes which keys the actual code reads from the files inside it. We also distinguish between files you can safely edit by hand and files you should never touch.
1. Folder Structure
%APPDATA%\saba-chan\
├── settings.json ← Shared GUI / daemon settings
├── bot-config.json ← Discord bot settings (includes local / relay)
├── instances.json ← The list of server instances you've created
├── .ipc_token ← UUID v4 used to authenticate daemon ↔ clients
├── .node_token ← Cloud relay token (sbn_{hostId}.{secret})
├── extensionConfig.json ← Per-extension user settings
├── extensions_state.json ← Enabled/disabled state of each extension
├── modules/ ← Installed Python modules
├── extensions/ ← Installed extensions
├── runtime/
│ ├── python-standalone/ ← Portable Python + venv
│ └── node-portable/ ← Portable Node.js
├── logs/ ← Logs from the daemon, modules, and bot
└── updates/ ← Updater staging area
You can override the root itself with the SABA_DATA_DIR environment variable, but doing so hurts portability and is generally not recommended.
2. settings.json — Shared GUI / Daemon
When the daemon boots, if no SABA_IPC_PORT environment variable is set, it reads ipcPort from this file; if that's also missing, it falls back to the default 57474. The GUI side mostly reads polling-interval and theme-related keys.
| Key | Type | Default | Description |
|---|---|---|---|
ipcPort | number | 57474 | Daemon HTTP IPC port |
refreshInterval | number (ms) | 2000 | GUI status polling interval. Lowering it too far raises CPU usage |
consoleBufferSize | number | 10000 | Number of console lines per instance the daemon keeps in memory |
language | string | inferred from OS | GUI language (ko, en, ja, de, es, fr, pt-BR, ru, zh-CN, zh-TW) |
theme | string | "dark" | "dark" / "light" |
cloud.relayUrl | string | official relay URL | The server endpoint Saba-chan uses for pairing and relay traffic |
3. bot-config.json — Discord Bot
The Discord bot runs on the relay server, so there is no bot process on your PC. This file stores the prefix, aliases, and per-guild permissions you edit from the GUI; after pairing, Saba-chan automatically syncs them to the relay server as host metadata.
| Key | Type | Default | Description |
|---|---|---|---|
prefix | string | "사바쨩" | Chat command prefix. The bot only responds when this exact string is prepended (the prefix 사바쨩 literally means "Saba-chan") |
moduleAliases | object | {} | Module aliases. Example: { "마크": "minecraft" } |
commandAliases | object | {} | Command aliases. The default built-in commands are start, stop, status |
musicEnabled | boolean | true | Whether music commands are enabled (actual playback is handled by the music server) |
musicChannelId | string | "" | Text channel ID where music commands are allowed. Empty means all channels |
nodeSettings | object | {} | Per-guild (node) instance permissions (allowedInstances, etc.) |
The Discord bot token is not something users handle. The bot runs with a token managed by the relay-server operator.
Command Syntax
사바쨩 <command> <module_or_alias> [arguments…]
사바쨩 start minecraft사바쨩 stop mc(alias)사바쨩 status palworld
There are 3 default built-in commands: start, stop, status. Additional commands such as music are provided by bot modules on the relay-server side.
4. instances.json — Your Server List
Stores the metadata and settings for each server instance you've created in the GUI. Example structure:
{
"version": 2,
"instances": [
{
"id": "instance_1",
"name": "My Minecraft Server",
"module_name": "minecraft",
"installation_dir": "C:\\Servers\\Minecraft",
"settings": {
"port": 25565,
"gamemode": "survival",
"difficulty": "normal"
},
"ext_data": {
"docker_enabled": false
}
}
]
}
settingsdiffers per module. For example, Palworld additionally holds REST credentials such asrest_password, while Zomboid stores an extra RCON port.ext_datais reserved storage for extensions. The Docker extension stores itsdocker_enabledflag here; SteamCMD storesapp_id/beta/ etc.
You should only hand-edit this file while the daemon is not running. Editing it during execution will cause divergence between disk and the daemon's in-memory state.
5. Token Files (.ipc_token / .node_token)
| File | Format | When created | Primary consumers |
|---|---|---|---|
.ipc_token | UUID v4 (single line) | Auto-generated on the daemon's first boot | GUI / CLI / Discord bot / custom HTTP clients |
.node_token | sbn_{hostId}.{secret} (nanoid-based) | Issued once via atomic swap when cloud pairing completes | The Discord bot's relay agent |
IPC Token Usage Example
GET /api/servers HTTP/1.1
Host: 127.0.0.1:57474
X-Saba-Token: 550e8400-e29b-41d4-a716-446655440000
- If you lose the token, delete the file and restart the daemon. A new UUID is issued and all clients re-read it.
- During development you can disable verification with the
SABA_AUTH_DISABLED=1environment variable. Never use this in production.
Node Token Usage Example (HMAC signing)
Authorization: Bearer sbn_{hostId}.{secret}
X-Request-Timestamp: 1714002600
X-Request-Nonce: <random UUID>
X-Request-Signature: HMAC_SHA256(
METHOD + "\n" + URL_PATH + "\n" +
TIMESTAMP + "\n" + NONCE + "\n" +
BODY,
secret
)
The relay server requires every request to pass Argon2 hash verification, a ±30-second timestamp window, a nonce duplication check, and HMAC verification.
6. Extension Settings (extensionConfig.json / extensions_state.json)
extensions_state.json—enabled: true|falsestate for each extension.extensionConfig.json— The actual values for the keys each extension declares in itsconfig_fields(manifest.json). Example: Docker'sdocker_host, etc.
The GUI's "Extensions" screen edits these files; the daemon receives PUT /api/extensions/:id/config calls and updates the file atomically.
7. Key Environment Variables
| Variable | Target | Description |
|---|---|---|
SABA_IPC_PORT | Daemon | Overrides settings.json.ipcPort |
SABA_DATA_DIR | Daemon | Re-points the data root itself (advanced) |
SABA_AUTH_DISABLED | Daemon | If 1, IPC token verification is disabled (development only) |
DAEMON_API_URL | Module/extension subprocesses | Usually http://127.0.0.1:57474. Injected by the daemon into child processes |
PYTHONPATH | Module subprocesses | Concatenation of the modules/ and extensions/ paths, injected automatically |
SABA_ENABLED_EXTENSIONS | Module subprocesses | List of active extension IDs (;-separated) |
PYTHONIOENCODING | Module subprocesses | Always utf-8 |
PYTHONUNBUFFERED | Module subprocesses | 1 — flush stdout immediately |
If you suspect you've broken something, stop the daemon first, then delete the offending file and relaunch the GUI. Most files will be regenerated with their defaults. Instance directories (the folders where the actual game files live) are preserved until you delete them yourself.