Install a plugin
There are two ways to install plugins in SonarQube:
- Marketplace: With Community Edition, you can automatically install plugins from the Administration > Marketplace tab. With Commercial Editions, you can browse plugins in the Marketplace, but you must manually install and update your plugins.
- Manual Installation: You need to manually install plugins when using any commercial edition of SonarQube. You can also manually install plugins if your SonarQube instance doesn't have internet access, or if the plugin you're installing isn't in the SonarQube Marketplace.
Plugins are not provided by SonarSource; therefore, you install them at your own risk. A SonarQube administrator needs to acknowledge this risk in the Marketplace before installing plugins or when prompted in SonarQube after installing a plugin manually.
Installing plugins from the marketplace
You can only install and update plugins from the Marketplace in SonarQube Community Edition. With commercial editions, you need to manually install and update plugins.
If your instance has internet access and you're connected with a SonarQube user with the Administer System global permission, you can find the Marketplace at Administration > Marketplace. From here:
- Find the plugin you want to install.
- Click Install and wait for the download to be processed.
Once the download is complete, a Restart button will be available to restart your instance. Restarting will enable the new plugin. This restart will not take into account any change to sonar-properties settings.
See Marketplace for more details on how to configure your SonarQube Server to connect to the internet.
Manually installing plugins
To manually install a plugin:
- Download the plugin you want to install. The version needs to be compatible with your SonarQube version.
- Put the downloaded jar in
<SONARQUBE_HOME>/extensions/plugins
, and remove any previous versions of the same plugins. - Restart your SonarQube server.
Uninstalling plugins
To uninstall a plugin:
- Delete the plugin from the
<SONARQUBE_HOME>/extensions/plugins
folder. - Restart your SonarQube server.
Install plugins under Docker
When running SonarQube under Docker, any plugin you want to install must also be copied into the Docker volume you create during installation. See the Installing SonarQube from the Docker image article in our documentation for more details about creating the volume and container.
Manually install a plugin in a SonarQube docker container
Let’s assume that your SonarQube docker container is called sonarqube
. The easiest way to install manually a plugin in the container is the following.
- Check if an existing version of the plugin exists. Run
docker exec sonarqube bash -c 'ls "$SONARQUBE_HOME"/extensions/plugins'
to see the entire list of plugins that are installed manually. - If a previous version of the plugin is listed, remove it using
docker exec sonarqube bash -c 'rm "$SONARQUBE_HOME"/extensions/plugins/<PLUGIN_JAR_FILE_NAME>'
- Install the new plugin using
docker exec sonarqube bash -c 'wget <PLUGIN_JAR_URL> -P "$SONARQUBE_HOME"/extensions/plugins/'
- Restart the SonarQube docker container using
docker restart sonarqube
Please note that if you have followed the guidelines outlined on this page, the resulting plugin will be available in the sonarqube_extensions
volume, which is attached to the <SONARQUBE_HOME>/extensions/plugins
folder.
Was this page helpful?