A2S Query protocol

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

A2S is a UDP-based game server query protocol that Valve Software keeps as a part of the Steam SDK. Many game engines support A2S natively, but if yours doesn’t, you can add support for A2S manually by using one of the A2S libraries for your preferred language (for example, go-a2s for Golang, QueryMaster for C#).

Visit the Valve Software wiki page for server queries to learn more about the technical details of the A2S protocol, including the protocol specification, response body format, and a list of implementations in various languages.

To integrate a manual A2S implementation with Game Server Hosting (Clanforge), you must configure at least the following variables:

It’s important to make sure the values reported for Players and Max Players in A2S_INFO responses are correct. Game Server Hosting uses these values to calculate and watch resource usages on the machine. If the values are inaccurate or in the wrong format, Game Server Hosting won’t be able to manage resources, which can cause errors, game server crashes, or sub-optimal performance. The recommended best practice is to include correct map type data, which enables Game Server Hosting to report crashes by map type.

> Note: A2S is a legacy protocol. Unity’s SQP protocol is newer and integrates more easily into the Unity ecosystem.