Install CockroachDB on Windows

On this page Carat arrow pointing down
Warning:
CockroachDB v20.1 is no longer supported as of November 12, 2021. For more details, refer to the Release Support Policy.

See Release Notes for what's new in the latest release, v20.1.17. To upgrade to this release from an older version, see Cluster Upgrade.

Tip:
To deploy a free CockroachDB Cloud cluster instead of running CockroachDB yourself, see the Quickstart.

Install options

Use one of the options below to install CockroachDB.

Download the executable

Warning:
The CockroachDB executable for Windows is experimental and not suitable for production deployments. Windows 8 or higher is required.
  1. Download and extract the CockroachDB v20.1.17 archive for Windows.

  2. To ensure that CockroachDB can use location-based names as time zone identifiers, download Go's official zoneinfo.zip and set the ZONEINFO environment variable to point to the zip file.

  3. Open PowerShell, navigate to the directory containing the executable, and make sure it works:

    icon/buttons/copy
    PS C:\cockroach-v20.1.17.windows-6.2-amd64> .\cockroach.exe version
  4. Keep up-to-date with CockroachDB releases and best practices:

Use Kubernetes

To orchestrate CockroachDB locally using Kubernetes, either with configuration files or the Helm package manager, see Orchestrate CockroachDB Locally with Minikube.

Use Docker

Warning:
Running a stateful application like CockroachDB in Docker is more complex and error-prone than most uses of Docker. Unless you are very experienced with Docker, we recommend starting with a different installation and deployment method.
  1. Install Docker for Windows.

    Docker for Windows requires 64bit Windows 10 Pro and Microsoft Hyper-V. Please see the official documentation for more details. Note that if your system does not satisfy the stated requirements, you can try using Docker Toolbox.
  2. Open PowerShell and confirm that the Docker daemon is running in the background:

    icon/buttons/copy
    PS C:\Users\username> docker version

    If you do not see the server listed, start Docker for Windows.

  3. Share your local drives. This makes it possible to mount local directories as data volumes to persist node data after containers are stopped or deleted.

  4. Pull the image for the v20.1.17 release of CockroachDB from Docker Hub:

    icon/buttons/copy
    PS C:\Users\username> docker pull cockroachdb/cockroach:v20.1.17
  5. Keep up-to-date with CockroachDB releases and best practices:

What's next?

Note:
By default, each node of a CockroachDB cluster periodically shares anonymous usage details with Cockroach Labs. For an explanation of the details that get shared and how to opt-out of reporting, see Diagnostics Reporting.

Yes No
On this page

Yes No