When you need it
#A single server (network.mode: STANDALONE, the default) opens no network connections at all, and the defaults are tuned for about 500 players on it. For more players, split the work:
- LOBBY servers hold players, menus and NPCs. They build no arenas; they send players to game servers.
- GAME servers keep arenas ready in their pool, run the matches and send players back to the emptiest lobby when a match ends.
Each lobby and game server needs PillarForge and its own license slot. The proxy does not run PillarForge.
Requirements
#- MySQL 8+ or MariaDB 10.6+, shared by every server. Network mode does not work with SQLite.
- A messaging backend: Redis 5.0+ (recommended, single node; Redis Cluster is not supported), or the SQL database, or plugin messaging for small networks.
- Velocity or BungeeCord, or no proxy with the vanilla transfer packet (clients 1.20.5+).
- Server clocks in sync (NTP). Messages are rejected when two servers differ by more than
network.heartbeat.max-clock-skew-ms(5000).
Step by step
#- Database. On every server set the same database:
storage:
type: MARIADB
host: "10.0.0.5"
port: 3306
database: "pillarforge"
username: "pillarforge"
password: "change-me"
table-prefix: "ap_"
- Mode and server id. Give every server its role and a unique id. Using the same name as in the proxy is easiest.
network:
mode: LOBBY # GAME on game servers
server-id: "lobby-1"
- Secret. Run
/pf network secretin the console of one server and copy the result tonetwork.secreton every server. It must be at least 32 characters and the same everywhere; messages between servers and the transfer cookies are signed with it. With an empty or short secret the server falls back toSTANDALONE. - Messaging. Keep
network.messaging.backend: REDISand fill innetwork.messaging.redis(host, port, password). Without Redis useSQL. - Lobbies on game servers. On every GAME server list the lobbies players return to:
network:
lobby-servers: ["lobby-1", "lobby-2"]
- Proxy. With Velocity, enable the BungeeCord channel in
velocity.toml:
[advanced]
bungee-plugin-message-channel = true
- Restart every server, then run
/pf network statuson each one. It shows the mode, the server id, the lease, the bus health and the servers it can see.
If you already have player data in SQLite, move it once with /pf storage import-sqlite before going live (the target tables must be empty).
Network settings
#Changes to mode, server-id, namespace and messaging.backend need a restart. secret and secret-previous apply with /pf reload.
| Key | Default | Description |
|---|---|---|
network.mode | STANDALONE | STANDALONE, LOBBY or GAME. |
network.server-id | "" | Unique id: lower-case letters, digits, - and _, at most 32. Also required on a single server that uses MySQL/MariaDB. |
network.display-name | "" | Name shown in menus. Empty uses the server id. |
network.secret | "" | Shared signing key, at least 32 characters. |
network.secret-previous | "" | The old key while you rotate keys. |
network.namespace | "pillarforge" | Separates networks that share one Redis. It does not separate database tables; use storage.table-prefix for that. |
network.transfer.method | AUTO | AUTO, VELOCITY, BUNGEECORD or TRANSFER_PACKET. |
network.transfer.public-address | "" | TRANSFER_PACKET only: the host:port players use to reach this server. |
network.servers.<id>.proxy-name | "" | The server's name in the proxy, if it differs from its id. |
network.messaging.backend | REDIS | REDIS, SQL or PLUGIN_MESSAGING. |
network.messaging.redis.host / port | "127.0.0.1" / 6379 | Redis address. ssl: true for managed Redis. |
network.lobby.soft-cap / hard-cap | 300 / 400 | Players a lobby aims for, and the most it accepts from returning matches. |
network.game.no-intent-policy | LOBBY | A player who arrives on a game server without a seat: LOBBY, QUICK_JOIN, ALLOW or KICK. |
network.game.return-on-end | true | Send players back to a lobby when a match ends. |
network.game.soft-cap / hard-cap | 200 / 260 | Capacity a game server announces. |
network.game.stop-accepting-mspt | 45 | Above this average tick time the game server stops accepting new players; running matches are not affected. |
Restarting a server
#Run /pf network drain on before a restart. The server stops accepting new players and the running matches finish. With BungeeCord or Waterfall, players drop off the network when the server stops, so also install a fallback plugin on the proxy.
Rotating the secret
#- Put the new key in
secret-previouson every server and run/pf reload. Servers now accept both keys. - Swap them: the new key goes into
secret, the old one intosecret-previous, then/pf reloadeverywhere. - When every server signs with the new key, empty
secret-previousand/pf reloadagain.
Good to know
#- A server started with a
server-idthat another running server already uses does not accept players. Change the id after copying a server folder. - After a crash, joins are held with "Server is getting ready" for at most
storage.session.lease-seconds(30). - A player's profile is owned by one server at a time and saved before it moves; coins, XP and stats are written as changes, so a takeover never loses progress.
- Parties live on one server.
pillarforge.network.bypasslets staff stay on a game server without a seat reservation.
Found a mistake or something missing? Open a ticket on Discord.
Report an issue