Stash is now known as Bitbucket Server.
See the

Unknown macro: {spacejump}

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

Hey! We're going to install Stash on Windows. There are a few steps, but we think you'll really like Stash once it's up and running.

1. Check supported platforms

Better check the Supported platforms page first; it lists the application servers, databases, operating systems, web browsers and JDKs that we have tested Stash with and recommend.

Atlassian only officially supports Stash running on x86 hardware and 64-bit derivatives of x86 hardware.

2. Check your version of Java

In a command prompt, run this:

java -version

The version of Java should be 1.6.0 or higher.

Download and install the Java Platform JDK (not the JRE) from Oracle's website.

(warning) The Java install path must not contain spaces, so don't install into C:\Program Files\Java\. Instead, use a path like C:\Java.

Now try running 'java -version' again to check the installation. The version of Java should be 1.6.0 or higher.

3. Check that Windows can find Java

Windows uses the JAVA_HOME environment variable to find Java. To check that, in a command prompt, run:

echo %JAVA_HOME%

You should see a path to the Java install location that does not contain spaces.

  • If you see a path with spaces, like this C:\Program Files\Java\, then sorry, but go back to 2. and reinstall Java to a location that doesn't have spaces.

  • If you don't see a path at all, or if you just see %JAVA_HOME%, then set JAVA_HOME as follows:

For Windows 7:

Go to Start, search for "sys env" and choose Edit the system environment variables.

Click Environment Variables, and then New for either 'User variables', or if available, 'System variables'.

Enter "JAVA_HOME" as the Variable name, and the absolute path to where you installed Java as the Variable value. Don't use a trailing backslash.

Now, in a new command prompt,  try running '%JAVA_HOME%\bin\java -version'. You should see the same version of Java as you saw in 2. above.

4. Check your version of Git

In a command prompt, run:

git --version

The version of Git should be 1.7.6 or higher.

Download the Full installer for official Git for Windows.

Run the Git installer. , ensure that git.exe is available in the path.

  • You must select the option which puts git.exe and the other UNIX tools on the path, as shown below.
  • Do not select the option to only add Git to the path -- this will not work with Stash.

Now, in a new command prompt, try running 'git --version' again. The version of Git should be 1.7.6 or higher.

5. Now it's time to get Stash

Download Stash from the Atlassian download site.

Extract the downloaded file to an install location. The path to the extracted directory is referred to as <Stash installation directory> in these instructions.

6. Tell Stash where to store your data

(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 can't use the same Stash home directory for multiple instances of Stash.

Stash uses the STASH_HOME  variable to specify the location of your home directory.

To set that, edit the file <Stash installation directory>\bin\setenv.bat, uncomment the STASH_HOME line and add the absolute path to your home directory. Here's an example of what that could look like when you're done:

7. Connect to an external database (optional)

If you already have a database you want to use, now is the time to tell Stash about it, before starting Stash for the first time. If you try to do this later, you'll lose data. See Connecting Stash to an external database. Just so you know, we're working on database migration for a future version of Stash.

If you do nothing about this now, Stash will happily use its internal database.

8. Start Stash!

In a command prompt, change directory to <Stash installation directory>\bin\ and run this:

start-stash.bat

In your browser, go to http://localhost:7990 and run through the Setup Wizard.
You can postpone setting up JIRA integration until later if you wish; see Configuring JIRA integration in the Setup Wizard .

9. Set up your mail server

Configure your email server so users can receive a link from Stash that lets them generate their own passwords. See Setting up your mail server.

10. Secure Stash (optional)

Configure access to Stash, using HTTP over SSL, if your data is sensitive and Stash is exposed to the internet. See Securing Stash with HTTPS .

11. Stop Stash (optional)

In a command prompt, change directory to <Stash installation directory>\bin\ and run this:

stop-stash.bat
  • No labels