Using Bitbucket Server in the enterprise

Still need help?

The Atlassian Community is here for you.

Ask the community

This page describes best practices for using Bitbucket Server in enterprise environments. If you're evaluating Bitbucket Server, we suggest that you begin with Install a Bitbucket Server trial, instead of this page.

Bitbucket Server is the Git code management solution for enterprise teams. It allows everyone in your organization to easily collaborate on your Git repositories, while providing enterprise-grade support for:

  • user authentication
  • repository security
  • integration with existing databases and dev environment.


On this page



Atlassian offers two deployment options for Bitbucket Server.


Bitbucket Server

For most organizations, a single instance of Bitbucket Server provides good performance. Continue reading this page for guidance on best practices in setting up a Bitbucket Server instance in a production environment.

Bitbucket Data Center

For larger enterprises that require high availability and greater performance at scale, Bitbucket Data Center resources uses a cluster of Bitbucket Server nodes to provide Active/Active failover, and is the deployment option of choice. 


Feature comparison

Here's a summary of what you get with each license. 

Core featuresServer licenseData Center license
Collaboration via pull requests
Review and discuss your code with your team before merging changes. Learn more

Branch permissions

Control what users can do on a single branch, branch type, or branch pattern within a repository or project. Learn more

Flexible workflows
Use centralized, forking, gitflow or forking workflows. Learn more

Git LFS (Large File Storage)
Store large files without the need for an external object store. Learn more

CI and issue tracker integrations
Connect Bitbucket to Jira, Bamboo, Source Tree for a great developer experience. Learn more

User management

External user directories
Store users in Active Directory, Crowd, Jira or another LDAP directory. Learn more

SAML single sign-on
Use a SAML identity provider for authentication and single-sign on. Learn more

High availability and performance at scale

Clustering
Run Bitbucket on multiple nodes for high availability. Learn more

Smart mirroring
Improve Git clone speeds for distributed teams working with large repositories. Learn more

Elasticsearch
Connect Bitbucket to a remote Elasticsearch instance for improved scalability (required for Data Center sites). Learn more

Infrastructure and Control

App diagnostics
Get an overview of the health of your site, including potential performance issues relating to third-party apps (add-ons). Learn more

Integrity tests for zero-downtime backup
Find and resolve any inconsistencies between the database and home directory, for example after restoring a backup. Learn more

Deployment options

Your own hardware
Run Bitbucket on your own physical servers, virtualized servers, or in the data center of your choice.

AWS Quick Start and Cloud Formation Templates
Use our Cloud Formation Templates to deploy Bitbucket on AWS. Learn more





Platform requirements

Although Bitbucket Server can be run on Windows, Linux and Mac systems, for enterprise use we only recommend, and support using Linux. This recommendation is based on our own testing and experience with using Bitbucket Server.

See the Supported platforms page for details of the supported versions of Java, external databases, web browsers and Git.

See Installing Bitbucket Data Center for detailed information about Bitbucket Data Center requirements.

Performance considerations

In general, Bitbucket Server is very stable and has low memory consumption. There are no scalability limits other than for Git hosting operations (clone in particular). We know this is the scalability limit of the product; the limit is proportional to the number of cores on the system.

As an example, data collected from an internal Bitbucket Server instance indicate that for a team of approximately 50 developers, with associated continuous integration infrastructure, we see a peak concurrency of 30 simultaneous clone operations and a mean of 2 simultaneous clone operations. We conservatively expect that a customer with similar usage patterns would be capable of supporting 1000 users on a machine with 40 cores and a supporting amount of RAM. While we expect a peak concurrency larger than 40, Bitbucket Server is designed to queue incoming requests so as to avoid overwhelming the server.

Bitbucket Server – see Bitbucket Server production server data for data from the Bitbucket Server production instance we run internally at Atlassian.

Bitbucket Data Center – see Bitbucket Data Center Performance for the results of our performance testing for clusters of different sizes.

