The teamcity documentation is really good. See the Installing Agents section .
You can have the build agent on the same computer as the server, or install the agents on other machines. I would use a different machine for the agent if you have multiple agents or a really heavy agent workload.
On the machine, you want to install the agent to open a web browser and point it to the team’s website. Go to the agents tab. There should be a link in the upper right corner called "install build agents". Click it and select the appropriate installation method.
source
share