Skip to main content

Server Control

Server info, stats, and lifecycle actions.

ServerController​

  • Route prefix: api/server
  • Auth: [Authorize]. Command/save/shutdown/restart require admin.
MethodPathDescriptionRequestResponse
GET/infoServer identity, version, world, current day/time, registration status{ serverName, serverPort, maxPlayers, gameWorld, gameName, gameMode, difficulty, dayNightLength, bloodMoonFrequency, currentDay, currentTime, onlinePlayers, version, kitsuneCommandVersion, localIp, publicIp, serverVisibility, steamRegistered, eosRegistered, steamServerId }
GET/statsPerformance stats{ fps, entityCount, playerCount, uptime, gcMemory, workingSetMemory, peakWorkingSetMemory, threadCount, system }
POST/commandExecute console command (admin){ command }{ output }
POST/saveTrigger world save (admin){ message }
POST/shutdownGraceful shutdown with delay (admin){ delaySeconds }string
POST/restartRestart via systemctl or in-game shutdown (admin){ serviceName }string

Notes​

  • /command is the backing endpoint for the web Console view. Output streams via WebSocket, but the initial invocation is HTTP.
  • /shutdown broadcasts a warning to connected players, then exits cleanly after delaySeconds. If delaySeconds is 0, the warning is skipped.
  • /restart on Linux uses systemctl restart <serviceName>. On Windows, it triggers an in-game shutdown and expects an external supervisor to relaunch.