Clusters & Networks
Solana runs multiple clusters - independent blockchains with their own validator sets, genesis hashes, and token economics. Picking the right cluster keeps your development safe and predictable.
Search across all documentation pages
Solana runs multiple clusters - independent blockchains with their own validator sets, genesis hashes, and token economics. Picking the right cluster keeps your development safe and predictable.
Quick-reference recipe card - copy-paste ready.
# Point CLI at a cluster
solana config set --url devnet
solana config set --url https://api.mainnet-beta.solana.com
# Verify current cluster
solana config get
# Start a local Agave 4.1.1 validator
solana-test-validator --resetWhen to reach for this:
#!/bin/bash
# devnet-workflow.sh - Solana CLI 3.0.10
set -e
# 1. Configure devnet
solana config set --url devnet
echo "Cluster: $(solana config get | grep 'RPC URL')"
# 2. Create a dev wallet
solana-keygen new --no-bip39-passphrase -o ./dev-keypair.json --force
PUBKEY=$(solana-keygen pubkey ./dev-keypair.json)
echo "Wallet: $PUBKEY"
# 3. Fund from faucet
solana airdrop 2 ./dev-keypair.json
solana balance ./dev-keypair.json
# 4. Verify genesis matches devnet
solana genesis-hash
# devnet genesis: EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBGimport { createSolanaRpc } from "@solana/kit";
// RPC URL must match the cluster where your accounts live
const devnet = createSolanaRpc("https://api.devnet.solana.com");
const mainnet = createSolanaRpc("https://api.mainnet-beta.solana.com");
const { value: version } = await devnet.getVersion().send();
console.log("Agave version:", version["solana-core"]);What this demonstrates:
config set --url determines where all subsequent commands send transactions| Cluster | Purpose | SOL | Airdrop | Stability |
|---|---|---|---|---|
| devnet | App development | Test (no value) | Yes | Moderate |
| testnet | Validator/protocol testing | Test | Yes | Lower |
| mainnet-beta | Production | Real value | No | Highest |
| localnet | Local solana-test-validator | Unlimited local | N/A | You control it |
# Fresh ledger, default ports
solana-test-validator --reset
# Clone a mainnet program for local testing
solana-test-validator --clone-upgradeable-program <PROGRAM_ID> --url mainnet-beta
# Point CLI at local validator
solana config set --url http://127.0.0.1:8899// In tests, use LiteSVM 0.6.x or Surfpool 0.12.0 for programmatic local clusters
// Anchor test with Surfpool:
// [scripts]
// test = "npx surfpool run anchor test"declare_id! per deployment.| Alternative | Use When | Don't Use When |
|---|---|---|
solana-test-validator | Full local control, fast iteration | You need mainnet program state |
| Surfpool 0.12.0 | Anchor integration tests with fixtures | One-off CLI experiments |
| LiteSVM 0.6.x | Unit tests without a full validator | Testing network-level behavior |
| Devnet | Shared public sandbox | Load testing or guaranteed uptime |
Devnet is for application developers. Testnet is for validator and protocol testing. Devnet is more stable for day-to-day app work.
Yes - keypairs are cluster-agnostic. But account state (balances, programs) is per-cluster.
solana airdrop 2Limited to a few SOL per request. Use web faucets if rate-limited.
Public: https://api.mainnet-beta.solana.com. Production apps should use a dedicated provider (Helius, Triton, QuickNode, etc.).
solana genesis-hash
solana cluster-versionOnly if you omit --reset. With --reset, the ledger starts fresh each time.
Yes, with solana-test-validator --clone <PUBKEY>. Useful for testing against real program deployments.
Recent blockhashes are cluster-specific. Fetch a new blockhash from the target cluster's RPC.
No. It has no market value and can be minted freely via airdrops.
Public clusters track stable Agave releases. Pin your local tooling to Agave 4.1.1 to match this documentation.
Localnet (Surfpool or solana-test-validator) is faster and free of rate limits. Use devnet only for occasional integration smoke tests.
Pass ?cluster=devnet or ?cluster=mainnet-beta in the URL. Default is mainnet-beta.
Stack versions: This page was written for Agave 4.1.1, Solana CLI 3.0.10, Anchor 0.32.1, anchor-lang 0.32.1, Rust 1.91.1, @solana/kit 7.0.0, Surfpool 0.12.0, and LiteSVM 0.6.x.
Reviewed by Chris St. John·Last updated Jul 19, 2026