Examples and limits
Ready-to-copy cross-server layouts, and what the cross-server add-on can and cannot do.
Each example lists only what differs from the Backend config page. Names under [servers] in velocity.toml and cross-server.server-name must always match.
Example 1: one lobby, one duel server
The smallest network.
# velocity.toml
[servers]
lobby-1 = "10.0.0.10:25565"
game-1 = "10.0.0.11:25565"
try = ["lobby-1"]| Server | server-name | role | Needs |
|---|---|---|---|
| lobby | lobby-1 | lobby | kits, matchmaking.yml, lobby spawn |
| duel server | game-1 | game | the same kits, arenas |
Example 2: two lobbies and two duel servers
Players are spread over the lobbies. Matches go to the duel server with the most free arenas for the kit.
[servers]
lobby-1 = "10.0.0.10:25565"
lobby-2 = "10.0.0.12:25565"
game-1 = "10.0.0.11:25565"
game-2 = "10.0.0.13:25565"
try = ["lobby-1", "lobby-2"]- Keep
matchmaking.ymlandranks/identical on both lobbies. Any lobby can be elected to pair the queue. - Give both duel servers the kits and the arenas. A duel server that lacks the arenas of a kit is never chosen for it.
- Start order does not matter after the first start. A lobby that restarts is paired again within a few seconds.
Example 3: a duel server for only some kits
Give the duel server the arenas of the kits it should host and nothing else. The matchmaker only sends a kit to a server that reports free arenas for it.
game-1 : arenas for nodebuff, sumo
game-2 : arenas for bedwars, bridgeThe kit files themselves stay the same on every server.
Example 4: two proxies on one network
Several proxies can share the same Redis and the same database number. Each proxy needs its own proxy-name and its own list of the backends it reaches.
# proxy A
proxy-name=proxy-a
redis.host=redis.internal
redis.database=0
secret=paste the shared secret here# proxy B
proxy-name=proxy-b
redis.host=redis.internal
redis.database=0
secret=paste the shared secret here- Heartbeats go through Redis, so every backend and every proxy sees every other one.
- Every proxy receives a transfer and moves only the players connected to it. The target server must be listed in that proxy's
velocity.toml, otherwise the player goes to the least full lobby. %online%in the tab list and the scoreboard is the number of players on all backends, whichever proxy they came through.
Example 5: the network tab list
# tab.yml on every backend
network:
enabled: true
format: "<dark_gray>[<gray>%server%</gray>]</dark_gray> <white>%player%"
server-tags:
lobby-1: "Lobby"
lobby-2: "Lobby"
game-1: "Duel"
game-2: "Duel"Every backend lists the players of the other backends. See tab.yml for the keys. It needs the packetevents plugin on the backend.
Example 6: match found on a network
The lobby shows the found message and animation, waits 3 seconds and then sends the players to the duel server.
# matchmaking.yml on every lobby and duel server
queue:
match-found:
delay-seconds: 3
effects:
- {type: resistance, amplifier: 4, duration-seconds: 15, particles: false}# animations.yml on every lobby
match-found:
enabled: true
steps:
- { at: 0, type: title, title: "<gradient:#ffc371:#ff5f6d>Match found</gradient>", subtitle: "<gray>vs <white>%opponent%", fade-in: 0, stay: 50, fade-out: 10 }
- { at: 0, type: sound, sound: entity.experience_orb.pickup, volume: 1, pitch: 0.8 }Set delay-seconds: 0 to send players at once. See Match found.
What it can do
- One network queue for every lobby, with ranked and unranked queues, several queues at once and parties.
- Duels, party duels and spectating across servers.
- Several lobbies and several duel servers, spread by player count and free arenas.
- Players returning to a lobby after the match, with the queue buttons of the post-match items.
- One player count and one tab list for the network.
- Chat between servers (
global-chat) and party chat.
What it cannot do
- Share inventories, positions or player data between servers by itself. Profiles, stats and kit layouts are shared through the MySQL database. Everything else is per server.
- Run on SQLite. The network needs one MySQL or MariaDB database.
- Work without a Redis password or with a short secret. Cross-server stays off and logs why.
- Mix plugin versions. Servers on another message version ignore each other.
- Move a player on its own. The Velocity plugin must run on the proxy.
- Pick a duel server that does not have the kit and an arena for it.
Related pages: Setup checklist, Files per server, Operations.