Starting and stopping Bitbucket Server
When Bitbucket Server runs as a service
If Bitbucket Server is installed as a service on Windows or Linux systems, it will be started automatically when the system boots.
Windows
Start and stop the Bitbucket Server service from the services console, on Windows.
For Bitbucket Server 4.6+
Ensure that you start both atlbitbucket
and atlbitbucket_search
services.
Linux
Manage the Bitbucket Server service using the following commands:
# service atlbitbucket status
# service atlbitbucket stop
# service atlbitbucket start
Manage the Elasticsearch server using the following commands:
# service atlbitbucket_search status
# service atlbitbucket_search start
# service atlbitbucket_search stop
Mac OS X
On Mac OS X, you will need to restart Bitbucket Server manually, as described below.
Manually
You can start and stop Bitbucket Server manually as follows:
Windows
Start and stop Bitbucket Server and Elasticsearch using the Bitbucket Server items in the Windows Start menu. Use the URL item there to visit Bitbucket Server in your default browser.
Alternatively, start Bitbucket Server and Elasticsearch from a command prompt, by changing directory to the <Bitbucket Server installation directory>
and running the following command:
bin\start-bitbucket.bat
bin\stop-bitbucket.bat
Stop Bitbucket Server manually by changing directory to the <Bitbucket Server installation directory>
and running the following command:
Notice that the script above will stop both Elasticsearch and Bitbucket Server for you. If you want to stop them separately, please use:
Bitbucket Server:
bin\stop-webapp.bat
bin\start-webapp.bat
Elasticsearch:
bin\stop-search.bat
bin\start-search.sh.bat
Linux
Start and stop Bitbucket Server and Elasticsearch processes manually on the right order using the scripts provided.
Change directory in a terminal to the <Bitbucket Server installation directory>
and run:
bin/start-bitbucket.sh
bin/stop-bitbucket.sh
Notice that the script above will stop both Elasticsearch and Bitbucket Server for you. If you want to stop them separately, please use:
Bitbucket Server:
bin/stop-webapp.sh
bin/start-webapp.sh
Elasticsearch:
bin/stop-search.sh
bin/start-search.sh
Mac
Start and stop Bitbucket Server manually using the app icons (shown above) in the <Bitbucket Server installation directory>
. These simply link to the start-bitbucket.sh
and stop-bitbucket.sh
scripts in <Bitbucket Server installation directory>/bin
.
Use the URL icon to visit Bitbucket Server in your default browser.
Start Bitbucket Server with a remote Elasticsearch instance
When using a remote Elasticsearch instance, instead of the bundled Elasticsearch instance, start Bitbucket Server by running start-webapp.sh
instead of start-bitbucket.sh
. The start-webapp.sh
script only starts Bitbucket Server whereas start-bitbucket.sh
will attempt to start the both the bundled Elasticsearch and Bitbucket Server. It is a requirement of the Bitbucket Data Center setup that you have only one single remote Elasticsearch instance for your cluster as described on Installing Bitbucket Data Center in which this section is applicable. You can also refer to Install and configure a remote Elasticsearch instance.