Configuration variables
Note: The content on this page pertains to Managed Game Server Hosting (Clanforge). If you’re using Game Server Hosting (Multiplay), refer to the Game Server Hosting (Multiplay) documentation.
Configuration variables are variables you define that Game Server Hosting uses to generate a server.json file for each server instance.
Game Server Hosting uses a set of built-in variables (listed below), but you can extend these variables with any custom data, such as a difficulty modifier or the game mode.
Note: If you need to load information before the configuration variables, consider using launch parameters instead.
Configuration variable | Description |
allocationUUID | The unique UUID of the allocation. |
serverID | The unique identifier of the server instance. |
queryType | The query protocol the server instance uses. |
queryPort | The port at which you can access the query protocol data. |
port | The port at which the specific server instance is accessible. |
serverLogDirectory | The file path to where the build stores logging information. It’s relative to the server ID folder. |
Here’s an example of what a server.json file might look like when populated with the configuration variables from a server instance:
{
“allocationUUID”: “434af841-586d-4403-939b-db19f77611a6”,
“serverID”: “12345”,
“queryType”: “sqp”,
“queryPort”: “9010”,
“port”: “9000”,
“serverLogDirectory”: “12345/logs/”
}
Example configuration variables
The following table has descriptions and example values for each built-in configuration variable.
Variable | Type | Description | Example |
allocated_uuid | uuid | The universally unique identifier for an allocation to the game server. | dd3eab96-1c6a-11ec-b4e5-93095e702b25 |
commandline | string | A string of the launch parameters passed to the game server or application on launch. | -config path/to/server.json |
ConfigPath | string | The path to the directory that has the configuration files for the game server. | 123456/cfg |
fleetid | uuid | The universally unique identifier for the parent fleet of the game server. | 5982cf5c-1c6b-11ec-b4e5-93095e702b25 |
GameExe | string | The name of the primary executable for the game server. | server-linux |
log_dir | string | The directory in which a game server should send log files. | logs |
port | integer | The network port on which the game server should bind for traffic. | 1234 |
profileid | string | The ID of the profile that's used to run a game server. | 1076327 |
query_port | integer | The network port on which the game server should bind for query protocol traffic. | 5678 |
query_type | string | The query protocol supported by the game server. | sqp |
regionid | uuid | The universally unique identifier for the region the game server is running in. | 7c123d14-1c6b-11ec-b4e5-93095e702b25 |
serverid | integer | The internal Game Server Hosting ID for this instance of the game server. | 123456 |