Skip to content

Server configuration

Overview

data/config/server.yaml is the master server config (bundled default resources/config/server.yaml, schema server.schema.json). It overrides the shared WorldConstants / PlayerConstants at startup and sets the game-loop and network parameters. It is not hot-reloaded — restart with make dev-restart-server.

Full default

world:
  worldMinY: 0
  worldMaxY: 256
  chunkSize: 16
  viewRadius: 3
  forwardViewRadius: 7
  waterLevel: 65
  impostorSkirtDepth: 12
  chunkKeepMargin: 2            # chunk radius kept in memory past the streaming radius
  chunkUnloadGraceSeconds: 120  # grace before an out-of-range chunk is unloaded
player:
  heightStanding: 1.8
  heightSneaking: 1.5
  heightCrawling: 0.6
  width: 0.6
  eyeOffsetStanding: 1.62
  eyeOffsetSneaking: 1.27
  eyeOffsetCrawling: 0.4
  speedStanding: 4.5
  speedSneaking: 1.3
  speedCrawling: 1.0
auth:
  provider: local              # local | oauth
  local:
    usersFile: data/config/auth/users.yaml
    groupsFile: data/config/auth/groups.yaml
    requirePassword: false
chunks:
  transport: websocket        # websocket | http
  httpWorkers: 4
network:
  messageEncoder: protobuf
game:
  tickMs: 50
  gravity: -20.0
  jumpSpeed: 8.5
  flyVerticalSpeed: 8.0
  saveIntervalSeconds: 30
  spawnX: 8.0
  spawnY: 200.0
  spawnZ: 8.0
  ticksPerDay: 72000
  timeBroadcastTicks: 20
  maxInteractionDistance: 14.0
  reconcileToleranceXz: 0.5
  reconcileToleranceY: 0.99
  blockBreakBufferSize: 1000
factions:
  enabled: false
  friendlyFire: false          # allow attacking same-faction members
  changeCooldownSeconds: 0     # delay before a player may re-affiliate
  spawnRingRadius: 384         # auto faction-spawn ring radius (blocks) around origin
  list: []                     # 1 to 5 faction definitions when enabled
  # list:
  #   - id: red
  #     name: "Scarlet Order"
  #     color: "#c0392b"
  #     description: "Defenders of the North."
  #     # spawnX: -300           # optional explicit spawn; must sit in a zone level < 5
  #     # spawnZ: 120

The factions: block is hot-reloaded by /reload (unlike the rest of this file): editing the list and reloading re-applies it, and players affiliated to a faction that no longer exists are un-affiliated. See Groups, guilds & factions.

Faction spawns. With no spawnX/spawnZ, each faction is auto-assigned a spawn spread evenly on a ring of spawnRingRadius around the world origin, pushed outward until it lands in a distinct Voronoi cell whose zone level is below 5 and whose biome grows no trees. A player is moved to their faction spawn on their first affiliation; later faction changes do not teleport, and a returning player always resumes at their last saved position. A new player with no faction spawns at the neutral point resolved the same way (nearest low-level, tree-free zone to game.spawnX/Z).

Chunk retention. The server keeps a chunk in memory only while a player is within forwardViewRadius + chunkKeepMargin chunks of it, plus chunkUnloadGraceSeconds after the last player leaves that range (so a quick reconnect finds the area still loaded). Idle chunks are flushed to disk and dropped; a returning player re-streams them from disk transparently. Worlds without persistence (E2E, dynamic MICRAFT_E2E worlds) never unload.

See Auth & RBAC for the auth: block, and Chunk transport for chunks.transport.