# Stash Latest (2.12) : Changing the port that Stash listens on

Created and last modified by pwatson on Nov 17, 2013

You may wish to change the port that Stash 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 `conf\server.xml` file in the `<Stash installation directory>`.

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 (default is 8006) and the connector port (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 Stash. For example, in the snippet above, the URL would be http://example.com:7990.

Hint: 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/https traffic over the connector port you have chosen.

Related pages:

- Specifying the base URL for Stash