Install Bitbucket Server on Windows from a zip file
This page describes how to install Bitbucket Server in a production environment, with an external database, manually using a zip file.
This method gives you the most control of the installation process.
Other ways to install Bitbucket Server:
- Evaluation - get your free trial up and running in no time.
- Installer – install Bitbucket Server on Windows installer.
- Linux - install Bitbucket Server on a Linux operating system.
On this page
Before you begin
Before you install Bitbucket Server, there are a few questions you need to answer.
Are you using a supported operating system and Java version? | |
Do you want to run Bitbucket Server as a service? | |
Are ports 7990, 7992, and 7993 available? | |
Is your database set up and ready to use? | |
Do you have a Bitbucket Server license? | |
Do you have Git and Perl installed and on the right version? | |
Is your JAVA_HOME variable set correctly? | |
Do you need to use a remote instance of Elasticsearch? |
Install Bitbucket Server
1. Download Bitbucket Server
Download the zip file - www.atlassian.com/software/bitbucket/download.
2. Create the installation directory
Create your installation directory (with full control permission) – this is where Bitbucket will be installed. Avoid using spaces or special characters in the path. We'll refer to this directory as your
<installation-directory>
.Extract the zip file to your
<installation-directory>
.
3. Create the home directory
Create your home directory (with full control permission) – this is where your Bitbucket Server data is stored. This should be separate to your installation directory. We'll refer to this directory as your
<Bitbucket home directory>
.Now tell Bitbucket where your home directory is located. You can do this in one of two ways:
Edit
<installation-directory>/bin/
set-bitbucket-home.bat
file – uncomment theBITBUCKET_HOME
line and add the absolute path to your home directory.Or, you can set an environment variable to tell Bitbucket Server where you created your home directory by setting a
BITBUCKET_HOME
environment variable. To do this- Go to System Environment Variables in Windows.
- Click Environment Variables, and then New under 'System variables'.
- Enter "
BITBUCKET_HOME
" as the Variable name, and the absolute path to your Bitbucket home directory as the Variable value. Don't use a trailing backslash.
4. Start Bitbucket
Change directory to the
<installation-directory>
and run this command:bin\start-bitbucket.bat
In your browser, go to
http://localhost:7990/
and run through the Setup Wizard.
Set up Bitbucket
The Setup Wizard runs automatically when you visit Bitbucket Server in your browser the first time it's started.
5. Connect to your database
- If you've not already done so, it's time to create your database. See the 'Before you begin' section of this page for details.
Select External as your database, then choose a Database Type from the dropdown menu and enter the details of your database.
6. Add your license key
You can also set the base URL at this step, (you can elect to do this later).
7. Create your administrator account
- Enter details for the administrator account.
Select either Go to Bitbucket to go straight to the Bitbucket interface or Integrate with Jira to create your connection with an existing Jira application.
8. Start using Bitbucket Server
What's next?
When setting up Bitbucket in a production environment, we recommend that you configure these aspects next:
- Connect Bitbucket to a user directory - manage users/groups stored in an external directory.
- Run Bitbucket as a dedicated user - run Bitbucket from a user account with restricted privileges.
- Secure the Bitbucket home directory - secure the home directory against unauthorized access.
- Proxy and secure Bitbucket - run Bitbucket behind a reverse proxy and enable HTTPS access.
- Establish a data recovery plan - backup the home directory and database of your instance.
Read more about setting up Bitbucket for an enterprise here: Using Bitbucket in the enterprise.