How to Install Sonarqube on Windows in 2025?
How to Install SonarQube on Windows in 2025
SonarQube is an open-source platform widely used for continuous inspection of code quality.
It performs automatic reviews to identify bugs, vulnerabilities, and code smells. In this guide, we'll walk you through the steps on how to install SonarQube on a Windows system in 2025.
Prerequisites
Before you begin, ensure you have the following prerequisites installed:
- Java JDK 17 or newer: SonarQube 2025 requires at least JDK 17. Download JDK.
- Database System: SonarQube supports several database systems, including PostgreSQL, MySQL, or Oracle. For this guide, we recommend using PostgreSQL.
- At least 4GB RAM: For optimal performance, ensure your system has sufficient memory.
- Latest Version of SonarQube: Make sure to download the latest SonarQube version from the official SonarQube website.
Step-by-step Installation Guide
1. Install and Configure Java
- Download and install the latest JDK 17 from the Oracle JDK downloads page.
- Set the
JAVA_HOME
environment variable. Go to System Properties > Environment Variables and addJAVA_HOME
pointing to your JDK installation directory.
2. Install PostgreSQL and Create Database
- Download and install PostgreSQL from the official website.
- During installation, set a password for the PostgreSQL user.
- Open
pgAdmin
, create a new database, and name itsonarqube
.
3. Download and Configure SonarQube
- Download the latest SonarQube zip file from the SonarQube website.
- Extract the SonarQube package to your desired directory.
- Navigate to the
conf
folder within the SonarQube directory and open thesonar.properties
file. - Configure database settings by updating the following properties:
sonar.jdbc.username=your_database_username sonar.jdbc.password=your_database_password sonar.jdbc.url=jdbc:postgresql://localhost:5432/sonarqube
4. Set Up SonarQube as a Windows Service
- Open
Command Prompt
as administrator. - Navigate to the
bin/windows-x86-64
directory in your SonarQube installation. - Run the following command to install the SonarQube service:
wrapper.exe install
5. Start the SonarQube Service
- In
Command Prompt
, navigate to the SonarQubebin/windows-x86-64
directory and execute:StartSonar.bat
- Open
http://localhost:9000
in your web browser to access the SonarQube dashboard.
Additional Resources
- SonarQube Backup Guide: Learn how to efficiently backup your SonarQube filters and settings.
- Develop Custom SonarQube Extensions: Explore ways to create custom plugins to extend SonarQube's functionality.
- Integrating SonarQube with Jenkins: Discover how to seamlessly integrate SonarQube into your Jenkins CI/CD pipeline.
Conclusion
By following these steps, you should have a running instance of SonarQube on your Windows system in 2025. SonarQube is a powerful tool for maintaining high code quality standards in your software projects. Make sure to explore the linked resources for further enhancements and integrations.
Remember to monitor the official SonarQube documentation for updates and best practices. Enjoy improving your code quality with SonarQube!
This article is structured to provide clear, step-by-step guidance for installing SonarQube on Windows in 2025 while remaining SEO-friendly with relevant keywords and useful internal and external links.