Changing the port that Bitbucket Server listens on

You may wish to change the port that Bitbucket Server listens on from the default '7990' to a different value if another application is already running on that port.

To change the port, edit the shared/server.xml file in the <Bitbucket home directory>.

Find the following lines in server.xml:

<Server port="8006" shutdown="SHUTDOWN">
<Connector port="7990" protocol="HTTP/1.1"

You need to modify both the server port (the default is 8006) and the connector port (the default is 7990) to ports that are free on your machine. The server port is required by Tomcat but is not user-facing in any way. The connector port is the port you use to access Bitbucket Server. For example, in the snippet above, the URL would be

(tick)  Hint: You can use netstat to identify free ports on your machine. See more information on using netstat on Windows or on Linux.

(warning) If you are using a firewall, you should ensure that it is configured to allow HTTP or HTTPS traffic over the connector port you have chosen. 

(warning) If you are running Bitbucket Server on a Linux server and want to bind to privileged ports (those below 1024, for example port 80), you will need to start Bitbucket Server as root in order to successfully bind to the port. Alternatively, you can bind Bitbucket Server to a port over 1024 and then configure iptables to redirect traffic from port 80 to the higher port. 

最終更新日 2016 年 8 月 19 日


Powered by Confluence and Scroll Viewport.