How to Install SonarQube in Windows 10

SonarQube scans source code for bugs, security vulnerabilities, and code smells, and shows the results on a web dashboard. You can run it on a Windows 10 PC for local testing or a small team. There are two ways to install it: from the ZIP file, which runs directly on Windows with Java, or with Docker. This guide covers both, including the Java and database requirements that trip up most first installs.

Before You Start

  • Choose an edition. The free Community Build is enough for most individual projects. The paid SonarQube Server editions (Developer, Enterprise, Data Center) add features such as branch analysis and more languages. Get them from the official SonarQube downloads page.
  • Check Java. According to the SonarQube Server host requirements, the current SonarQube Server ZIP installation needs Java 21 or Java 25. Check the requirements page for the exact version you download, since the Community Build and older releases can differ. Install a supported JDK, such as Eclipse Temurin or Oracle JDK, and confirm with java -version in Command Prompt. Older guides that say “any Java” or Java 11 are out of date.
  • Check memory. SonarQube runs three Java processes, including Elasticsearch. Plan on at least 4 GB of free RAM for a small local instance, and more for real projects.
  • Know the deprecation. SonarSource now marks the ZIP installation as deprecated for SonarQube Server and recommends Docker for new installs. The ZIP still works, but expect it to be removed in a future release.

Method 1: Install from the ZIP File

Step 1: Download and Extract SonarQube

Download the ZIP for your edition and extract it to a short path without spaces, such as C:\sonarqube. Long or space-filled paths can cause startup problems.

Step 2: Set Up the Database (Optional for Testing)

SonarQube includes an embedded H2 database that works out of the box. The database documentation says it’s fine for tests but not for production. For real use, create a database in PostgreSQL, Microsoft SQL Server, or Oracle. MySQL isn’t supported. Then open conf\sonar.properties and fill in sonar.jdbc.url, sonar.jdbc.username, and sonar.jdbc.password.

Step 3: Start the Server

Open Command Prompt, go to C:\sonarqube\bin\windows-x86-64, and run StartSonar.bat. Leave the window open. Startup takes a minute or two. Wait until the log says SonarQube is operational.

Step 4: Sign In to the Dashboard

Open a browser and go to http://localhost:9000. Sign in with the default credentials admin / admin, as listed in Sonar’s ZIP installation guide. You’ll be asked to change the password right away.

Step 5: Analyze Your First Project

In the dashboard, create a project manually, generate a token, and choose your build tool. SonarQube shows the exact command to run, such as a Maven or Gradle command, or the standalone SonarScanner CLI for other languages. Run it from your project folder, and the results appear on the dashboard when the analysis finishes.

Method 2: Install with Docker

If you have Docker Desktop installed with the WSL 2 backend, you can run SonarQube without installing Java:

docker run -d --name sonarqube -p 9000:9000 sonarqube:community

Wait a minute, then open http://localhost:9000 and sign in with admin / admin. This uses the embedded database, so it’s for testing. For long-term use, connect a PostgreSQL container and add volumes so your data survives updates.

Run SonarQube as a Windows Service

With the ZIP install, the server stops when you close the Command Prompt window. To keep it running in the background, SonarQube includes a Windows service wrapper in the bin\windows-x86-64 folder. Follow the “Running as a service” steps in Sonar’s documentation for your version, and run the commands from an administrator Command Prompt.

Tips for Installing SonarQube on Windows 10

  • Keep SonarQube and its data on an SSD. Elasticsearch is sensitive to slow disks.
  • Change the admin password and create separate user tokens for each project.
  • Update SonarQube regularly, and back up the database before upgrading.
  • Windows 10 reached end of support in October 2025, so consider a supported Windows version or Docker host for anything long-term.

Troubleshooting

SonarQube Stops Right After Starting

Check the files in the logs folder, starting with sonar.log and es.log. The most common causes are an unsupported Java version, not enough memory, or a path with spaces. Run java -version and make sure it reports Java 21 or 25.

“Address Already in Use” or the Page Won’t Load

Another program is using port 9000. Close it, or set sonar.web.port=9001 in sonar.properties and restart.

Database Connection Errors

Double-check the JDBC URL, user name, and password in sonar.properties, and make sure the database server is running and accepts connections. Use a supported database version listed in the documentation.

“Elasticsearch Disk Watermark” Warnings

Elasticsearch stops writing when the disk is about 90% full. Free up space on the drive that holds SonarQube’s data folder.

Frequently Asked Questions

What is SonarQube used for?

It runs static code analysis to find bugs, vulnerabilities, security hotspots, duplicated code, and maintainability issues, and tracks code quality over time.

Do I need internet access for SonarQube?

Only to download it and its updates. Analysis runs locally on your server.

Can SonarQube analyze multiple languages?

Yes. It supports many languages, including Java, JavaScript, TypeScript, C#, Python, and more. Some languages are only available in paid editions.

Is SonarQube free?

The Community Build is free and open source. SonarQube Server editions and SonarQube Cloud have paid plans.

Can I install SonarQube on a virtual machine?

Yes, as long as the VM meets the memory and Java requirements.

Related: how to install JMeter on Windows 10.

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy