Learn about the server.json file that contains critical configuration data for your servers.
Read time 2 minutesLast updated 12 days ago
Warning
We are winding down our direct support for the Unity Multiplay Game Server Hosting Service. Unity will support the Multiplay Game Server Hosting Service through March 31, 2026. To ensure continuity for live titles, we are licensing our Multiplay Game Server Hosting software to Rocket Science Group. Learn more about them here.
The
server.json
file is a file that has variable data, such as the current allocation ID, for each server. It’s automatically generated and populated for each server based on the configuration variables and the server data. It has all the built-in configuration variables and any custom values from your build configuration variables.The
server.json
file exists within each server’s server ID directory. By default, it has all the built-in configuration variables, such as the allocation ID supplied by your matchmaker, and the connection port. But you can also add any number of configuration variables to track in the build configuration settings.Here’s an example of what a
server.json
file might look like when populated with the configuration variables from a server:
for changes. To detect changes, set up an event trigger that detects file changes or a process to check the file for changes at a regular interval.
Note
The recommended best practice is to use the API to subscribe to game server lifecycle events (Unity Services Web API Docs), rather than monitoring for changes because the interval check causes unnecessary resource usage.
File location
The
server.json
file is available on disk in the following location: