Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 37 ยท Getting Started

Editions and Hosting Options

Compare SonarQube Community Build, Developer, Enterprise and Data Center editions with SonarQube Cloud, and learn how lines of code are counted for licensing.

Before you install anything you choose between a self-hosted server and a hosted service, and between a free edition and a paid one. This lesson maps the options and gives you a way to decide. Product names and feature lists change from release to release, so treat the tables here as a mental model and confirm details in the official documentation.

Self-managed or cloud

SonarQube Server is software you run yourself, on a VM, in Docker or on Kubernetes. You control data location, upgrades and network access. Your code never leaves your infrastructure, which matters for strict security policies.

SonarQube Cloud (previously called SonarCloud) is the same family of analysis, hosted by the vendor. There is nothing to install or upgrade, it connects directly to GitHub, GitLab, Bitbucket and Azure DevOps, and you pay by plan. Scans still run in your CI; only the report is uploaded.

flowchart TD
  A["Need code analysis?"] --> B{"Must data stay<br/>on your network?"}
  B -- yes --> C["SonarQube Server<br/>(self-managed)"]
  B -- no --> D{"Want zero<br/>server upkeep?"}
  D -- yes --> E["SonarQube Cloud"]
  D -- no --> C
  C --> F{"Need branches, PR checks,<br/>or many languages?"}
  F -- yes --> G["Developer, Enterprise<br/>or Data Center"]
  F -- no --> H["Community Build"]

A first-pass decision flow.

The server editions

  • Community Build: free and open source. Good for learning, for personal projects and for small teams who mainly need the core rules on the main branch. It supports a smaller set of languages and has fewer governance features.
  • Developer Edition: adds the features most teams feel they need: analysis of branches and pull requests with decoration on your code host, more languages, and deeper security analysis such as taint analysis.
  • Enterprise Edition: adds portfolio management (roll-up views across many projects), reporting, project-level governance and more, aimed at organizations.
  • Data Center Edition: a clustered, highly available deployment for very large installations.

Paid editions are licensed by the number of lines of code analyzed. Pricing and exact feature differences are published by the vendor and change over time, so check the current comparison page before you decide.

If you are learning, start with Community Build in Docker (next lessons). You can read every concept in this track on it; only the branch and pull-request features need a paid edition or the cloud service.

How lines of code are counted

Licensing and the "lines of code" measure use ncloc: non-comment lines of code. Blank lines and comment lines do not count. Understanding this helps you estimate your size. The stand-in below counts ncloc for Python.

Python Count ncloc for a Python file (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Real SonarQube counts per language with the language's own lexer, so treat this as an approximation. For Python, docstrings count as comments, as in the stand-in.

Choosing by requirement

The next stand-in encodes the decision flow above as a function. Change the dictionary to see how different needs lead to a different recommendation. It is an illustration of the reasoning, not an official selector.

Python A simple option picker (stand-in)

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Other options that look similar

  • SonarQube for IDE (formerly SonarLint) is a free plugin that analyzes code as you type in VS Code, IntelliJ and others. It works alone or in connected mode with a server, so your IDE uses the same rules as your project. See Pull Request Analysis and IDEs.
  • Scanners are separate command-line tools or build plugins that are free regardless of edition.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which option fits a company whose source code must never leave its own network?

    A self-managed server keeps reports and code analysis results on your own infrastructure.
  2. 2. What does ncloc count?

    ncloc is non-comment lines of code; blank and comment lines are excluded.
  3. 3. Which feature typically needs a paid edition or the cloud service?

    Branch and pull-request analysis with decoration is part of Developer Edition and above, and of SonarQube Cloud.
  4. 4. Why should you check the official docs for edition details?

    Vendors rename products and move features between editions, so confirm the current comparison.

Summary

  • Choose self-managed SonarQube Server for control, or SonarQube Cloud for no upkeep.
  • Server editions: Community Build (free), Developer, Enterprise and Data Center.
  • Paid editions are licensed by lines of code (ncloc: non-comment lines).
  • Branch and pull-request analysis is a paid or cloud feature.
  • Start with Community Build to learn.

Next: Your First Analysis