docs: void init(boolean newInstall) throws IOException, InterruptedException {
          Jenkins jenkins = Jenkins.get();
          
          if(newInstall) {
              // this was determined to be a new install, don't run the update wizard here
              setCurrentLevel(Jenkins.getVersion());
              
              // Create an admin user by default with a 
              // difficult password
              FilePath iapf = getInitialAdminPasswordFile();
              if(jenkins.getSecurityRealm() == null || jenkins.getSecurityRealm() == SecurityRealm.NO_AUTHENTICATION) { // this seems very fragile
                  try (BulkChange bc = new BulkChange(jenkins)) {
                      HudsonPrivateSecurityRealm securityRealm = new HudsonPrivateSecurityRealm(false, false, null);
                      jenkins.setSecurityRealm(securityRealm);
                      String randomUUID = UUID.randomUUID().toString().replace("-", "").toLowerCase(Locale.ENGLISH);
      
                      // create an admin user
                      securityRealm.createAccount(SetupWizard.initialSetupAdminUserName, randomUUID);
      
                      // JENKINS-33599 - write to a file in the jenkins home directory
                      // most native packages of Jenkins creates a machine user account 'jenkins' to run Jenkins,
                      // and use group 'jenkins' for admins. So we allow groups to read this file
                      iapf.touch(System.currentTimeMillis());
                      iapf.chmod(0640);
                      iapf.write(randomUUID + System.lineSeparator(), "UTF-8");
                      
      
                      // Lock Jenkins down:
                      FullControlOnceLoggedInAuthorizationStrategy authStrategy = new FullControlOnceLoggedInAuthorizationStrategy();
                      authStrategy.setAllowAnonymousRead(false);
                      jenkins.setAuthorizationStrategy(authStrategy);
      
                      // Disable jnlp by default, but honor system properties
                      jenkins.setSlaveAgentPort(SystemProperties.getInteger(Jenkins.class.getName()+".slaveAgentPort",-1));
  
                      // require a crumb issuer
                      jenkins.setCrumbIssuer(new DefaultCrumbIssuer(SystemProperties.getBoolean(Jenkins.class.getName() + ".crumbIssuerProxyCompatibility",false)));
      
                      // set master -> slave security:
                      jenkins.getInjector().getInstance(AdminWhitelistRule.class)
                          .setMasterKillSwitch(false);
                  
                      jenkins.save(); // TODO could probably be removed since some of the above setters already call save
                      bc.commit();
                  }
              }
      
              if(iapf.exists()) {
                  String setupKey = iapf.readToString().trim();
                  String ls = System.lineSeparator();
                  LOGGER.info(ls + ls + "*************************************************************" + ls
                          + "*************************************************************" + ls
                          + "*************************************************************" + ls
                          + ls
                          + "Jenkins initial setup is required. An admin user has been created and "
                          + "a password generated." + ls
                          + "Please use the following password to proceed to installation:" + ls
                          + ls
                          + setupKey + ls
                          + ls
                          + "This may also be found at: " + iapf.getRemote() + ls
                          + ls
                          + "*************************************************************" + ls
                          + "*************************************************************" + ls
                          + "*************************************************************" + ls);
              }
          }
  
          try {
              // Make sure plugin metadata is up to date
              UpdateCenter.updateDefaultSite();
          } catch (Exception e) {
              LOGGER.log(Level.WARNING, e.getMessage(), e);
          }
      }