How to configure temporary directory in Bamboo server

Still need help?

The Atlassian Community is here for you.

Ask the community

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.

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

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:

    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:

    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:

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





Last modified on Apr 26, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.