Cardinal shards are configured using environment variables. This page documents all available configuration options, their default values, and usage examples.Documentation Index
Fetch the complete documentation index at: https://world.dev/llms.txt
Use this file to discover all available pages before exploring further.
Configuration Options
CARDINAL_ORG
Type:stringDefault:
"organization"Required: Yes The organization identifier for the shard. This is used to namespace your organization within the larger World Engine stack.
CARDINAL_PROJECT
Type:stringDefault:
"project"Required: Yes The project name within the organization. This is used to namespace your project within the organization.
CARDINAL_SHARD_ID
Type:stringDefault:
"service"Required: Yes A unique identifier for this shard. This is used to identify the shard within the project.
CARDINAL_TICK_RATE
Type:uint32Default:
1Required: Yes The tick rate determines how frequently the shard processes game state updates (in ticks per second). Higher values provide more responsive gameplay but consume more resources.
CARDINAL_MODE
Type:stringDefault:
"LEADER"Valid Values:
"LEADER", "FOLLOWER"
The shard mode determines the role of this shard:
- LEADER: Primary shard that processes game logic and state changes
- FOLLOWER: Secondary shard that follows the leader’s state (used for scaling and redundancy)
CARDINAL_LOG_LEVEL
Type:stringDefault:
"info"Valid Values:
"debug", "info", "warn", "error"
Controls the verbosity of log output:
- debug: Most verbose, includes all log messages
- info: General information about world operations
- warn: Warning messages and potential issues
- error: Only error messages
CARDINAL_PRIVATE_KEY
Type:stringDefault: None
Required: Yes The hex-encoded Ed25519 private key used for signing inter-shard commands. This key is critical for secure communication between world instances.