This page describes how to manually install Stash from an archive file. However, we strongly recommend that you use the Stash installer instead, for a quick and troublefree install experience.
Check the Supported platforms page for details of the application servers, databases, operating systems, web browsers and Java and Git versions that we have tested Stash with and recommend.
Atlassian only officially supports Stash running on x86 hardware and 64-bit derivatives of x86 hardware.
Cygwin Git is not supported. No internal testing is done on that platform, and many aspects of Stash's functionality (pull requests and forks among them) have known issues. When running Stash on Windows, always use msysGit.
2. Check your version of Java
In a terminal or command prompt, run this:
java -version
The version of Java should be 1.7.x or 1.8.x. You'll need a 64-bit version of Java if you have a 64-bit operating system.
Now try running 'java -version' again to check the installation. The version of Java should be 1.7.x or1.8.x.
Check that the system can find Java
Stash 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 root directory of the Java installation. When running Stash on Windows, unlike Linux or Unix, JAVA_HOME paths with spaces are just fine.
If you don't see a path, then set JAVA_HOME
Stage 1. Locate the JRE installation directory
If you already know the installation path for the Java Runtime Environment, go to Stage 2 below. Otherwise, find the installation path by following these instructions:
If you didn't change the installation path for the Java Runtime Environment during installation, it will be in a directory under C:\Program Files\Java. Using Explorer, open the directory C:\Program Files\Java.
Inside that path will be one or more subdirectories such as C:\Program Files\Java\jre7.
Stage 2. Set the JAVA_HOME variable
Go to Start, search for "sys env" and choose Edit the system environment variables.
Click Environment Variables, and then New under '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, and don't wrap the value in quotes.
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.
Stage 1. Locate the JRE installation directory
If you already know the installation path for the Java Runtime Environment, go to Stage 2 below. Otherwise, find the installation path by following these instructions:
If you didn't change the installation path for the Java Runtime Environment during installation, it will be in a directory under C:\Program Files\Java. Using Explorer, open the directory C:\Program Files\Java.
Inside that path will be one or more subdirectories such as C:\Program Files\Java\jre7.
Stage 2. Set the JAVA_HOME variable
Once you have identified the JRE installation path:
Right-click the My Computer icon on your desktop and select Properties.
Click the Advanced tab.
Click the Environment Variables button.
Under System Variables, click New.
Enter the variable name as JAVA_HOME.
Enter the variable value as the installation path for the Java Development Kit. Don't use a trailing backslash, and don't wrap the value in quotes.
If your Java installation directory has a space in its path name, you should use the shortened path name (e.g. C:\Progra~1\Java\jre7) in the environment variable instead.
Close any command window which was open before you made these changes, and open a new command window. There is no way to reload environment variables from an active command prompt. If the changes do not take effect even after reopening the command window, restart Windows.
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.
3. Check your versions of Git and Perl
In a terminal or command prompt, run:
git --version
perl --version
The version of Git should be 1.7.6 or higher. The version of Perl should be 5.8.8 or higher.
If you don't see supported versions of Git and Perl, either install or upgrade them – see Installing and upgrading Git.
Extract the downloaded file to an install location. The path to the extracted directory is referred to as the<Stash installation directory> in these instructions.
Note that you should use the same user account to both extract Stash and to run Stash (in Step 6.) to avoid possible permission issues at startup. For production installations, we recommend that you create a new dedicated user that will run Stash on your system. See Running Stash with a dedicated user.
5. Tell Stash where to store your data
The Stash home directory is where your Stash data is stored.
If you are upgrading Stash, simply update the value of STASH_HOME in the <Stash installation directory>/bin/setenv file so the new Stash installation points to your existing Stash home directory (if you use a STASH_HOME environment variable to specify the home directory location, no change is required).
Otherwise, for a new install, create your Stash home directory (without spaces in the name), and then tell Stash where you created it by editing the <Stash installation directory>/bin/setenv file – 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:
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.
Tell Stash where you created it by setting a STASH_HOME environment variable, for Windows 7, as follows:
Go to Start, search for "sys env" and choose Edit the system environment variables.
Click Environment Variables, and then New under 'System variables'.
Enter "STASH_HOME" as the Variable name, and the absolute path to your Stash home directory as the Variable value. Don't use a trailing backslash.
There are a few things to know about setting up the Stash home directory on Windows that will make life easier:
Now, in your browser, go to http://localhost:7990 and run through the Setup Wizard. In the Setup Wizard:
Select Internal at the 'Database' step, if you are evaluating Stash. Stash will happily use its internal database, and you can easily migrate to external database later. See Connecting Stash to an external database.
For production or enterprise environments we recommend that you configure the additional aspects described on Using Stash in the enterprise. The aspects described there are not necessary when you are installing for evaluation purposes only.
If you wish to install Stash as a service on Linux or Windows, see either of: