To use our allocation system, you must enable a method for us to dynamically specify the file within your server ID directory that contains the allocation UUID supplied by your matchmaker (such as a command-line argument). By default, this file is the server.json
file, but you can use any JSON formatted file as long as you tell us the name and path of the file.
The server.json
file is a file that exists within each server instance’s server ID directory relative to the game server binary. It contains static and dynamic information about the game server instance, such as the allocation UUID supplied by your matchmaker, the session authentication key, the connection IP address, and the connection port.
1{
2 "SessionId": "$$allocated_uuid$$",
3 "SessionAuth": "$$session_auth$$",
4 "ConnectionIP": "$$ip$$",
5 "ConnectionPort": "$$port$$"
6}
The allocation UUID variable will change with each session, so you’ll need to monitor it for changes. To detect changes within the server.json
file, you can set up an event trigger that detects files changes or a process to check the file for changes at a regular interval. We recommend that you use an event trigger because the interval check causes unnecessary resource usage.