Starting in Developer Edition, you can access the license manager at Administration > Configuration > License Manager.
You can use the license manager to retrieve your server ID (required for obtaining a license key) and configure your SonarSource-provided license key.
The server ID is specific to the current database system. Make sure to configure an external database for long-term use prior to requesting your license with this server ID.
The server ID is always available on the License Manager page, as well as in the System Info section at Administration > System.
If the database connection string is updated, the server ID will be re-generated and you'll need a new license. When it is generated, the server ID is unique. The same server ID will never be generated twice, even on the same SonarQube instance.
By clicking the Set new license button, you can set a new license to enable or disable features in SonarQube or to update your license.
Under Lines of Code, the gauge shows how many lines of code (LOC) you are currently scanning and how close you are to your limit. If you're near your limit, you may need to purchase additional LOCs.
For a given project, the lines of code that count towards license usage are those of the largest branch (or pull request). Lines of test code do not count toward your license usage.
- If a project has 100 lines of code on its main branch and 200 on a secondary branch, then the number of LOCs counted for the project is 200.
- If a project has 0 lines of code on its main branch (provisioned but never analyzed) and 200 on a secondary branch, then the number of LOCs counted is 200.
- If a project has 200 lines of code on its main branch and 100 on a secondary branch, then the number of LOCs counted is 200.
The license manager has two built-in notification mechanisms (notifications are sent to global administrators). Global administrators will get notifications when:
- The license is about to expire: a reminder is sent two months and again one month before your license expires.
- The configurable LOC threshold is exceeded: you can change this threshold using the indicator on the LOC gauge.
- A background job runs at server startup and then every 24 hours to check the LOC threshold and decide if a notification should be sent.
- The background job does not check the validity of SMTP server settings and whether the global administrator email addresses are set up. For global administrators to receive notifications, these settings need to be correctly configured before the LOC threshold is reached or exceeded.
This section of the License Manager page lists the commercial features that are enabled by the current license.
Staging licenses are only available in Enterprise Editions, Data Center Edition, or with commercial support.
Your commercial license may include one or more staging licenses. You can use these licenses for non-production instances to test new features, upgrades, new integrations, etc.
Our license mechanism supports regular synchronization between your production instance and staging instances. To set up synchronization:
- First Staging setup:
- Create a staging database and copy the production database into it.
- Connect your SonarQube staging instance to it.
- Start SonarQube and retrieve the generated server ID.
- Request your staging license key for this server ID.
- Set it up in the administration panel.
- Synchronization on a regular basis:
- Empty the staging database and copy the production database into it.
- Start SonarQube.
- The server ID will be the same as generated the first time, so you can reuse the same license key.
Certain actions will regenerate your server ID and invalidate your license key. The following are some of the most common of these actions:
- Moving, upgrading, or changing your database server to another host, available with a different IP or DNS name.
- Changing the existing database server IP or DNS name.
- Changing the database/schema name on the database server.
- Restoring the database content from another SonarQube instance (except for production/staging synchronization).
- Reinstalling SonarQube on an empty database.
- Using DBCopy or MySQL Migrator to copy your old database into a new one.
If you plan on going through one of these scenarios and you have commercial support, please open a support ticket beforehand to confirm the plan or explore alternatives.
In all cases, follow the steps below in Requesting a new license if your license key had been invalidated.
If your license key isn't working:
- Send an email to firstname.lastname@example.org that includes the following information:
- Server ID - Found under System Info at Administration > System
- SonarQube version - Found under System Info at Administration > System
- SonarQube edition
- Clarify what current license (production/staging) and server ID this is replacing.
- Confirm the status of the existing license.
A new license key will be issued within 1 business day once we receive an email with the needed information at email@example.com.
If your license entitles you to SonarSource support. A Support tab will appear at Administration > Support to guide you through interactions with SonarSource support.
This page also allows you to collect the support information file of your instance. Make sure to provide this file for any interaction with SonarSource Support.
© 2008-2023, SonarSource S.A, Switzerland. Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution-NonCommercial 3.0 United States License. SONARQUBE is a trademark of SonarSource SA. All other trademarks and copyrights are the property of their respective owners.