Moving Stash to a different context path


On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

When opened in a viewport, the user will be redirected to: Change Bitbucket's context path.

There are various reasons why you may wish to change the context path for Stash. Two of those are:

Upgrade Note

Note that the location of server.xml changed in Stash 3.8. See the Stash upgrade guide.

Changing the context path for Stash:

  1. Navigate to your Stash home directory.
  2. Stop Stash. SeeStarting and stopping Stash.
  3. Edit <Stash home directory>/shared/server.xml and find the element below:

    <Context path="" docBase="${catalina.home}/atlassian-stash" reloadable="false" useHttpOnly="true"/>

    Update the path attribute to reflect the context path that you want Stash to be accessible at, e.g. "/stash":

    <Context path="/stash" docBase="${catalina.home}/atlassian-stash" reloadable="false" useHttpOnly="true"/>

    Then save the file.


  4. Start Stash. See Starting and stopping Stash.

    Stash should now be available at the same host as before under the new context path. For example a server that was at http://localhost:7990 will now be reachable at http://localhost:7990/stash.

  5. Once Stash has started, go to the administration area and click Server settings (under 'Settings'). Append the new context path to your base URL:

  6. Click Save.

Stash + Apache

Note that if you are running Stash behind Apache:

  • You will need to make sure that the host or context path that Stash is exposed on is not also being used by another web application that is listening on a different port.
  • If you have updated the Stash context path using the steps outlined above, you will need to update your Apache configuration, as described in Integrating Stash with Apache HTTP Server.

Application Links

If you had Application Links set up before changing the context path in Stash, you will have to recreate those using the new Stash URL. See Linking Stash with JIRA.


The context path does not affect the URL at which SSH operations occur. After changing the context path so that Stash is accessible at https://my-stash-hostname:7990/stash, SSH operations occur without the context path at ssh://my-stash-hostname:7999.

Last modified on Feb 27, 2013

Was this helpful?

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