How to change the build working directory location on a remote agent

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Purpose

Change the build working directory location on a remote agent.

This can be useful when we have a different partition or disk drive to store your data.

It is also an option to reduce the path used for your builds (to deal with Windows 260 character limits).

Solution

  1. Stop your agent

  2. Edit the <Agent_Home>/bamboo-agent.cfg.xml file changing the value set for the property buildWorkingDirectory to the new location

  3. Remove the content from your old build-dir location (do not move it, we want the agent to recreate the build data).

    In case you have the repository cache configured to be saved on the agent side this renewal will cause the first build of your plans to be slow until the new cache is built.

  4. Start your agent

Updated on April 14, 2025

Still need help?

The Atlassian Community is here for you.