High availability

If Bitbucket Server is a critical part of your development workflow, maximizing Bitbucket Server availability becomes an important consideration.

Bitbucket Server – see High availability for Bitbucket Server for the background information you need to set up Bitbucket Server in a highly available configuration. 

Bitbucket Data Center – see Failover for Bitbucket Data Center for information about how Bitbucket Data Center provides HA and almost instant failover.

Scalability

Bitbucket Server is built with enterprise scaling and infrastructure flexibility in mind, giving administrators control over how Bitbucket Server fits into their environment: 

  • For most organizations, a single instance of Bitbucket Server provides good performance. Continue reading this page for guidance on best practice in setting up a Bitbucket Server instance in a production environment.
  • For larger enterprises that require HA and greater performance at scale, Bitbucket Data Center uses a cluster of Bitbucket Server nodes and is the deployment option of choice.

Your single instance of Bitbucket Server can be easily upgraded to Bitbucket Data Center when the time comes.

Bitbucket Server – see Scaling Bitbucket Server for information about how you can tune your Bitbucket Server instance to grow with your organization's needs. See also Scaling Bitbucket Server for Continuous Integration performance for information specific to Bitbucket Server performance when CI tools poll Bitbucket Server for changes.

Bitbucket Data Center – see Adding and removing Data Center nodes for information about how you can rapidly provision extra capacity without downtime.

Provisioning

Some possible approaches to provisioning Bitbucket Server include:

Setting up a production environment

When setting up Bitbucket Server for a production or enterprise environment, we highly recommend that you configure the following aspects:

Run Bitbucket Server as a dedicated user
Install Bitbucket Server as a service
Use an external database
  • For production environments Bitbucket Server should use an external database, rather than the embedded database. Set up your external DBMS (for example MySQL) before starting Bitbucket Server for the first time. This allows you to connect Bitbucket Server to that DBMS using the Setup Wizard that launches when you first run Bitbucket Server. See Connecting Bitbucket Server to an external database.
Connect to your existing user directory
Secure the Bitbucket home directory
Secure Bitbucket Server with HTTPS
  • Access to Bitbucket Server should be secured using HTTP over SSL, especially if your data is sensitive and Bitbucket Server is exposed to the internet. See Securing Bitbucket Server with HTTPS.
Enable SSH access to Git repositories
  • Enable SSH access for your Bitbucket Server users to Git repositories in Bitbucket Server so that they can add their own SSH keys to Bitbucket Server, and then use those SSH keys to secure Git operations between their computer and the Bitbucket Server instance. See Enabling SSH access to Git repositories in Bitbucket Server.
Change the context path for Bitbucket Server
  • If you are running Bitbucket Server behind a proxy, or you have another Atlassian application (or any Java web application), available at the same hostname and context path as Bitbucket Server, then you should set a unique context path for Bitbucket Server. See Moving Bitbucket Server to a different context path.

Administering a production environment

Upgrading Bitbucket Server
  • For production environments we recommend that you test the Bitbucket Server upgrade on a QA server before deploying to production. See the Bitbucket Server upgrade guide.
Backups and recovery
  • We highly recommend that you establish a data recovery plan that is aligned with your company's policies. See Data recovery and backups for information about tools and backup strategies for Bitbucket Server.
Logging
  • Bitbucket Server instance logs can be found in  <Bitbucket home directory>/log. Logs for the bundled Tomcat webserver can be found in  <Bitbucket Server installation directory>/log. See Bitbucket Server debug logging.
  • Bitbucket Server displays recent audit events for each repository and project (only visible to Bitbucket Server admins and system admins), and also creates full audit log files that can be found in the <Bitbucket home directory >/audit/logs directory. Note that Bitbucket Server has an upper limit to the number of log files it maintains, and deletes the oldest file when a new file is created – we recommend an automated backup of log files. See Audit logging in Bitbucket Server.
Last modified on Feb 11, 2019

Was this helpful?

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