Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Upgrade from 5.3 -> 7.3 using docker


I'm currently running Bitbucket 5.3 under the atlassian bitbucket-server docker image.
I'd like to upgrade to the latest bitbucket and at the same time perhaps move from mysql to postgress.

Can anyone tell me if the docker images in particular allow for version upgrades and if so, are there appropriate version hops to take?

2 answers

1 accepted

0 votes
Answer accepted
Dave Chevell Atlassian Team Jun 07, 2020

Hi @MrFollies ,

The short answer is that you shouldn’t need to do any version hops. This is largely true for versions of Bitbucket Server/Stash even further back. 

There is one caveat: starting somewhere around Bitbucket 6.x, we stopped using the built-in daemon user and moved to setting up a dedicated user account inside the container. The bitbucket user has a different UID/GID, and so on first time startup the image’s bootstrap process is likely to detect these different permissions and will set the appropriate permissions before starting the app. Depending on the size of your installation this could take a while.

As an alternative, as part of your migration process you could stop the old image, recursively set the ownership of your $BITBUCKET_HOME (which I presume is stored externally somewhere) to 2003:2003 which is the UID:GID of the built-in bitbucket user, and then start the new version of our Docker image.

Let us know how you go!



Cheers Dave,..

In the end I went from 5.x -> 5.16 -> 6.0 -> 6.10 -> 7.0 -> 7.3

What you describe is exactly the experience I had, with two exceptions.

1. The uid/gid settings did not get fixed automatically.    I needed to adjust these myself.

2. The other issue I saw (Not sure which version) is the location of the actual repos moved from:  /var/atlassian/application-data/bitbucket/shared/repositories to

As such I could log in and see all of my projects but each repo acted as if it were empty, until I moved them...

Such an awesome product and a painless upgrade!

Dave Chevell Atlassian Team Jun 08, 2020

Hey @MrFollies 

#2 is interesting, because this location didn't change in the product itself, or in the associated Docker image. BITBUCKET_HOME has always been /var/atlassian/application-data/bitbucket and bitbucket's shared home has always been ./shared directly underneath BITBUCKET_HOME. Is it possible your volume mount options changed? 

In any case, great to hear you're all upgraded!



Hmm,...   It looks a little off still..
The server is working ok but the paths look strange (I was guessing at the path in my last message and it looks like I have that wrong)...

Here's what it looks like:   (I added the symlink to fix things)

root@dd04c017159e:/var/atlassian/application-data/bitbucket/shared# ls -als
total 28
0 drwxr-xr-x 13 bitbucket bitbucket 198 Jun 3 04:58 .
0 drwxr-xr-x 12 bitbucket bitbucket 187 Jun 9 07:37 ..
8 drwx------ 2 bitbucket bitbucket 4096 Jun 3 00:11 analytics-logs
0 drwx------ 4 bitbucket bitbucket 79 Jun 15 2017 bin
0 drwx------ 6 bitbucket bitbucket 67 May 10 23:41 caches
0 drwx------ 5 bitbucket bitbucket 53 Jun 3 06:15 config
0 lrwxrwxrwx 1 bitbucket bitbucket 11 Jun 3 03:25 data -> shared/data
0 drwx------ 2 bitbucket bitbucket 55 Sep 20 2016 export
0 drwx------ 3 bitbucket bitbucket 63 Jul 10 2017 lib
4 -rwx------ 1 bitbucket bitbucket 17 Jun 8 07:03 .lock
8 drwx------ 4 bitbucket bitbucket 4096 Jun 3 00:25 log
0 drwx------ 4 bitbucket bitbucket 50 Jun 3 02:02 plugins
0 drwx------ 5 bitbucket bitbucket 233 Jun 3 12:11 search
0 drwx------ 6 bitbucket bitbucket 102 Jul 10 2017 shared
4 drwx------ 21 bitbucket bitbucket 4096 May 10 23:41 tmp
4 -rwx------ 1 bitbucket bitbucket 61 Mar 9 2018 .version

root@dd04c017159e:/var/atlassian/application-data/bitbucket/shared# ls -las shared
total 8
0 drwx------ 6 bitbucket bitbucket 102 Jul 10 2017 .
0 drwxr-xr-x 13 bitbucket bitbucket 198 Jun 3 04:58 ..
4 -rwx------ 1 bitbucket bitbucket 504 Sep 20 2016
0 drwx------ 4 bitbucket bitbucket 60 Jun 15 2017 config
0 drwx------ 8 bitbucket bitbucket 125 Jun 3 03:29 data
4 -rwx------ 1 bitbucket bitbucket 16 May 10 23:40 .lock
0 drwx------ 3 bitbucket bitbucket 31 Sep 20 2016 plugins
0 drwx------ 5 bitbucket bitbucket 92 Jul 10 2017 search

I suspect I need to remove the symlink and move shared/data in its place.
Then the shared directory is probably not used at all?    I mean $BITBUCKET_HOME/shared/shared can't be right can it?

0 votes


 it depends on of your docker image configs. 

I saw some images include everything, some has dedicated rdbms, app, nginx etc.

It's the official Altassian image for bitbucket...

I've made backups and I'm just trying it....
Unless someone knows the right way for sure, I'll post my findings after I've done a successful migration...

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

121 views 0 2
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you