View Source

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 [system and environment properties|Predefined Build Parameters#Agent-Specific Properties] defined in the file will be passed to every build run on the agent.

The file is a [Java properties|http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html#load(java.io.InputStream)] 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:
{code}
## 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
{code}
{note}Please make sure that the file is writable for the build agent process itself. For example the file is updated to store its authorization token that is generated on the server-side.
{note}

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.


\\
\\
{color:#003366}{*}See also:*{color}
{panel:borderStyle=dashed|bgColor=#FFFFFF}
*Concepts*: [Build Agent]
*Administrator's Guide*: [Predefined Build Parameters] \| [Configuring Agent Requirements] \| [Configuring Build Parameters]
{panel}