How to configure temporary directory in Bamboo server

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

Summary

The information in this page relates to customizations in Bamboo. Consequently, Atlassian Support cannot guarantee to provide any support for the steps described on this page as customizations are not covered under Atlassian Support Offerings. Please be aware that this material is provided for your information only and that you use it at your own risk.

Also, please be aware that customizations done by directly modifying files are not included in the upgrade process. These modifications will need to be reapplied manually on the upgraded instance.

In some scenarios, it might be required to change or configure the temporary directory (java temp directory) for Bamboo server.

Solution

This temp directory is used by the JVM for temporary file storage. The JVM is configured to use this as its java.io.tmpdir in the catalina.sh and catalina.bat scripts. Tomcat is configured to use this temporary directory rather than its default for security reasons. The temp directory must exist for Tomcat to work correctly.

Follow the instructions below to change the temporary directory in Bamboo server according to your Operating System:

Linux or MacOs

  1. Stop Bamboo.

  2. From <bamboo-install>/bin, open catalina.sh.

  3. Find the section CATALINA_TMPDIR=, for example:

    1 2 3 4 if [ -z "$CATALINA_TMPDIR" ] ; then # Define the java.io.tmpdir to use for Catalina CATALINA_TMPDIR="$CATALINA_BASE"/temp fi
  4. Change "$CATALINA_BASE"/temp to the desired directory and save the changes.

  5. Start Bamboo back.

Windows (starting from the .bat file)

  1. Stop Bamboo.

  2. From <bamboo-install>/bin, open catalina.bat.

  3. Find the section CATALINA_TMPDIR=, for example:

    1 2 3 if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir set "CATALINA_TMPDIR=%CATALINA_BASE%\temp" :gotTmpdir
  4. Change %CATALINA_BASE%\temp to the desired directory and save the changes..

  5. Start Bamboo back.

Windows Service

  1. Stop Bamboo service.

  2. Add the following Java option by configuring your system properties:

    1 -Djava.io.tmpdir=/path/to/tmpdir
  3. Change /path/to/tempdir to the desired directory and save the changes..

  4. Start Bamboo back.

Please also see How to configure the temporary directory for a Bamboo remote agent.

Updated on April 24, 2025

Still need help?

The Atlassian Community is here for you.