Which ports does Bitbucket Server listen on, and what are they used for?
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
You'd like to know which ports Bitbucket Server listens on? For instance, what are the minimal number of ports to open bidirectional traffic, incoming and outgoing, through a firewall for Bitbucket Data Center?
Solution
By default Bitbucket Server and Bitbucket Data Center opens a socket on the following ports and listens on them:
Port number | Purpose | Remarks |
---|---|---|
7990 (TCP) | Standard HTTP port for Bitbucket Server | If you have configured Bitbucket Server to listen on a different HTTP port (see Change the port Bitbucket listens on), then Bitbucket Server will listen on that port instead of 7990 |
7999 (TCP) | Standard SSH port for Bitbucket Server | If you have configured Bitbucket Server to use a different SSH port, then Bitbucket Server will listen on that port instead of 7999. If you have disabled SSH in Bitbucket Server, then Bitbucket Server will not listen on port 7999. |
5701 (TCP/UDP) | Hazelcast port for node-to-node cluster communication | This port needs to be accessible from all nodes in the cluster. If you are not using Bitbucket Data Center, the port does not need to be accessible from outside. Note: This port should not be disabled, even on non-Data Center implementations. When not in use (for non-Data Center implementations or if hazelcast.network.multicast has been set to false in your bitbucket.properties file) Bitbucket intercepts any attempts to connect to that port and rejects those attempts. It is our recommendation for those not using clustering to instead control access to this port at a firewall level. |
7777 | Used by sidecar JVM process for git operations (Bitbucket 8.0+) | Bitbucket server 8.0 splits git operations into an external JVM process called the sidecar. The communication between these JVM's is done via RPC. This is critical to Bitbucket functionality and cannot be disabled. As requests to this port are being made from the same server, this port does not need to be accessible from outside. Clients will still connect directly to Bitbucket Server for all Git operations. The port can be changed by following Change the port of the Mesh sidecar |
If you have configured Bitbucket Server to have additional connectors, Bitbucket Server will listen on the respective ports you have configured, and these need to opened in the firewall as well. Starting with Bitbucket Server version 5 these ports are defined in <BitbucketHome>/shared/bitbucket.properties.
In addition, when using the Search server distribution bundled with Bitbucket Server (Elasticsearch for Bitbucket < 7.21.0 / OpenSearch for Bitbucket >= 7.21.0), the following default ports are opened and listened on:
Port number | Purpose | Remarks |
---|---|---|
7992 (TCP) | Search server HTTP interface port | This port is primarily used to receive HTTP and REST API requests from Bitbucket Server. As requests to this port are being made from the same server, this port does not need to be accessible from outside. |
7993 (TCP) | Search server transport/node communication port | This port is used to connect the Search instance to a cluster and to enable node-to-node communication. This port cannot be blocked, as it will prevent the instance from starting - but this port does not need to be accessible from the outside, as the bundled Search instance is not part of a cluster. |
For Bitbucket Data Center we recommend you use a separate instance of Elasticsearch/OpenSearch. Otherwise, multiple search server instances on each node will form a cluster - which we do not support.