TeamCity 4.0 Help

Build Agent Configuration

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 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

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

Last modified: 20 April 2023