Configuration variables

Note: The content on this page pertains to Game Server Hosting (Multiplay) available on the Unity Dashboard. If you’re using Game Server Hosting (Clanforge), see the Game Server Hosting (Clanforge) documentation.

Configuration variables are variables defined on build configurations that Game Server Hosting uses to generate a server.json file for each server. Each build configuration has a set of built-in variables, but you can create any number of custom configuration variables to track data that’s important to your build. You might want to track a difficulty modifier, the game mode, or the game map.

You can define configuration variables per build configuration. These custom configuration variables allow you to track data, such as a difficulty modifier, the game mode, or the game map.

Game Server Hosting uses your custom variables and the built-in variables to generate a server.json for each game server.

Note: Game Server Hosting loads configuration variables into the server.json file after the build executable starts. If you need to pass configuration to your server as it starts, consider using launch parameters instead.

Built-in Configuration variables

Each build configuration has the following built-in configuration variables:

Configuration variableDescription
allocatedIDThe unique ID of the allocation.
ipThe IP address of the server instance.
ipv6The IPv6 address of the server instance, if available.
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.
serverLogDirThe file path to where the build stores logging information. It’s relative to the server ID folder.