Build Agent Configuration

Last modified: 20 April 2023

Configuration settings of the build agent are stored in a configuration file <TeamCity Agent Home>/conf/buildagent.properties. The file can also store properties that will be published on the server as Agent properties and can participate in the agent requirements expressions. Also, all the Predefined Build Parameters defined in the file will be passed to every build run on the agent.

The file is a Java properties file. A quick guide is:

  • use property_name=value<newline> syntax

  • use "#" in the first position of the line for a comment

  • use "/" instead of "\" as the path separator. If you need to include "\" escape it with another "\".

  • whitespaces within a line matter

This is an example of the file:

If "name" property is not specified, the server will generate build agent name automatically. By default, this name would be created from the build agent's host name.

The file can be edited while the agent is running: the agent detects the change and restarts loading the new changes automatically.

Configuring Agent Reboot Command



Agent reboot is performed by executing an OS-specific command. Under certain circumstances the command might need customization specific to the OS environment. If the agent reboot does not work by default, you can add teamcity.agent.reboot.command agent configuration parameter in Build Agent Configuration with the command to execute when reboot is required. Example configuration: