Start Free
10.7 | Instance administration | License administration

License administration

On this page

License manager

Starting in Developer Edition, you can access the license manager at Administration > Configuration > License Manager. If you're using Community Edition, see the "Retrieving the Server ID" section below.

You can use the license manager to retrieve your server ID (required for obtaining a license key) and configure your SonarSource-provided license key.

Retrieving the server ID

The server ID is always available on the License Manager page, as well as in the System Info section at Administration > System.

Setting a license

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.

Lines of code consumption

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 LOC.

For a given project, the LOCs that count towards License Usage are those of the largest branch (or pull request) found during the most recent analysis. Lines of test code do not count toward your License Usage. See the Lines of Code page for full details about how to monitor your LOC consumption and how the LOC is calculated in SonarQube.

Global administrator notifications

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.

Features included

This section of the License Manager page lists the commercial features that are enabled by the current license.

Staging licenses

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:
    1. Create a staging database and copy the production database into it.
    2. Connect your SonarQube staging instance to it.
    3. Start SonarQube and retrieve the generated server ID.
    4. Request your staging license key for this server ID.
    5. Set it up in the administration panel.
  • Synchronization on a regular basis:
    1. Empty the staging database and copy the production database into it.
    2. Start SonarQube.
    3. The server ID will be the same as generated the first time, so you can reuse the same license key.

Actions that will invalidate your 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.

When your license is invalidated due to a change of server ID, you can exceptionally extend it to benefit from a grace period of seven days. After this period, the license will remain not valid. Note that you can only do this once. 

In all cases, follow the steps below in Requesting a new license if your license key has been invalidated.

Requesting a new license

If your license key isn't working, send an email to contact@sonarsource.com that includes the following information:

  1. Server ID: Found under System Info at Administration > System
  2. SonarQube version: Found under System Info at Administration > System
  3. Clarify what current license (production/staging) and server ID this is replacing.
  4. 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 contact@sonarsource.com.

Support

Access to SonarSource Support

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.

Where to find your support information file from the SonarQube UI.

Was this page helpful?

© 2008-2024 SonarSource SA. All rights reserved. SONAR, SONARSOURCE, SONARLINT, SONARQUBE, SONARCLOUD, and CLEAN AS YOU CODE are trademarks of SonarSource SA.

Creative Commons License