TeamCity 9.0 Help

Build Agent Configuration

Configuration settings of the build agent are stored in the <TeamCity Agent Home>/conf/buildagent.properties file. The file can also store properties that will be published on the server as Agent properties and can participate in the Agent Requirements expressions. All the system and environment properties 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:

## The address of the TeamCity server. The same as is used to open TeamCity web interface in the browser. serverUrl=http://localhost:8111/ ## The unique name of the agent used to identify this agent on the TeamCity server name=Default agent ## Container directory to create default checkout directories for the build configurations. workDir=../work ## Container directory for the temporary directories. ## Please note that the directory may be cleaned between the builds. tempDir=../temp ## Optional ## The IP address which will be used by TeamCity server to connect to the build agent. ## If not specified, it is detected by build agent automatically, ## but if the machine has several network interfaces, automatic detection may fail. #ownAddress= ## Optional ## A port that TeamCity server will use to connect to the agent. ## Please make sure that incoming connections for this port ## are allowed on the agent computer (e.g. not blocked by a firewall) ownPort=9090

If the "name" property is not specified, the server will generate a build agent name automatically. By default, this name will 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 (upon finishing a running build, if any) restarts automatically loading the new settings.

Last modified: 20 April 2023