Copying Jenkins home gives duplicate instance ids


  • Copying JENKINS_HOME causes duplicate instance ids.
  • Multiple masters same instance id
  • Create/regenerate a new instance id.


  • CloudBees Jenkins Enterprise
  • CloudBees Jenkins Operations Center
  • Jenkins + Nectar License plugin


If you need to duplicate a Jenkins instance by copying the entire JENKINS_HOME it will lead to duplicate instance ids. You can re-create the instance id for the new Jenkins installation by doing the following:

  1. Stopped the Jenkins instance.
  2. cd to $JENKINS_HOME
  3. Delete the current secret.key file: rm secret.key
  4. Delete the license.xml file: rm license.xml
  5. Start Jenkins again.

Going to Manage Jenkins > Manage License (or JENKINS_URL/license) will display a new instance id.

Have more questions? Submit a request


  • 1
    Alexander Ost

    It seems that some additional steps are required when copying a JENKINS_HOME of a CJEE master that's connected to CJOC. I had to force-push a new clienst master connection from cjoc side to get the copy running properly.

    Edited by Alexander Ost
  • 0
    Brian Vandegriend

    I tried these steps with Jenkins 2.7.19 and it doesn't work (I'm not using Operation center). 

    I deleted the secrets.key file along with license.xml. When I restarted the Jenkins service on the test server, I got this fatal error: "An error occurred: Default update site connectivity check failed with fatal error: Cannot check connection status of the update site with ID='cje-offline'." 


Please sign in to leave a comment.