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-path—Polyglot .bin file
Tablebase--tablebase-path—Syzygy tablebase directory
Analysis depth--analysis-depth30Minimum plies for analysis engine
TT size--tt-size-mb64Transposition table memory in MB
Max retained jobs--analysis-max-jobs—Maximum number of completed analysis jobs kept
Max concurrent jobs--analysis-max-concurrent-jobs—Maximum number of analysis jobs run in parallel
Completed-job TTL--analysis-completed-ttl-secs—TTL for completed analysis jobs in seconds (e.g. 86400=24h)
Position threads--analysis-position-max-threads4Search threads one live position analysis may use
Position movetime--analysis-position-max-movetime-ms10000Longest time budget for one live position analysis (ms)
Max live analyses--analysis-max-concurrent-positions4Live position analyses allowed to run at the same time

The last three bound POST /api/analysis/position, where the caller picks the search parameters: a request above a ceiling is reduced to it, and a request arriving while every slot is busy is answered with 429 instead of being queued.

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.