Changing Server ID for Bitbucket Server Cloned Instances
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
This page tells you how to obtain a new Server ID to use in a cloned instance of Bitbucket Server.
Note that Server IDs generally need to be changed for Application Links. Track progress at https://ecosystem.atlassian.net/browse/APL-629.
If you would like to change the server ID on your cloned instance, you will need to acquire a new server ID for your test environment by installing a fresh version of Bitbucket Server on the new server.
Install a new, temporary instance of Bitbucket Server. Make sure the installation points to a new empty home directory.
Start the new, temporary Bitbucket Server instance.
On the Wizard
- Choose Internal Database
- Extract the Server ID of the new installation by clicking 'Next'
The 'Server ID' of your cloned instance is stored in your database and can be verified as below:
1
select * from app_property;
This will return something like this:
1 2 3 4 5 6 7 8 9 10
select * from app_property; +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | prop_key | prop_value | +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | instance.name | Bitbucket Server | | instance.url | http://webserver64.acme.com:8080/bitbucket-webapp-1.3 | | license | Your License here | | server.id | Your Server ID here | | setup.completed | true | +-----------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
In order to change the value of your Bitbucket Server instance please stop your cloned instance. For multi-node Data Center instances, all nodes should be stopped. For further info, refer to Start and stop Bitbucket.
Using the the value of the
server.id
obtained on step #3, run this query on your cloned instance's DB:1
update app_property set prop_value = '<ID>' where prop_key = 'server.id';
You need to change <ID> in the above query with the new server id obtained on step #3. The format is 4 sets of 4 capitalized alpha numeric characters separated by hyphens. Example: BA8J-RYK8-ABC4-KK8N
The query above is valid for both MySQL and Postgres, you may need to update it according to the database available in your instance.
Restart your Bitbucket Server test instance. Restart all nodes for Data Center instances with multiple nodes. For further info, refer to Start and stop Bitbucket.
Was this helpful?