Skip to content

Configuration

CheckAI can be configured through CLI flags, environment variables, and request-level parameters.

Server Configuration

All server settings are passed as CLI flags to checkai serve:

SettingCLI FlagDefaultDescription
Port--port8080HTTP server port
Host--host0.0.0.0Bind address
Data directory--data-dirdataStorage for active/archived games
Opening book--book-pathPolyglot .bin file
Tablebase--tablebase-pathSyzygy tablebase directory
Analysis depth--analysis-depth30Minimum plies for analysis engine
TT size--tt-size-mb64Transposition table memory in MB
Max retained jobs--analysis-max-jobsMaximum number of completed analysis jobs kept
Max concurrent jobs--analysis-max-concurrent-jobsMaximum number of analysis jobs run in parallel
Completed-job TTL--analysis-completed-ttl-secsTTL for completed analysis jobs in seconds (e.g. 86400=24h)

Environment Variables

VariableDescription
CHECKAI_LANGOverride locale (e.g. de, fr, es)
RUST_LOGLog level (error, warn, info, debug, trace)
CHECKAI_PORTPort when using Docker Compose

Language / Locale

The locale is resolved in priority order:

  1. CLI flag: --lang de
  2. Environment variable: CHECKAI_LANG=de
  3. System locale: auto-detected via sys-locale
  4. Fallback: en

Per-Request Locale (API)

API responses can be localized per request:

bash
# Via query parameter
curl http://localhost:8080/api/games?lang=de

# Via Accept-Language header
curl -H "Accept-Language: de" http://localhost:8080/api/games

Data Directory Structure

bash
data/
├── active/     # Currently running games (binary format)
└── archive/    # Completed games (zstd-compressed)

Games are automatically moved from active/ to archive/ when they end (checkmate, draw, resignation). Archived games are compressed with zstd for efficient storage.

Analysis Configuration

The analysis engine settings control the depth and memory used for game analysis:

ParameterMinRecommendedDescription
analysis-depth3030–40Deeper = slower but more accurate
tt-size-mb164–256Larger = fewer transposition collisions

Performance Note

Analysis depth above 35 can take significantly longer per move. A depth of 30 is sufficient for most use cases and provides move classifications (Best through Blunder) with centipawn accuracy.

Released under the MIT License.