Install Cockroach DB on Windows 11 [Guide]
If you are getting started with distributed SQL databases, learning how to install CockroachDB on your Windows 11 PC is a great first step. CockroachDB is a modern, cloud native database system designed to handle large-scale applications with high availability and strong consistency. Many developers use it for scalable apps, testing environments, and learning distributed database concepts.
In this guide, you will learn how to download, install, configure, and run CockroachDB on Windows 11 step by step.
What is CockroachDB?
CockroachDB is a distributed SQL database designed for scalability, reliability, and fault tolerance. It combines traditional SQL support with modern distributed system architecture. Developers often compare it to PostgreSQL because it supports PostgreSQL-compatible SQL syntax.
Unlike traditional databases that rely on a single server, CockroachDB distributes data across multiple nodes. This makes it highly reliable and suitable for modern applications that require continuous uptime.
Some common use cases for CockroachDB include:
- Cloud applications
- Web applications
- Distributed systems
- Microservices
- Data-intensive applications
Even if you only plan to use it locally for development or learning, installing CockroachDB on Windows 11 helps you understand how distributed databases work in real-world environments.
System Requirements for Installing CockroachDB on Windows 11
Before installing CockroachDB on your Windows 11 computer, make sure your system meets the minimum requirements below. Having compatible hardware and software helps ensure smooth installation and stable database performance.
Operating System Requirements
- CockroachDB supports modern 64-bit versions of Windows. Your PC should be running: Windows 11 64-bit
- You can also run CockroachDB on Windows 10 64-bit
- Older 32-bit Windows versions are not supported.
- To check your Windows version:
- Go to > Settings > System > About
- Look under: System type
- You should see: 64-bit operating system
Processor Requirements
CockroachDB works best on modern processors that support 64-bit architecture.
- Minimum requirement: Dual-core processor
- Recommended: Intel Core i5 or newer, or AMD Ryzen processor
Even though CockroachDB can run on entry-level hardware, a faster processor improves query handling and local cluster performance.
RAM Requirements
Memory plays an important role in database performance.
- Minimum requirement: 4 GB RAM
- Recommended: 8 GB RAM or higher
- If you plan to run multiple databases, development tools, or local clusters simultaneously, additional RAM is highly recommended.
- To check available RAM: Go to > Settings > System > About
- Look under: Installed RAM
Storage Requirements
CockroachDB itself does not require a large storage space, but databases can grow over time depending on your usage.
- Minimum free storage: 2 GB available space
- Recommended: 10 GB or more SSD storage
Using an SSD instead of a traditional hard drive significantly improves database performance and startup speed.
Internet Connection
An internet connection is required for:
- Downloading CockroachDB
- Accessing official documentation
- Downloading updates
After installation, CockroachDB can run locally without internet access.
Required Permissions
You should have Administrator privileges on your Windows 11 PC for:
- Extracting files into system directories
- Editing PATH environment variables
- Allowing firewall access
Without administrator access, some installation steps may fail.
Terminal Requirements
CockroachDB commands are executed using a terminal application.
Supported terminal tools include:
- Windows Terminal
- Command Prompt
- PowerShell
Windows 11 already includes these tools by default, so no extra installation is normally required.
Optional Development Tools
Although not mandatory, many developers use CockroachDB alongside these tools:
- Docker Desktop
- Visual Studio Code
- DBeaver
- TablePlus
- PostgreSQL-compatible SQL clients
These tools help simplify database management and development workflows.
Install Cockroach DB on Windows 11

