setting-up-local-cluster
Skill4 starsChanged 5 months agoApache-2.0View on GitHub
Downloads and starts a local CockroachDB cluster for development using the official binary. Use when a developer needs a local CockroachDB instance, when no cluster is available, or when setting up a new development environment.
- Deletes or force-pushes
1 other project uses a version of this.
Adopted by
Most recently taken up by
- DineshKumar8399/aegis-governed-memory-fleetword for word, first seen Aug 18, 2026
Other versions1 project uses a version of this.
Word for word · 1
- DineshKumar8399/aegis-governed-memory-fleet★ 0100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- benchmarking-transaction-patternsSkill
- designing-application-transactionsSkill
- designing-multi-region-applicationsSkill
- analyzing-range-distributionSkill
- analyzing-schema-change-storage-riskSkill
- auditing-table-statisticsSkill
- monitoring-background-jobsSkill
- profiling-statement-fingerprintsSkill
- profiling-transaction-fingerprintsSkill
- triaging-live-sql-activitySkill
- molt-fetchSkill
- molt-replicatorSkill
- molt-verifySkill
- managing-certificates-and-encryptionSkill
- managing-cluster-capacitySkill
- managing-cluster-settingsSkill
- performing-cluster-maintenanceSkill
- provisioning-cluster-for-productionSkill
- reviewing-cluster-healthSkill
- upgrading-cluster-versionSkill
- cockroachdb-sqlSkill
- auditing-cis-benchmarkSkill
- auditing-cloud-cluster-securitySkill
- configuring-audit-loggingSkill
- configuring-ip-allowlistsSkill
- configuring-log-exportSkill
- configuring-private-connectivitySkill
- configuring-sso-and-scimSkill
- enabling-cmek-encryptionSkill
- enforcing-password-policiesSkill
- hardening-user-privilegesSkill
- managing-tls-certificatesSkill
- preparing-compliance-documentationSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
No CockroachDB cluster is reachable
- Very specific: line 52
If cockroach is already on PATH, skip the download.
- Very specific: line 152
Place at ~/.cockroachdb/bin/cockroach or any PATH location
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Setting Up a Local CockroachDB Cluster
Guides you through downloading, installing, and starting a local CockroachDB cluster for development. Uses the official binary -- no Docker or external runtime dependencies required.
When to Use This Skill
- Developer asks to "set up CockroachDB" or "start a local database"
- No CockroachDB cluster is reachable
- Developer wants to build an app with CockroachDB from scratch
- Setting up a new development environment
Prerequisites
- macOS (Intel or Apple Silicon), Linux (Intel or ARM), or Windows (Intel)
curlorwgetavailable for downloading the binary- ~500 MB disk space per node
- Ports 26257-26259 (SQL), 26357-26359 (RPC), and 8080-8082 (DB Console) available for a 3-node cluster
Step 1: Detect Platform and Download
Detect the OS and architecture, then download the appropriate binary.
Download URLs
Base URL: https://binaries.cockroachdb.com/
| OS | Architecture | Filename Pattern |
| Linux | Intel (amd64) | cockroach-v{VERSION}.linux-amd64.tgz |
| Linux | ARM (arm64) | cockroach-v{VERSION}.linux-arm64.tgz |
| macOS | Intel (amd64) | cockroach-v{VERSION}.darwin-10.9-amd64.tgz |
| macOS | Apple Silicon (arm64) | cockroach-v{VERSION}.darwin-11.0-arm64.tgz |
| Windows | Intel (amd64) | cockroach-v{VERSION}.windows-6.2-amd64.zip |
Replace {VERSION} with the desired release (e.g., 25.4.9). See CockroachDB Releases for the latest GA version.
Installation
# Example: macOS Apple Silicon, v25.4.9
curl -fsSL https://binaries.cockroachdb.com/cockroach-v25.4.9.darwin-11.0-arm64.tgz | tar xz
mkdir -p ~/.cockroachdb/bin
cp cockroach-v25.4.9.darwin-11.0-arm64/cockroach ~/.cockroachdb/bin/
export PATH="$HOME/.cockroachdb/bin:$PATH"If cockroach is already on PATH, skip the download.
Step 2: Start the Cluster
A 3-node cluster is recommended for development because it exercises replication, range distribution, leaseholder balancing, and survival goals -- core CockroachDB capabilities that a single node cannot demonstrate.
3-Node Cluster (Recommended)
# Start 3 nodes with separate SQL, RPC, and HTTP ports.
# Use $HOME instead of ~ in --store / --log-dir / --pid-file: tilde does not
# expand inside --flag=~/... in bash or zsh.
cockroach start --insecure --listen-addr=localhost:26357 --sql-addr=localhost:26257 \
--http-addr=localhost:8080 --store=$HOME/.cockroachdb/data/node1 \
--log-dir=$HOME/.cockroachdb/logs/node1 \
--pid-file=$HOME/.cockroachdb/data/node1/cockroach.pid \
--join=localhost:26357,localhost:26358,localhost:26359 --background
cockroach start --insecure --listen-addr=localhost:26358 --sql-addr=localhost:26258 \
--http-addr=localhost:8081 --store=$HOME/.cockroachdb/data/node2 \
--log-dir=$HOME/.cockroachdb/logs/node2 \
--pid-file=$HOME/.cockroachdb/data/node2/cockroach.pid \
--join=localhost:26357,localhost:26358,localhost:26359 --background
cockroach start --insecure --listen-addr=localhost:26359 --sql-addr=localhost:26259 \
--http-addr=localhost:8082 --store=$HOME/.cockroachdb/data/node3 \
--log-dir=$HOME/.cockroachdb/logs/node3 \
--pid-file=$HOME/.cockroachdb/data/node3/cockroach.pid \
--join=localhost:26357,localhost:26358,localhost:26359 --background
# Initialize the cluster (only needed on first start)
cockroach init --insecure --host=localhost:26357Single-Node (Lightweight)
For minimal resource usage when full cluster capabilities are not needed:
cockroach start-single-node --insecure --listen-addr=localhost:26257 \
--http-addr=localhost:8080 --store=$HOME/.cockroachdb/data/node1 \
--log-dir=$HOME/.cockroachdb/logs/node1 \
--pid-file=$HOME/.cockroachdb/data/node1/cockroach.pid --backgroundStep 3: Verify the Cluster
# Check SQL connectivity
cockroach sql --insecure --host=localhost:26257 -e "SELECT version();"
# Verify all nodes joined (3-node cluster)
cockroach node status --insecure --host=localhost:26257
# Check replication factor (should show num_replicas = 3)
cockroach sql --insecure --host=localhost:26257 \
-e "SHOW ZONE CONFIGURATION FOR RANGE default;"Connection Details
| Property | Value |
| SQL URL | postgresql://root@localhost:26257/defaultdb?sslmode=disable |
| DB Console | http://localhost:8080 |
| User | root (no password in insecure mode) |
| Database | defaultdb |
Environment Variables for MCP Toolbox
export COCKROACHDB_HOST=localhost
export COCKROACHDB_PORT=26257
export COCKROACHDB_USER=root
export COCKROACHDB_PASSWORD=
export COCKROACHDB_DATABASE=defaultdb
export COCKROACHDB_SSLMODE=disableStopping the Cluster
# Graceful shutdown via PID files
kill $(cat $HOME/.cockroachdb/data/node1/cockroach.pid) 2>/dev/null
kill $(cat $HOME/.cockroachdb/data/node2/cockroach.pid) 2>/dev/null
kill $(cat $HOME/.cockroachdb/data/node3/cockroach.pid) 2>/dev/nullDestroying All Data
rm -rf $HOME/.cockroachdb/data $HOME/.cockroachdb/logsAir-Gapped / Restricted Environments
For environments without internet access:
- Pre-download the binary on an allowed machine
- Transfer to the target machine via approved channels
- Place at
~/.cockroachdb/bin/cockroachor any PATH location
What a 3-Node Cluster Enables
| Capability | Single Node | 3-Node |
| SQL execution | Yes | Yes |
| Replication (num_replicas=3) | No | Yes |
| Range distribution | No | Yes |
| Leaseholder balancing | No | Yes |
| Node failure simulation | No | Yes |
SHOW RANGES with real distribution | No | Yes |
Survival goals (SURVIVE ZONE FAILURE) | No | Yes |
| Contention between nodes | No | Yes |
Safety Considerations
- The cluster runs in insecure mode (no TLS, no authentication) -- suitable for local development only.
- Data persists in
$HOME/.cockroachdb/dataacross restarts. - The binary and data are user-local (
~/.cockroachdb/) -- nosudoor system modifications. - A 3-node cluster uses approximately 750 MB of RAM total.
References
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

