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 variableDescription
allocationUUIDThe unique UUID of the allocation.
serverIDThe unique identifier of the server instance.
queryTypeThe query protocol the server instance uses.
queryPortThe port at which you can access the query protocol data.
portThe port at which the specific server instance is accessible.
serverLogDirectoryThe 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.

VariableTypeDescriptionExample
allocated_uuiduuidThe universally unique identifier for an allocation to the game server.dd3eab96-1c6a-11ec-b4e5-93095e702b25
commandlinestringA string of the launch parameters passed to the game server or application on launch.-config path/to/server.json
ConfigPathstringThe path to the directory that has the configuration files for the game server.123456/cfg
fleetiduuidThe universally unique identifier for the parent fleet of the game server.5982cf5c-1c6b-11ec-b4e5-93095e702b25
GameExestringThe name of the primary executable for the game server.server-linux
log_dirstringThe directory in which a game server should send log files.logs
portintegerThe network port on which the game server should bind for traffic.1234
profileidstringThe ID of the profile that's used to run a game server.1076327
query_portintegerThe network port on which the game server should bind for query protocol traffic.5678
query_typestringThe query protocol supported by the game server.sqp
regioniduuidThe universally unique identifier for the region the game server is running in.7c123d14-1c6b-11ec-b4e5-93095e702b25
serveridintegerThe internal Game Server Hosting ID for this instance of the game server.123456