Skip to content

Networks

Several servers can share one MySQL or MariaDB database. Each keeps its own players’ numbers apart under its own name, and they’re added up for the network: /leaderboard, placeholders, boards and the website count every server.

On each server:

server-name: "survival" # different on every server
storage:
type: mysql
mysql:
host: "db.example.com"
database: "stats"
username: "stats"
password: "..."
network:
enabled: true

Restart each server after changing storage.

  • Each server reads its own players. Minecraft counts stats per server, so a player’s kills on survival and on creative are two numbers, added up for the network. A placeholder stat, such as a balance, isn’t added up: it’s the latest value any server read.
  • Saves reach the others. After each save, the other servers hear about it through the database (every network.check-every seconds, 3 by default), and read the network’s numbers at their next save. /stats private reaches them within those few seconds.
  • One website for the whole network: turn it on on one server only, and point your domain at that one.
  • Per server on profiles. A player’s page on the website shows each server’s numbers too.

Without network.enabled, servers sharing a database each see only their own numbers.