Moving Bitbucket Server to a different context path
There are various reasons why you might need to change the context path for Bitbucket Server. Two of those are:
- You are running Bitbucket Server behind a proxy.
- You have another Atlassian application, or Java web application, available at the same hostname and context path as Bitbucket Server, and are experiencing login problems (see Login and session conflicts with multiple Atlassian applications).
To change the context path for Bitbucket Server
- Navigate to your Bitbucket Server home directory.
- Stop Bitbucket Server. See Starting and stopping Bitbucket Server.
shared/bitbucket.propertiesfile, and add the
server.context-pathproperty. Set it to reflect the context path that you want Bitbucket Server to be accessible at. For example, to set the context path to
/bitbucketyou would add:
Then save the file.
- Start Bitbucket Server. See Starting and stopping Bitbucket Server.
Bitbucket Server is now available at the same host as before, but under the new context path. For example, a server that was at
http://localhost:7990will now be reachable at
Once started, go to the administration area and click Server settings (under 'Settings'). Append the new context path to your base URL:
If you're running Bitbucket Server behind Apache,
- You need to make sure the host or context path that Bitbucket Server is exposed on is not also being used by another web application that is listening on a different port.
- If you updated the Bitbucket Server context path using the steps outlined above, you need to also update your Apache configuration, as described in Integrating Bitbucket Server with Apache HTTP Server.
If you had Application Links set up before changing the context path in Bitbucket Server, you have to recreate those using the new Bitbucket Server URL. See Linking Bitbucket Server with Jira.
If you use SSH, the context path does not affect the URL at which SSH operations occur. After changing the context path so that Bitbucket Server is accessible at
https://localhost:7990/bitbucket, SSH operations occur without the context path at
Was this helpful?Yes Provide feedback about this article