How to View the ClickHouse Open Source License

Galaxy Glossary

What open source license does ClickHouse use and how can I read it?

Run a simple SELECT on system.licenses to read ClickHouse’s Apache-2.0 license text from inside the database.

Sign up for the latest in SQL knowledge from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Description

Table of Contents

What open-source license does ClickHouse use?

ClickHouse is distributed under the permissive Apache License 2.0. You can read the full text directly from the server without leaving your SQL editor.

How do I display the license with SQL?

Query the built-in system.licenses table. It stores every license bundled with the binary—including Apache-2.0—so you always have the authoritative copy.

SELECT *
FROM system.licenses
WHERE name = 'Apache-2.0';

Can I filter by keywords inside the license?

Yes. The text column contains the entire license; use LIKE or a full-text search engine to locate clauses you care about.

SELECT line_number, line
FROM system.licenses
ARRAY JOIN splitByChar('\n', text) AS line
WHERE line ILIKE '%warranty%';

Why should I check the license in production?

Keeping the license file inside ClickHouse guarantees that every container, replica, or CI environment ships with the correct legal notice—critical for audits and compliance reports.

Best practices for license compliance

Automate a nightly job that exports the Apache-2.0 text to your documentation repository. Store the query in Galaxy Collections so teammates can endorse it as the canonical source.

What are common pitfalls?

Avoid assuming ClickHouse is GPL; its Apache-2.0 terms allow commercial redistribution. Don’t forget to include NOTICE files when re-packaging the server.

Quick reference

  • Table: system.licenses
  • Columns: name, text
  • Main clause: Apache-2.0 §4 (redistribution)
  • Storage: Same build that serves your queries

Why How to View the ClickHouse Open Source License is important

How to View the ClickHouse Open Source License Example Usage


-- Export Apache-2.0 license to your docs bucket
COPY (
    SELECT text
    FROM system.licenses
    WHERE name = 'Apache-2.0'
) TO '/var/lib/clickhouse/backups/apache_license.txt';

How to View the ClickHouse Open Source License Syntax


SELECT [columns]
FROM system.licenses
[WHERE name = 'Apache-2.0' | name LIKE '%GPL%']
[LIMIT n];

-- Practical ecommerce join example
SELECT l.name AS license_name,
       COUNT(*) AS product_count
FROM system.licenses AS l
CROSS JOIN Products AS p
WHERE l.name = 'Apache-2.0'
GROUP BY l.name;

Common Mistakes

Frequently Asked Questions (FAQs)

Is the Apache-2.0 license compatible with commercial use?

Yes. Apache-2.0 allows commercial redistribution provided you keep the license and NOTICE files intact.

Where is the system.licenses table stored?

It resides in the default system database and is populated at build time, so every ClickHouse instance carries its own license data.

Can I modify ClickHouse and keep the changes private?

You may distribute modified binaries under any terms, but you must still provide the Apache-2.0 license and retain copyright notices.

Want to learn about other SQL terms?

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.