Skip to main content
This guide shows you how to install CockroachDB on your local machine. Choose your operating system below and follow the installation method that works best for you.
For production deployments, consider CockroachDB Cloud for a fully managed, enterprise-grade database service.

Choose your platform

CockroachDB on macOS is experimental and not suitable for production deployments.
The easiest way to install CockroachDB on macOS is using Homebrew. For CockroachDB v22.2.x and above, Homebrew installs binaries for your system architecture, either Intel or ARM (Apple Silicon).
1

Install Homebrew

If you don’t have Homebrew installed, install it first:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2

Install CockroachDB

brew install cockroachdb/tap/cockroach
3

Verify installation

cockroach version

Download the binary

Alternatively, you can download the CockroachDB binary directly:
1

Download the archive

Visit the Releases page and download the CockroachDB archive for your architecture (Intel or ARM).
2

Extract and install

Extract the archive and copy the binary to your PATH:
tar -xzf cockroach-{VERSION}.darwin-{ARCHITECTURE}.tgz
sudo cp -i cockroach-{VERSION}.darwin-{ARCHITECTURE}/cockroach /usr/local/bin/
3

Install spatial libraries (optional)

If you plan to use CockroachDB’s spatial features, install the GEOS libraries:
# Create the library directory
sudo mkdir -p /usr/local/lib/cockroach

# Copy the GEOS libraries
sudo cp -i cockroach-{VERSION}.darwin-{ARCHITECTURE}/lib/libgeos.dylib /usr/local/lib/cockroach/
sudo cp -i cockroach-{VERSION}.darwin-{ARCHITECTURE}/lib/libgeos_c.dylib /usr/local/lib/cockroach/
4

Verify spatial features

Start a demo cluster and test spatial queries:
cockroach demo
In the SQL shell:
SELECT ST_IsValid(ST_MakePoint(1,2));
You should see:
st_isvalid
--------------
true
(1 row)

Use Docker

Run CockroachDB in a Docker container:
docker pull cockroachdb/cockroach:latest-v25.3

Limitations

On macOS ARM systems, spatial features are currently disabled due to code signing issues with GEOS libraries. Use the Intel binary or Docker container if you need spatial features.

What’s next?

Now that you have CockroachDB installed:

Start a local cluster

Run a multi-node CockroachDB cluster on your local machine

Quickstart guide

Get up and running with your first SQL commands

Learn CockroachDB SQL

Learn the SQL dialect used by CockroachDB

Build a sample app

Connect your application to CockroachDB

Build docs developers (and LLMs) love