Setup checklist
The order to set up a MineDuels network: database, Redis, secret, proxy, lobbies, duel servers.
Work through these steps in order. Steps 5 and 6 are the per-server settings; the full files are in Backend config and the list of files per server type is in Files per server.
1. Database
Create one MySQL or MariaDB database and a user for it. Every backend connects to it with storage.type: mysql.
2. Redis
Run Redis 6 or newer and require a password. Every backend and the proxy connect to the same Redis and the same database number.
3. Secret
Create one shared secret of at least 32 random bytes:
openssl rand -base64 48Put the same value in cross-server.secret on every backend and in secret= of the proxy. A short or placeholder secret keeps cross-server disabled.
4. Proxy
- Register every backend in
velocity.tomlunder[servers]. The key is the server's network name. - Copy
MineDuels-Velocityinto the proxyplugins/folder and start the proxy once to createplugins/mineduels/config.properties. - Fill in Redis, the secret and the proxy name. See Velocity plugin.
5. Lobby servers
On each lobby set in database.yml: MySQL, cross-server.enabled: true, a unique server-name, role: lobby, Redis and the secret. Then set the lobby spawn with /md setlobby. Keep the kits and the queue files identical across lobbies.
6. Duel servers
On each duel server set in database.yml: the same MySQL, enabled: true, a unique server-name, role: game, the same Redis and secret. Copy the same kits, save the arenas and check that the pool is ready. The arrival and hold settings are optional.
7. Start and check
- Start the proxy, then the lobbies, then the duel servers.
- The console of each backend prints
Cross-server enabled: <name> (<role>)andSubscribed to Redis channel mineduels. - On the proxy run
/mdproxy. Every backend appears with its role, its players, its free arenas for duel servers and the age of its last heartbeat. One lobby shows[matchmaker]. - Queue from a lobby with two accounts. Both are sent to a duel server, and return to a lobby after the match.
If a backend prints that cross-server stays disabled, the lines above it name the setting to fix. See Operations.