All versions of CockroachDB starting from the release date of 24.3.0 onward, including patch fixes for versions 23.1-24.2 from that date onward, are made available under the CockroachDB Software License. You can use the dropdown menu at the top of the page to view documentation for other versions.
License options
The table of licenses below refers to options for self-hosted deployments. All Cloud deployments automatically have a valid Enterprise license.
Type | Description |
---|---|
Enterprise | This paid license allows usage of all CockroachDB features in accordance with the terms specified in the CockroachDB Software License. License must be renewed annually or as negotiated. Support levels available include Enterprise or Essential. |
Enterprise Free | Same functionality as Enterprise, but free of charge for businesses with less than $10M in annual revenue. Clusters will be throttled after 7 days without sending telemetry. License must be renewed annually. Support level available is Community (i.e., Docs, Forum, Slack). |
Enterprise Trial | A 30 day self-service trial license. Telemetry is required during the trial. Clusters will be throttled after 7 days without sending telemetry. Telemetry can be disabled once the cluster is upgraded to a paid Enterprise license. Support level available during trial is Community (i.e., Docs, Forum, Slack). |
Contact Sales if you want to try CockroachDB without telemetry requirements or if you require an extended trial period.
Note that:
- Clusters with no license key have a 7-day grace period before requiring a license key. This is useful for ephemeral development clusters.
- No license key is required for developers running single-node clusters.
Obtain a license
To obtain a paid Enterprise license, contact Sales.
To obtain an Enterprise Free or Enterprise Trial license, take the following steps:
- Point your web browser to the CockroachDB Cloud Console and log in as an account with Organization Admin permissions.
- Select Organization » Enterprise Licenses from the nav bar dropdown. This will bring you to the Enterprise Licenses page, which shows a (possibly empty) list of licenses and their keys, with information about the status of each.
- Click the Create License button. This will bring you to a page called Get started with CockroachDB Enterprise.
- On this page, you will create an Enterprise Trial license or an Enterprise Free license.
- To create an Enterprise Trial license:
- Fill in the form with the required information.
- Click the Continue button.
- Select the checkbox to agree to the Terms & Conditions of the CockroachDB Software License.
- Click the Generate License Key button. You will be redirected to the Enterprise Licenses page, where you can start using the key.
- To create an Enterprise Free license:
- Fill in the form with the required information.
- Toggle the switch called Find out if my company qualifies for an Enterprise Free license.
- Fill out the additional information.
- Click the Continue button.
- Note that at this stage, you may not qualify for the Enterprise Free license. If so, you will be given an Enterprise Trial license.
- Select the checkbox to agree to the Terms & Conditions of the CockroachDB Software License.
- Click the Generate License Key button. You will be redirected to the Enterprise Licenses page, where you can start using the key.
- To create an Enterprise Trial license:
You will not be able to create more than one Enterprise Trial license per day. If you try, the UI will prevent you from proceeding, and the following message will be displayed:
A new Enterprise Trial license cannot be created at this time because one was recently created. Tell us more about your intended use to find out if you qualify for an Enterprise Free license, or create a new one after ${DATE}.
For quick local testing of Enterprise features, you can run a single-node cluster.
Set a license
Start the cockroach sql
shell. As the root
user, use the SET CLUSTER SETTING
statement to set the license key:
SET CLUSTER SETTING enterprise.license = 'xxxxxxxxxxxx';
You cannot apply an Enterprise Trial license more than once to the same cluster.
Verify a license
To verify a license, open the built-in SQL shell and use the SHOW CLUSTER SETTING
command to check the license key:
SHOW CLUSTER SETTING enterprise.license;
enterprise.license
+-------------------------------------------+
crl-0-ChB1x...
(1 row)
The license setting is also logged in the cockroach.log
on the node where the command is run:
cat cockroach.log | grep license
I171116 18:11:48.279604 1514 sql/event_log.go:102 [client=[::1]:56357,user=root,n1] Event: "set_cluster_setting", target: 0, info: {SettingName:enterprise.license Value:xxxxxxxxxxxx User:root}
Monitor for license expiry
You can monitor the time until your license expires in the following ways:
- Prometheus: The
seconds_until_enterprise_license_expiry
metric reports the number of seconds until the license on a cluster expires. It will report0
if there is no license, and a negative number if the license has already expired. For more information, see Monitoring and Alerting. - DB Console: Several license expiration messages may be displayed, depending on the status of your cluster's license.
- CockroachDB Cloud Console: If you have an Enterprise Free or Enterprise Trial cluster, you will see notifications in the Enterprise Licenses section, as well as receive notification emails sent to users with Organization Admin permissions.
- CockroachDB emits log messages when a cluster is at risk of being throttled due to license expiration or telemetry requirements. The database will also return notices to SQL clients or applications that try to execute transactions.
During the transition to the CockroachDB Software License, expiration behavior (including throttling) will work as follows depending on your version of CockroachDB.
For v23.1.29, v23.2.15, v24.1.7, v24.2.5, and v24.3.0 and later, clusters will behave as described in this documentation.
For versions less than or equal to v23.1.28, v23.2.14, v24.1.6, and v24.2.4, the behavior will be as follows:
- Enterprise Trial and Enterprise Free licenses will work as expected when you set a license.
- However, the expiration behavior will be different. Clusters running these versions won't be throttled; instead, the Enterprise features will immediately stop working at license expiration.
Renew an expired license
To renew an expired Enterprise license, contact Sales and then set the new license.
To renew an expired Enterprise Free license, follow the steps in Obtain a license.
FAQs
Can I host CockroachDB as a service for internal use at my organization?
Yes, employees and contractors can use your internal CockroachDB instance as a service, but no people outside of your organization will be able to use it without purchasing a license.
What constitutes hosting CockroachDB as a service?
Hosting CockroachDB as a service means creating an offering that allows third parties (other than your employees and contractors) to operate a database. Specifically, third parties cannot modify table schemas.
What is throttling and how does it work?
When a cluster is being throttled, the number of concurrent open SQL transactions is limited to 5.
This will happen in the following cases:
- The cluster is not following telemetry requirements.
- There is a 7 day grace period for Enterprise Free and Enterprise Trial clusters to (re)start sending telemetry. This applies when the license is first added, or any time there is an interruption in telemetry.
- The cluster has an expired license key; depending on the type of expired license, the cluster will be throttled after the following time periods:
- Enterprise: Never throttles
- Enterprise Free: Throttles 30 days after expiration
- Enterprise Trial: Throttles 7 days after expiration
- The cluster was running an earlier version of CockroachDB which supported the license known as "CockroachDB Core" and has just been patch upgraded to a version of CockroachDB which is available under the CockroachDB Software License. Such clusters get a 30 day grace period before being throttled to de-risk impact to production environments.
If no valid license key is ever entered, the cluster will be throttled 7 days after cluster initialization.
Single-node clusters for development use are not throttled.
Can I use CockroachDB for academic research?
Cockroach Labs encourages non-commercial academic research involving CockroachDB. For such projects, obtain an Enterprise Free license.
Do I need a license key for running a single node cluster?
No license key is required for developers running single-node clusters using the following cockroach
commands:
Single-node clusters are not throttled.
Generally, single-node clusters used for design, prototyping, testing, or development purposes in non-production, internal development environments do not require a license key.