Starting and stopping Bitbucket Server

This page describes the various ways you can start or stop Bitbucket Server, depending on which method suits your needs.

Start Bitbucket during installation

The Bitbucket Server installer can automatically start Bitbucket Server. If you're not using the installer, use the instructions below that are appropriate for your needs to start Bitbucket.

On this page



Start/stop Bitbucket Server


To start/stop Bitbucket Server 

For Linux

Change to your <Bitbucket Server installation directory>, then use the command that meets your needs:

bin/start-bitbucket.sh
bin/stop-bitbucket.sh


For Windows

For automated starting and stopping of Bitbucket Server on Windows, it should be installed as a service.

You can use start-bitbucket.bat for short term debugging, using Ctrl+C will safely shutdown the instance when it is no longer needed. 


For macOS

Use the app icons in the <Bitbucket Server installation directory>. These link to the start-bitbucket.sh and stop-bitbucket.sh scripts in <Bitbucket Server installation directory>/bin.

Start Bitbucket Data Center

For Bitbucket Data Center, the remote Elasticsearch instance must be started separately. It is a requirement of the Bitbucket Data Center setup that you have only one remote Elasticsearch instance for your entire cluster, as described on Installing Bitbucket Data Center. To start (or restart) a remote Elasticsearch instance, see Elasticsearch documentation for specific instructions.


To start Bitbucket Data Center (does not start Bitbucket's bundled Elasticsearch instance)

  1. Change to your <Bitbucket Server installation directory>
  2. Run this command:

    start-bitbucket.sh --no-search


Start/stop Bitbucket Server when running as a service

On Windows and Linux systems you can choose to have Bitbucket Server installed as a service, and it will be started automatically when the system boots.


To start/stop Bitbucket Server manually when running as service:

For Linux

Manage the Bitbucket Server service with these commands:

# service atlbitbucket status 
# service atlbitbucket stop 
# service atlbitbucket start

For Windows

Start and stop the Bitbucket Server service from the services console, on Windows. Ensure you start both the AtlassianBitbucket and AtlassianBitbucketElasticsearch services.

Start Bitbucket Server without starting bundled Elasticsearch

Why would I want to start Bitbucket without starting the bundled Elasticsearch?

You're running Bitbucket Data Center: It is a requirement of the Bitbucket Data Center setup that you have only one remote Elasticsearch instance for your cluster, as described on Installing Bitbucket Data Center.

You have a remote Elasticsearch instance (for whatever reason): When using a remote Elasticsearch instance, you have to start Bitbucket Server without starting the bundled Elasticsearch instance.

You can also refer to Install and configure a remote Elasticsearch instance.


To start Bitbucket Server without starting the bundled Elasticsearch instance

For Linux
start-bitbucket.sh --no-search


For Windows

start-bitbucket.bat /no-search

 

Last modified on Nov 15, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.