Change the server ID for an instance of Jira server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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 documentation applies to Jira Server installations. For cloud installations, please contact our support.
This page tells you how to obtain a new server ID to use in a test installation of a JIRA application. Please note this is not essential but is recommended. Your production installation will not be directly affected if your test server has the same server ID as production. However, application links may be affected if you do not change the server ID. The separate server ID also helps the support team to distinguish between your servers.
Server IDs are used in Application Links - this is tracked under.
- Changing a Server ID will break existing Application Links
- Two applications with the same Server ID may encounter problems when linked together or when linked through another application
This article is the current workaround for this bug:
If you would like to change the server ID on your test installation, you will need to acquire a new server ID for your test environment.
1) Acquire a new Server ID:
- Install a new, temporary instance of the JIRA application. See Installing JIRA applications. Make sure the installation points to a new, empty home directory and a new, empty database
Start the new, temporary instance. A new server ID will be created in the database.
Run the following query on your new database to retrieve the new ID:
select * from propertystring where id in (select id from propertyentry where PROPERTY_KEY='jira.sid.key');
2) Replace the Server ID on your instance:
Use this new server ID in your test instance. You need to change <ID> in the above query with the new server id. The format is 4 sets of 4 capitalized alpha numeric characters separated by hyphens. Example: BP8Q-WXN6-SKX3-NB5M
UPDATE propertystring SET propertyvalue = '<ID>' where id = (select id from propertystring where id in (select id from propertyentry where PROPERTY_KEY='jira.sid.key'));
(Please note that this SQL UPDATE command above will not work for MySQL environments. It tends to generate an error such as (ERROR 1093 (HY000): You can't specify target table 'propertystring' for update in FROM clause) As such there is an alternative query you can run to perform the same change:)
UPDATE propertystring SET propertyvalue = '<ID>' where id = (select id from propertyentry where PROPERTY_KEY='jira.sid.key');
Remove the OAuth host key from your test server using the SQL below. JIRA will generate a new OAuth host key as needed
DELETE FROM oauthconsumer WHERE consumerservice = '__HOST_SERVICE__';
- Restart your test server.
- Remove existing application links (If any) and re-add them back with the new Server ID