DEV Community

mprattinger
mprattinger

Posted on

Change Atlassian Bitbucket Home Directory

In this article i will go thru the steps to change the home directory of an Bitbucket on prem installation (Atlassian Bitbucket Server) installed on Windows Server.

After the installation, the home directory is at c:\Atlassian\ApplicationData\Bitbucket. To keep things clean, we wanted to have the home directory (this is where the repositories are put) on an extra drive (E:\ in our case).
The Atlassian documentation describes this step as easy, you must only change the HOME_DIR env variable in the .bat file or set the environment variable. But none of theses are working.

I found an answer in the atlassian forum, which worked as expected:

The Atlassian Bitbucket program dir is, in my case, at C:\Atlassian\Bitbucket\6.9.0\bin. In this folder, there is the server management executable "bservmgr.exe".

On the commandline (cmd), you can start this tool with the "//ES/AtlassianBitbucket" parameter, to start the java properties window:

In this window, you must click on "Java" Tab. On this tab under "Java Options" you have to change the value of -Dbitbucket.home=... to the value you want. In my case to -Dbitbucket.home=E:\Bitbucket.

You can close this window by clicking on ok. After a server restart, the home directory of the Atlassian Bitbucket server is now E:\Bitbucket.

I based this blog post on an bitbucket support post: Change BITBUCKET_HOME when installed as a Windows service

Top comments (0)