2 instances of Sonar on same machine 2 instances of Sonar on same machine jenkins jenkins

2 instances of Sonar on same machine


Yes, you can. Just make sure the following variables are unique:

  1. conf/wrapper.conf

    • wrapper.ntservice.name=SonarQube[version]
  2. conf/sonar.properties

    • sonar.web.port=[unique port]
    • sonar.jdbc.url=jdbc:postgresql://localhost/sonar[version] #(in case you have a postgresql db)


If you want to run 2 instances of sonar in the same machine make sure to have uniqu values in conf/sonar.properties for below properties.

sonar.jdbc.url=<db_url>sonar.web.port=<default value would be 9000>sonar.search.port=<default value would be 9001>

However, above properties are associated with below properties as well. Change them if needed accordingly,

sonar.jdbc.username=<db_username>sonar.jdbc.password=<db_password>sonar.web.host=<default value would be localhost>