> ## Documentation Index
> Fetch the complete documentation index at: https://cockroachlabs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install CockroachDB on Windows

export const InternalLink = ({version, path = "", children, ...props}) => {
  let detectedVersion = version || "stable";
  if (typeof window !== 'undefined' && !version) {
    const match = window.location.pathname.match(/\/docs\/([^/]+)/);
    if (match) {
      detectedVersion = match[1];
    }
  }
  const normalizedPath = path.startsWith("/") ? path.slice(1) : path;
  return <a href={`/docs/${detectedVersion}/${normalizedPath}`} {...props}>
      {children}
    </a>;
};

<Tip>
  To try CockroachDB Cloud instead of running CockroachDB yourself, refer to the <InternalLink version="cockroachcloud" path="quickstart">Cloud Quickstart</InternalLink>.
</Tip>

<Danger>
  CockroachDB executable for Windows is experimental and not suitable for production deployments. Windows 8 or higher is required.
  Use one of the options below to install CockroachDB. To upgrade an existing cluster, refer to <InternalLink path="upgrade-cockroach-version">Upgrade to v23.2</InternalLink>.
</Danger>

## Download the executable

You can download and install CockroachDB for Windows in two ways. Either:

* **Recommended**: Visit <InternalLink version="releases" path="index?filters=windows">Releases</InternalLink> to download CockroachDB. The archive contains the `cockroach.exe` binary. Extract the archive and optionally copy the `cockroach.exe` binary into your `PATH` so you can execute <InternalLink path="cockroach-commands">cockroach commands</InternalLink> from any shell. Releases are rolled out gradually, so the latest version may not yet be downloadable.
* Instead of downloading the binary directly, you can use PowerShell to download and install CockroachDB:

1. Visit <InternalLink version="releases" path="index">Releases</InternalLink> and make a note of the full version of CockroachDB to install, such as . Releases are rolled out gradually, so the latest version may not yet be downloadable.
2. Save the following PowerShell script and replace the following:

* `VERSION`: the full version of CockroachDB to download, such as \`\`. Replace this value in both the `Invoke-WebRequest` statement and the `Copy-Item` statement.
* `{ INSTALL\_DIRECTORY }`: the local file path where the `cockroachdb.exe` executable will be installed. Replace the value in both the `Destination` argument and the `$Env:PATH` statement, which adds the destination directory to your `PATH`.

```powershell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
$ErrorActionPreference = "Stop";
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;$ProgressPreference = 'SilentlyContinue'; $null = New-Item -Type Directory -Force $env:appdata/cockroach;
Invoke-WebRequest -Uri https://binaries.cockroachdb.com/cockroach-VERSION.windows-6.2-amd64.zip -OutFile cockroach.zip;
Expand-Archive -Force -Path cockroach.zip;
Copy-Item -Force "cockroach/cockroach-VERSION.windows-6.2-amd64/cockroach.exe" -Destination $env:{ INSTALL\_DIRECTORY };$Env:PATH += ";$env:{ INSTALL\_DIRECTORY }"
```

1. Run the PowerShell script. To run a PowerShell script from a file, use syntax like:

```powershell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
powershell.exe -Command "{path\_to\_script}"
```

1. Check that the installation succeeded and that you can run `cockroach` commands:

```shell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
cockroach version
```

## Use Kubernetes

To orchestrate CockroachDB locally using [Kubernetes](https://kubernetes.io/), either with configuration files or the [Helm](https://helm.sh/) package manager, refer to <InternalLink path="orchestrate-a-local-cluster-with-kubernetes">Orchestrate a local cluster with Kubernetes</InternalLink>.

## Use Docker

<Danger>
  This section shows how to install CockroachDB on a Windows host using Docker. On a Linux or Windows Docker host, the image creates a Linux container.
  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.
  Docker images are [multi-platform images](https://docs.docker.com/build/building/multi-platform/) that contain binaries for both Intel and ARM. Multi-platform images do not take up additional space on your Docker host.
  Intel binaries can run on ARM systems, but with a significant reduction in performance.

  1. Install [Docker for Windows](https://docs.docker.com/docker-for-windows/install/).
     Docker for Windows requires 64-bit Windows 10 Pro and Microsoft Hyper-V. Refer to the [official documentation](https://docs.docker.com/docker-for-windows/install/#what-to-know-before-you-install) for more details. If your system does not satisfy the stated requirements, you can try using [Docker Toolbox](https://docs.docker.com/toolbox/overview/).
  2. In PowerShell, confirm that Docker is running in the background:

  ```powershell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  docker version
  ```

  If you see an error, verify your Docker for Windows installation, then try again.

  1. [Enable synchronized drive sharing](https://docs.docker.com/desktop/synchronized-file-sharing/) so you can mount local directories as data volumes to persist node data after containers are stopped or deleted.
     <a id="win-docker-step3-{{ page.version.name }}" /> 1. Visit [Docker Hub](https://hub.docker.com/layers//) and make a note of the full version of CockroachDB to pull. Releases are rolled out gradually, so the latest version may not yet be available. Using the `latest` tag is not recommended; to pull the latest release within a major version, use a tag like `latest-v23.2`. The following command always pulls the \`\` image.

  ```powershell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  docker pull :
  ```

  Keep up-to-date with CockroachDB releases and best practices:
</Danger>

## What's next?

* If you're just getting started with CockroachDB:
  * [Create a CockroachDB Cloud account](https://cockroachlabs.cloud/signup?experience=enterprise) where you can <InternalLink path="licensing-faqs">generate and manage licenses</InternalLink> for CockroachDB installations
  * <InternalLink path="start-a-local-cluster">Start a cluster locally</InternalLink> and talk to it via the built-in SQL client
  * <InternalLink path="learn-cockroachdb-sql">Learn more about CockroachDB SQL</InternalLink>
  * <InternalLink path="example-apps">Build a simple application</InternalLink> with CockroachDB using PostgreSQL-compatible client drivers and ORMs
  * <InternalLink path="demo-replication-and-rebalancing">Explore CockroachDB features</InternalLink> like automatic replication, rebalancing, and fault tolerance
* If you're ready to run CockroachDB in production:
  * Review the <InternalLink path="recommended-production-settings">Production Checklist</InternalLink>
  * <InternalLink path="manual-deployment">Deploy CockroachDB manually</InternalLink> or <InternalLink path="kubernetes-overview">use an orchestration system like Kubernetes</InternalLink>
