Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

of this page, or visit the Bitbucket Server documentation home page.

Where is the Stash home directory?

The Stash home directory is where your Stash data is stored. The home directory location is defined either by the STASH_HOME environment variable, or in the STASH_HOME line of:

  • <Stash installation directory>/bin/setenv.bat, on Windows
  • <Stash installation directory>/bin/setenv.sh, on Linux and Mac.

(warning) You should not locate your Stash home directory inside the <Stash installation directory> — they should be entirely separate locations. If you do put the home directory in the <Stash installation directory> it will be overwritten, and lost, when Stash gets upgraded. And by the way, you'll need separate Stash home directories if you want to run multiple instances of Stash.

What is in the Stash home directory?

Your Stash home directory contains the following directories and files:

パス説明
cachesCache files. It should be safe for these files to be deleted between application restarts, however, these files must not be modified or removed externally during the application runtime.
configContains application configuration.
dataContains all repository data and the embedded HSQL database if an external database is not configured.
exportContains database dump files produced during migrations between databases.
logContains logging files for Stash.
pluginsContains plugin related data (such as externally uploaded plugins) for Stash.
tmpTemporary directory for run-time related operations. Can be safely deleted when the Stash is not running.
stash-config.propertiesFile which contains configuration properties for Stash.

Securing the Stash home directory

The internal database files, the migration dump files and the stash-config.properties files all contain information that may be considered secret (server settings, salted and hashed user passwords, database passwords, etc).

For production use, we strongly recommend that you secure this directory against unauthorised access.

We recommend the following precautions:

  • Assign a separate restricted user account on the machine for running Stash (not a root/administrator user)
    • If you wish to run Stash on port 80, use a separate http front end as described in Integrating Stash with Apache HTTP Server (do not run as root/Administrator if security of the home directory is important to you)
  • Ensure that only the user running Stash can access the Stash home directory, by setting file system permissions appropriately for your operating system.