# Stash Latest : Stash home directory

This page last changed on Aug 07, 2012 by pwatson.

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

### What is in the Stash home directory?

Your Stash home directory contains the following directories and files:

Path | Description
--- | ---
`data` | Contains all repository data and the embedded HSQL database if an external database is not configured.
export | Contains database dump files produced during migrations between databases.
`log` | Contains logging files for Stash.
`plugins` | Contains plugin related data (such as externally uploaded plugins) for Stash.
`tmp` | Temporary directory for run-time related operations. Can be safely deleted when the Stash is not running.
`stash-config.properties` | File 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.