Are encryption keys interchangeable?

If I generate an encryption key (Administration → Configuration → Encryption), can I use the key and anything encrypted with the key on another SonarQube server (identical version), assuming I copy the key file? IOW, is there any system-specific info embedded in the key that would preclude using it on a different server?

Also, if I click the “Generate New Secret Key” button, does that overwrite the existing key?

Basically, we have two servers. I want to use the key generator on server A to create a key and encrypt some secrets on server B, in order to minimize setup time on server B.

(I’m assuming the answer probably isn’t version-dependent, but just in case, we’re on 8.9 Community and upgrading to 9.9.)

Hi,

Your version is way past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. You should not upgrade to 9.9 and stop there. It’s already EOL. Your upgrade path is:

8.9.* → 9.9.8 → 2025.1

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

Regarding your question, I believe this should work. I haven’t tested it, but my understanding is that this is algorithmic & there’s no tie to your specific host that would cause it to not work on a different host.

 
HTH,
Ann