How to setup AWS ELB to proxy requests for Bitbucket Server

Still need help?

The Atlassian Community is here for you.

Ask the community


This guide will help to setup and configure an Elastic Load Balancer in AWS to proxy requests to Bitbucket Server.


AWS Configuration

  1. Create an EC2 instance and install Bitbucket Server as directed in our Getting started guide
  2. Under the EC2 page in AWS, navigate to Load Balancing >> Load Balancers and create a new load balancer with the following basic configuration

    Load Balancer nameUnique name for the load balancer
    Create LB InsideNote the VPC used here as we'll use it later

    Listener Configuration

    Load Balancer ProtocolLoad Balancer PortInstance ProtocolInstance Port
  3. Create a new Security Group that allows inbound traffic on ports 22 and 80 from the appropriate sources
  4. Use the following configuration for the Health Check

    Ping ProtocolHTTP
    Ping Port7990
    Ping Path/status
  5. Select the appropriate EC2 instances to associate with this ELB instance
  6. Save the ELB
  7. Navigate to your EC2 instances and modify the Security Group to allow inbound connections on port 7990 and 7999 with the ELB VPC as the source (configured in the initial setup of the ELB)

Bitbucket Server Configuration

Set the Base URL

Under Administration >> Server Settings set the Base URL to the ELB address, i.e.

Also, set the SSH base URL, i.e. ssh://

Configure the Tomcat Connector

Bitbucket Server 5.0+

Update the BITBUCKET_HOME/shared/ and modify the connector for port 7990 so that it has the proxy configuration - proxy-name, proxy-port:


After this, restart Bitbucket Server.

Bitbucket Server 4.14 and below

Update the BITBUCKET_HOME/shared/server.xml and modify the connector for port 7990 so that it has the proxy configuration - scheme, proxyName, proxyPort:

<Connector port="7990" 
    proxyPort="80" />

After this, restart Bitbucket Server.

For more details on configuring the proxy see Proxy and secure Bitbucket.



Verify that ports 7990 and 7999 are open in the Windows Firewall.

Last modified on May 2, 2017

Was this helpful?

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