Changing port that your Atlassian application listens on

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

Problem

You may wish to change the port that your Atlassian application listens on from the default one to a different value if another application is already running on any of the default ones as that will cause Tomcat (and therefore your Atlassian application) to fail during startup.

Here is a list of default ports for each one of the Atlassian applications:

ApplicationConnector PortServer Port
JIRA80808005
Confluence80908000
Bitbucket Server79908006
Bamboo80858007
Fisheye/Crucible8060-

 

 

Solution

To change the default ports above:

Stop your Atlassian application

Click for stopping information...
JIRA applications

Use these commands from the JIRA installation directory:

  • bin/start-jira.sh
  • bin/stop-jira.sh

On Windows, use:

  • bin\start-jira.bat
  • bin\stop-jira.bat

See also JIRA application Startup and Shutdown Scripts.

Confluence

Use these commands from the Confluence installation directory:

  • bin/start-confluence.sh
  • bin/stop-confluence.sh

On Windows, use:

  • bin\start-confluence.bat
  • bin\stop-confluence.bat

See also Starting Confluence Automatically on System Startup.

Bamboo Server

Use these commands from the Bamboo installation directory:

  • bin/start-bamboo.sh
  • bin/stop-bamboo.sh

On Windows, use:

  • bin\start-bamboo.bat
  • bin\stop-bamboo.bat

See also Running Bamboo as a service.

Bitbucket Server

You should stop the service that is running Bitbucket. If you used the installer, the following should do it:

  • From a Linux environment
# service atlbitbucket status
# service atlbitbucket stop
# service atlbitbucket start
  • From a Windows environment
    Just stop the service that is running Bitbucket server.

Alternatively, you can use these commands from the Bitbucket installation directory to manually stop the process:

On Linux, use:

  • bin/start-bitbucket.sh
  • bin/stop-bitbucket.sh

On Windows, use:

  • bin\start-bitbucket.bat
  • bin\stop-bitbucket.bat

See also Start and stop Bitbucket.

Fisheye

Use these commands from the Fisheye installation directory:

  • bin/start.sh
  • bin/stop.sh

On Windows, use:

  • bin\start.bat
  • bin\stop.bat

See also Running Fisheye as a Windows service.

Crucible

Use these commands from the Crucible installation directory:

  • bin/start.sh
  • bin/stop.sh

On Windows, use:

  • bin\start.bat
  • bin\stop.bat

See also Running Crucible as a Windows service.

Crowd

Use these commands from the Crowd installation directory:

  • /start_crowd.sh
  • /stop_crowd.sh

On Windows, use:

  • \start-crowd.bat
  • \stop-crowd.bat

See also Installing Crowd as a Windows Service.

Locate and edit its server.xml

Below a list of its location for each one of the Atlassian's applications:

Click for server.xml location info...

The location of your server.xml file depends on your application, operating system, and installation location. 

Common default installation locations for Atlassian applications are:

  • Linux: /opt/atlassian/<application-name>
  • Windows: C:\Program Files\Atlassian\<application-name>
  • Windows: C:\Atlassian\<application-name>

The default locations of server.xml files for Atlassian applications are:

Applicationserver.xml location
JIRA applications<install-path>/conf/server.xml
Confluence<install-path>/conf/server.xml
Bamboo<install-path>/conf/server.xml
Bitbucket 5.0 and later

N/A, replaced by <Bitbucket home directory>/shared/bitbucket.properties

Please read through Migrate server.xml customizations to bitbucket.properties

Bitbucket Server 4.0 – 4.14

<Bitbucket home directory> /shared/server.xml

Stash 3.8 – 3.11

<Stash home directory>/shared/server.xml

Stash 3.7 and earlier<install-path>/conf/server.xml
FisheyeThe Fisheye configuration file is config.xml, but see Configuring the Fisheye web server.
CrucibleAs for Fisheye.
Crowd

<install-path>/apache-tomcat/conf/server.xml

Note that crowd is predefined as the context path. Updating this requires several steps outlined by Removing the 'crowd' Context from the Application URL.

 

<install-path>  refers to where the application was installed on your system.

Locate the Connectors

Find the following lines in server.xml:

<Server port="8006" shutdown="SHUTDOWN">
...
<Connector port="7990" protocol="HTTP/1.1"
                 connectionTimeout="20000"
                 useBodyEncodingForURI="true"
                 redirectPort="8443"
                 compression="on"
                 compressableMimeType="text/html,text/xml,text/plain,text/css,application/json"/>

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 http://example.com:7990.

tip/resting Created with Sketch.

You can use netstat to identify free ports on your machine. See more information on using netstat on Windows or on Linux.

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. 

If you are running your Atlassian application 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. As this is not recommended, you should alternatively consider:



DescriptionYou may wish to change the port that your Atlassian application listens on from the default one to a different value if another application is already running on any of the default ones as that will cause Tomcat (and therefore your Atlassian application) to fail during startup.
ProductJira, Confluence, Bitbucket, Bamboo, Fisheye, Crucible
PlatformServer
Last modified on Oct 17, 2018

Was this helpful?

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