To install CockroachDB on Windows 11, download the Windows version from the official CockroachDB website, extract the ZIP file, move the folder to a preferred location, add CockroachDB to the Windows PATH environment variable, and then start the database server using Command Prompt or Windows Terminal. After installation, verify the setup by running the cockroach version command.
Now, let’s learn the detailed steps!
Step 1: Download CockroachDB for Windows 11
The first step is downloading the latest Windows version of CockroachDB from the official source.
- Open your preferred browser, such as Google Chrome, Microsoft Edge, or Mozilla Firefox.
- Go to > Browser > Official CockroachDB Download Page
- You can access the official website here: CockroachDB Official Website
- Once the page opens, look for the Download CockroachDB section. The website usually detects your operating system automatically and shows the correct Windows package.
- Download the Windows ZIP package for CockroachDB.
- The download file typically looks similar to this: cockroach-v25.x.x.windows-6.2-amd64.zip
- Wait for the file to finish downloading completely before moving to the next step.
- If your browser asks where to save the file, you can save it in: Go to > Downloads or Go to > Desktop
Saving it on the desktop makes it easier for beginners to find later.
Step 2: Extract the CockroachDB ZIP File
After downloading the ZIP file, you need to extract its contents before using the database.
- Open File Explorer > Downloads
- Locate the downloaded CockroachDB ZIP file.
- Right-click the ZIP file and select Extract All
- Windows 11 will now ask where you want to extract the files. You can either keep the default location or choose a custom folder.
- For beginners, a good location is: C:\CockroachDB
- Click Extract to continue.
- Windows will unpack all the files into a new folder. Once extraction is complete, open the extracted folder.
- Inside the folder, you will notice important files, including: cockroach.exe
This is the main executable file used to run CockroachDB commands.
You may also see additional folders and documentation files included with the installation package.
Step 3: Move the CockroachDB Folder to a Permanent Location
Although you can run CockroachDB directly from the Downloads folder, it is better to move it to a permanent location for long-term use.
- Open File Explorer > Downloads
- Copy the extracted CockroachDB folder.
- Now navigate to Local Disk (C:)
- Paste the folder into the C drive.
- For example, the final path may look like this: C:\CockroachDB\cockroach-v25.x.x.windows-6.2-amd64
Using a permanent location prevents accidental deletion and makes environment variable setup easier later.
If Windows asks for administrator permission while moving the folder, click Continue.
Step 4: Add CockroachDB to the Windows PATH Environment Variable
Adding CockroachDB to the PATH environment variable allows you to run CockroachDB commands from any terminal window without manually opening its folder every time.
This is one of the most important steps in the installation process.
- Open Start Menu > Search Bar
- Type: environment variables
- Click: Edit the system environment variables
- A new window called System Properties will appear.
- Click the Environment Variables button near the bottom.
- Under System variables, locate and select: Path
- Then click Edit.
- Inside the Path editor window, click New.
- Now, enter the path of the folder containing cockroach.exe.
For example:
C:\CockroachDB\cockroach-v25.x.x.windows-6.2-amd64
Click OK on all open windows to save the changes.
This step ensures Windows can recognize CockroachDB commands globally across Command Prompt and Windows Terminal.
Step 5: Verify the CockroachDB Installation
Now it is time to verify that CockroachDB was installed correctly.
- Open Start Menu > Windows Terminal
- You can also use Command Prompt if you prefer.
- Type the following command: cockroach version
- Press Enter.
- If the installation was successful, Windows will display version information for CockroachDB.
You may see output similar to this:
Build Tag: v25.x.x
Build Time: 2026
Platform: Windows amd64
This confirms that CockroachDB is properly installed and accessible from your system terminal.
If you receive an error like:
‘cockroach’ is not recognized as an internal or external command
Then the PATH variable was not configured correctly. In that case, restart your computer and try again. If the issue continues, review the PATH setup step carefully.
Step 6: Start a Local CockroachDB Cluster
After verifying the installation, you can start your first local CockroachDB instance.
- Open Start Menu > Windows Terminal
- Type the following command: cockroach start-single-node –insecure
- Press Enter.
- CockroachDB will now initialize and start a single-node local cluster on your Windows 11 PC.
- You may notice several startup messages in the terminal window. This is normal.
- When the server starts successfully, you will see important details such as:
- Web UI URL
- SQL connection address
- Listening ports
- Keep this terminal window open because CockroachDB is currently running inside it.
- The local admin dashboard usually becomes available at: http://localhost:8080
You can paste this address into your browser to access the CockroachDB admin interface.
Step 7: Connect to the CockroachDB SQL Shell
Now that the database server is running, you can connect to its built-in SQL shell.
- Open a new Windows Terminal window.
- Type the following command: cockroach sql –insecure
- Press Enter.
- You should now enter the CockroachDB interactive SQL environment.
- The terminal prompt will change to something like: root@localhost:26257/defaultdb>
- This means you are successfully connected to the database.
- You can now execute SQL commands directly.
For example, try:
SHOW DATABASES;
Press Enter.
CockroachDB will display available databases.
This confirms that the SQL interface is working correctly.
Step 8: Create Your First Database
Once connected to the SQL shell, you can create your own database.
- Type: CREATE DATABASE testdb;
- Press Enter.
- Now switch to the new database: USE testdb;
- You can also create tables inside the database.
For example:
CREATE TABLE users (
id INT PRIMARY KEY,
name STRING
);
Insert sample data:
INSERT INTO users VALUES (1, ‘Liam’);
Retrieve the data:
SELECT * FROM users;
If the data appears successfully, your CockroachDB installation is fully operational.
Step 9: Access the CockroachDB Web Admin Dashboard
CockroachDB includes a built-in web interface for monitoring cluster activity and database performance.
Open your browser and navigate to: http://localhost:8080
You can view:
- Node information
- Cluster activity
- SQL statistics
- Database metrics
- Performance data
This dashboard is especially useful for developers and database administrators who want to monitor system performance in real time.
Step 10: Stop the CockroachDB Server Properly
When you finish working with CockroachDB, it is important to stop the server properly.
Return to the terminal window running the database server.
Press: Ctrl + C
CockroachDB will begin shutting down safely.
Wait until the shutdown process completes fully before closing the terminal window.
This helps avoid data corruption or incomplete database operations.
Common Issues During Installation
Cockroach Command Not Working
This issue usually happens because the PATH environment variable is incorrect.
Double-check the folder path where cockroach.exe is located and make sure it was added properly.
Restarting Windows Terminal can also help refresh environment variables.
Windows Defender Blocking CockroachDB
Sometimes Windows Security may warn you when running database servers locally.
If prompted, select:
Allow Access
This allows CockroachDB to communicate through local network ports.
Port Already in Use Error
CockroachDB commonly uses ports: 26257 and 8080
If another application is using these ports, CockroachDB may fail to start.
You can either stop the conflicting application or specify different ports manually when starting CockroachDB.
FAQs
Is CockroachDB free to use on Windows 11?
Yes, CockroachDB offers a free version that developers and learners can use locally on Windows 11.
Does CockroachDB work offline?
Yes, once installed, CockroachDB can run completely offline on your local PC.
Can beginners use CockroachDB?
Absolutely. Beginners can use CockroachDB for learning SQL, distributed databases, and modern cloud native application development.
Is CockroachDB similar to PostgreSQL?
CockroachDB supports PostgreSQL-compatible SQL syntax, which makes it easier for PostgreSQL users to transition.
Do I need Docker to install CockroachDB?
No, Docker is optional. You can install and run CockroachDB directly on Windows 11 without Docker.
Can I use CockroachDB with programming languages?
Yes, CockroachDB supports integration with many programming languages, including:
- Python
- Java
- Node.js
- Go
- PHP
and more.
