> ## 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>
  <InternalLink path="install-cockroachdb-mac">Mac</InternalLink>
  <InternalLink path="install-cockroachdb-linux">Linux</InternalLink>
  Windows
  To try CockroachDB Cloud instead of running CockroachDB yourself, refer to the <InternalLink version="cockroachcloud" path="quickstart">Cloud Quickstart</InternalLink>.
  **This page refers to CockroachDB v26.1.**
  **Warning:** 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 v26.1</InternalLink>.
</Tip>

## 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 v26.1.1. 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 `v26.1.1`. 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 using [Kubernetes](https://kubernetes.io/), use the official [CockroachDB operator](cockroachdb-operator-overview.html#cockroachdb-operator).

You can evaluate a CockroachDB Kubernetes deployment on a local machine with [minikube](https://minikube.sigs.k8s.io/docs/start/).

## 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.
  **Note:**
  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/).
     **Note:**
     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/cockroachdb/cockroach/) 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-v26.1`. The following command always pulls the `v26.1.1` image.

  ```powershell theme={"theme":{"light":"catppuccin-mocha","dark":"catppuccin-mocha"}}
  docker pull cockroachdb/cockroach:v26.1.1
  ```

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

## What's next?
