This article was generated by AI. Please verify important information independently.

Solana Mainnet, Devnet & Testnet Explained

Crypto Wiki|Oct 9, 2026|★★★★★★4.5 (500 ratings)
AI Summary

Learn the differences between Solana Mainnet-Beta, Devnet, Testnet, and Localnet. Complete guide with RPC endpoints, CLI commands, and deployment step...

Mainnet, Devnet, and Testnet on Solana serve different purposes: Mainnet-Beta carries real economic value, Devnet supports application development, and Testnet is primarily used for validator and protocol testing. Localnet provides a separate local environment for controlled development.

If you have spent any time reading Solana documentation or following tutorials, you have already seen the terms Mainnet-Beta, Devnet, and Testnet repeated across every guide. Most resources name them without answering the question that actually matters: which one should you be using right now, and what happens if you pick the wrong one?

Solana is a high-performance Layer-1 blockchain that uses a consensus mechanism called Proof of History (PoH) combined with Proof of Stake to achieve high transaction throughput. Its native token is SOL, used to pay transaction fees across the network. Solana operates four distinct network environments, and in Solana terminology each of these is called a cluster. Mainnet-Beta, Devnet, Testnet, and Localnet are all Solana clusters, each with its own validators, transaction history, and account state.

By the end of this guide, you will know exactly what each cluster is for, which one fits your current situation, and the precise commands, RPC endpoints, and wallet steps needed to connect to any of them.


Mainnet, Devnet, and Testnet on Solana

Solana operates four parallel network environments. Each cluster serves a specific stage of the development and deployment lifecycle, similar to the way traditional software teams separate development environments from production.

Here is a one-sentence description of each:

  • Mainnet-Beta is the live production network where real SOL is used and all real-world activity occurs.
  • Devnet is the primary developer sandbox where applications are built and tested with free, valueless SOL.
  • Testnet is a stress-testing environment used by validator operators and core protocol engineers before changes reach Mainnet-Beta.
  • Localnet is a private Solana cluster that runs entirely on your own machine, with no internet connection required.

You can find the authoritative overview of all Solana clusters in the Solana cluster documentation. Starting with Mainnet-Beta, here is what each environment does and when to use it.


Solana Mainnet-Beta: The Live Production Network

Mainnet-Beta is Solana's live production network, the environment where all real economic activity on the Solana blockchain occurs. Despite the "Beta" in its name, this is not a test network. The label is a historical artifact from Solana's launch in 2020 and carries no implication that the network is incomplete or experimental. Solana has operated Mainnet-Beta as its full production environment since launch.

All live dApps (decentralized applications), DeFi protocols, NFT marketplaces, and token projects run on Mainnet-Beta. Every real SOL transaction you send or receive happens here.

SOL on Mainnet-Beta has real monetary value. Transactions require real SOL to pay fees, typically a fraction of a cent per transaction. Program deployments cost real SOL and are permanent and irreversible. The public RPC endpoint for Mainnet-Beta is https://api.mainnet-beta.solana.com.

⚠️ Warning: Any transaction or program deployment on Mainnet-Beta uses real SOL and cannot be reversed. Always test on Devnet before deploying to production.

💡 Tip: Verify Mainnet-Beta transactions at Solana Explorer. Use the cluster selector in the top-right corner to confirm you are viewing the Mainnet-Beta cluster.


Solana Devnet: The Developer Sandbox

Devnet is Solana's primary developer sandbox, a public cluster where you can build and test programs without risking a single real SOL. For the majority of Solana developers, Devnet is where all development work happens.

Devnet SOL has zero real monetary value. It is free test currency obtained via a faucet and cannot be transferred to Mainnet-Beta or exchanged for real SOL. The public RPC endpoint for Devnet is https://api.devnet.solana.com.

Devnet periodically resets, meaning deployed programs and account balances may be wiped without notice. Developers should treat Devnet state as temporary and never rely on it for production data.

Getting Free SOL on Devnet

A faucet is a service that dispenses free test SOL on Devnet or Testnet. The fastest method is the Solana CLI airdrop command. Note that in this context, "airdrop" refers to a developer tool command for requesting test tokens, not a marketing token distribution.

Run this command to request 2 SOL on Devnet:

solana airdrop 2

The CLI airdrop is limited to 2 SOL per request and applies frequency restrictions. If solana airdrop returns a rate-limit error, wait a few minutes and try again, or use one of these web-based faucets instead:

💡 Tip: View your Devnet transactions at Solana Explorer by selecting "Devnet" in the cluster switcher.

Test NFTs minted on Devnet have no real value and exist only within the Devnet cluster. They are not the same assets as NFTs on Mainnet-Beta.

Devnet is the right environment for the vast majority of Solana developers. If you are just getting started, begin here. For a side-by-side view of how Devnet compares to Testnet and Mainnet-Beta across all key dimensions, see the full network comparison table below.


Solana Testnet: Validator and Protocol Testing

Testnet is Solana's network environment for validator operators and core protocol engineers, not for application developers building dApps or programs. Understanding this distinction saves a lot of confusion.

Validators are the nodes that process and confirm transactions on the Solana network. Testnet exists specifically so validator operators can test new node software and protocol upgrades before those changes are applied to Mainnet-Beta. The Solana core engineering team uses Testnet to stress-test performance improvements and new features under realistic conditions.

Testnet is intentionally less stable than Devnet. Outages and resets are more common because the network is designed to be pushed to failure. The public RPC endpoint is https://api.testnet.solana.com.

Testnet SOL has zero real monetary value, identical to Devnet SOL.

💡 Recommendation: If you are building a dApp, program, or token on Solana, use Devnet, not Testnet. Testnet is not designed for application development and its instability makes it a poor choice for testing your code.


Localnet: Your Local Test Validator

Localnet, also called the local test validator, runs entirely on your own machine and requires no internet connection. It is the fourth Solana cluster type, though most guides omit it.

Start Localnet with this command:

solana-test-validator

Once running, Localnet is accessible at http://localhost:8899. Unlike Devnet, Localnet is not a shared public network. Only your local machine can see it, and it resets each time you restart the validator process.

Localnet is ideal for rapid, private iteration during early development. Because there is no network latency, feedback from program interactions is immediate. The standard development workflow is to build and test locally on Localnet first, then deploy to Devnet for shared testing, and finally deploy to Mainnet-Beta for production.

Devnet differs from Localnet in one key way: Devnet is a shared public network that anyone can access, which means your deployed programs are visible to other developers and your tests run against shared network state.


Solana Network Comparison: Mainnet vs Devnet vs Testnet vs Localnet

The table below compares all four Solana network environments across seven dimensions to help you choose the right cluster for your situation.

EnvironmentPurposeSOL ValueStabilityPublic RPC URLPrimary UsersData Persistence
Mainnet-BetaLive productionReal monetary valueHigh (production grade)https://api.mainnet-beta.solana.comAll users, dApp developers, end usersPermanent
DevnetDeveloper sandboxZero (free test SOL)Medium (occasional resets)https://api.devnet.solana.comApp developers, dApp buildersTemporary (resets periodically)
TestnetValidator/protocol stress testingZero (free test SOL)Low (intentional instability)https://api.testnet.solana.comValidator operators, core engineersTemporary (frequent resets)
LocalnetLocal developmentZero (simulated)Developer-controlledhttp://localhost:8899Individual developersSession-only (resets on restart)

Decision guidance:

Application developers building dApps or programs should use Devnet for all testing. Validator operators belong on Testnet. For rapid local iteration, Localnet is the fastest option. Only deploy to Mainnet-Beta when your program is fully tested and ready for production.

For step-by-step deployment instructions across clusters, see the program deployment section below.


Solana RPC Endpoints for Each Network

An RPC endpoint is the URL your application, CLI, or wallet uses to send requests to a Solana cluster. RPC stands for Remote Procedure Call, but the practical definition is all you need: it is the address your tools point at to read from and write to a specific network.

ClusterPublic RPC URLRate Limit Notes
Mainnet-Betahttps://api.mainnet-beta.solana.comRate limited; not recommended for production apps
Devnethttps://api.devnet.solana.comRate limited; sufficient for development
Testnethttps://api.testnet.solana.comRate limited; unstable network
Localnethttp://localhost:8899No rate limits; local only

Public RPC endpoints are rate-limited and are not suitable for high-traffic production applications. For production Mainnet-Beta use, third-party RPC providers such as Helius, QuickNode, and Alchemy offer higher rate limits and additional tooling. For all development and testing work on Devnet, the public endpoint is sufficient.

Both the Solana CLI and the @solana/web3.js library accept these URLs directly. The following sections show exactly how to configure each tool.


How to Switch Between Solana Networks Using the CLI

The core Solana CLI (the solana command, not the Anchor CLI or the web3.js library) controls which cluster your tools connect to. All network configuration goes through solana config.

Follow these steps to check and switch your active cluster:

1. Check your current network configuration.

This command shows your current RPC URL, confirming which cluster you are connected to.

solana config get

2. Switch to Devnet.

solana config set --url devnet

3. Switch to Testnet.

solana config set --url testnet

4. Switch to Mainnet-Beta.

solana config set --url mainnet-beta

5. Switch to Localnet.

solana config set --url localhost

6. Request a Devnet SOL airdrop after switching.

solana airdrop 2

The shorthand names (devnet, testnet, mainnet-beta) map directly to the public RPC endpoints listed in the Solana RPC endpoints reference above. Using solana config set --url devnet is equivalent to passing the full URL https://api.devnet.solana.com.

If solana config get shows an unexpected cluster URL, another tool or script may have updated your config. Run the appropriate solana config set --url command to correct it before doing anything else.

⚠️ Warning: Always run solana config get before deploying a program or sending a transaction. Deploying to Mainnet-Beta when you intended Devnet will cost real SOL and cannot be undone.


Connecting to Solana Networks with web3.js

The @solana/web3.js library is the official JavaScript and TypeScript library for interacting with Solana clusters. It provides a convenience function called clusterApiUrl() that returns the public RPC URL for a named cluster.

Use the following code to connect to each network:

import { Connection, clusterApiUrl } from '@solana/web3.js';

// Connect to Devnet
const connection = new Connection(clusterApiUrl('devnet'), 'confirmed');

// Connect to Mainnet-Beta
const connection = new Connection(clusterApiUrl('mainnet-beta'), 'confirmed');

// Connect to Testnet
const connection = new Connection(clusterApiUrl('testnet'), 'confirmed');

Hardcoding the RPC URL directly is equally valid and gives you more control:

// Using an explicit RPC URL
const connection = new Connection('https://api.devnet.solana.com', 'confirmed');

For production Mainnet-Beta applications, replace the public URL with your private RPC endpoint from a third-party provider. The clusterApiUrl() function returns public endpoints only.

Solana web3.js is a separate library from the Anchor Framework's TypeScript client. Both can be used together in the same project but serve different layers of the stack. After connecting, you can verify your transactions at Solana Explorer by selecting the matching cluster in the top-right switcher. Refer to the Solana web3.js library reference for the full API.


Deploying Solana Programs Across Networks

A Solana program is Solana's term for on-chain executable code that processes instructions from clients (equivalent to a smart contract on Ethereum). Programs are cluster-specific.

A program deployed to Devnet does not exist on Mainnet-Beta. Each cluster maintains its own completely independent state, and you must deploy your program separately to each network where you want it to run. This is the most common reason developers cannot find their program after deployment: they deployed to Devnet but are looking on Mainnet-Beta, or vice versa.

Configuring Anchor for Deployment

The Anchor Framework is a widely used Solana program development framework. Target cluster configuration lives in your Anchor.toml file under the [provider] section:

[provider]
cluster = "devnet"
wallet = "~/.config/solana/id.json"

To deploy to Mainnet-Beta, change the cluster value to "mainnet-beta" and run:

anchor deploy

Always update Anchor.toml before running anchor deploy. The Anchor CLI (anchor) is a separate tool from the Solana CLI (solana). Both may be in use during the same workflow. Refer to the Anchor Framework documentation for full configuration options.

Follow this sequence before any Mainnet-Beta launch:

  1. Build and test locally using Localnet.
  2. Deploy and test on Devnet.
  3. (Optional, for validator-related programs) Test on Testnet.
  4. Deploy to Mainnet-Beta only when the program is fully validated.

⚠️ Warning: Before deploying to Mainnet-Beta, verify your cluster setting in Anchor.toml or run solana config get. A Mainnet-Beta deployment costs real SOL and cannot be undone.


Real vs. Test SOL: Understanding Value Across Networks

SOL on Mainnet-Beta has real monetary value. SOL on Devnet and Testnet has zero real monetary value; it is free test currency with no exchange rate and no conversion path to Mainnet-Beta.

Here is the full breakdown:

  • Mainnet-Beta SOL: real monetary value, tradeable on exchanges, required to pay transaction fees.
  • Devnet SOL: free, obtained via faucet, no exchange value, cannot be transferred to Mainnet-Beta.
  • Testnet SOL: free, obtained via faucet, no exchange value, cannot be transferred to Mainnet-Beta.

⚠️ Warning: Devnet and Testnet SOL cannot be converted to real SOL or transferred to Mainnet-Beta. Do not attempt to trade or sell Devnet or Testnet SOL. It has no value outside its respective cluster.

The "Beta" label in Mainnet-Beta has caused persistent confusion since Solana's 2020 launch. Mainnet-Beta is not a beta product in any meaningful sense; it has processed billions of dollars in DeFi and NFT transactions and is the only network where real-world Solana activity occurs. The name is a historical convention that Solana has retained.

If your Phantom balance appears as zero after a network switch, the switching networks in Phantom wallet section above explains how to restore your Mainnet-Beta view.

This article is educational and technical in nature. It does not constitute financial advice or an endorsement of any cryptocurrency investment.


Deployment concepts connect to the Solana account model for developers, while Mainnet-Beta performance depends on the architecture described in why Solana is fast and cheap. Only mainnet SOL has market value: the SOL price page and SOL/USDT spot market apply to mainnet SOL, not Devnet, Testnet, or Localnet tokens.


FAQ: Mainnet, Devnet, and Testnet on Solana

Is Solana Mainnet-Beta the real Mainnet?

Yes. Mainnet-Beta is Solana's fully operational live production network. The "Beta" label is a historical naming convention from Solana's launch in 2020 and does not indicate the network is experimental or incomplete. All real SOL transactions, dApps, DeFi protocols, and NFT projects operate on Mainnet-Beta.

Does Devnet SOL have real value?

No. Devnet SOL has zero real monetary value. It is free test currency dispensed by a faucet and exists only on the Devnet cluster. It cannot be transferred to Mainnet-Beta, exchanged for real SOL, or used on any exchange.

Can I use Devnet SOL on Mainnet?

No. Devnet and Mainnet-Beta are completely separate networks with no shared state. SOL exists independently on each cluster. There is no mechanism to transfer Devnet SOL to Mainnet-Beta.

Why can't I see my SOL in my wallet?

The wallet may be connected to Devnet or Testnet instead of Mainnet-Beta. Check the wallet's current network setting and address using its latest support documentation, then reconnect to Mainnet-Beta. Verify the address on a matching block explorer before assuming that any balance has moved.

What is the difference between Devnet and Testnet on Solana?

Devnet is designed for application developers building dApps and programs. It is stable, has a working faucet, and is the recommended environment for all development work. Testnet is designed for validator operators and core protocol engineers to stress-test new software. It is intentionally less stable and not suitable for application development.

What is a Solana cluster?

A Solana cluster is a network environment, the term Solana uses for what other blockchains call a network or chain. Mainnet-Beta, Devnet, Testnet, and Localnet are all Solana clusters. Each cluster is an independent network with its own validators, transaction history, and account state.

What is the difference between Localnet and Devnet?

Localnet runs entirely on your own machine and requires no internet connection, making it the fastest testing environment available. Devnet is a shared public network that anyone can access. Use Localnet for rapid local iteration, then deploy to Devnet to test in a shared environment before moving to Mainnet-Beta.

Why did my transaction fail on Solana?

If your transaction failed unexpectedly, first verify you are connected to the correct cluster. Run solana config get in the CLI or check the network indicator in your wallet. A common cause of transaction failures is being connected to the wrong network. For example, attempting to interact with a Mainnet-Beta program while your CLI or wallet is pointed at Devnet will cause the transaction to fail.


Summary: Which Solana Network Should You Use?

The right network depends entirely on what you are doing. Here is the decision mapped to each use case:

  • Building or testing a Solana program or dApp → Use Devnet
  • Rapid local development and iteration → Use Localnet
  • Running or testing a validator node → Use Testnet
  • Launching a production application for real users → Deploy to Mainnet-Beta
  • Using real SOL for transactions, DeFi, or NFTs → Mainnet-Beta (the default)

When in doubt, start on Devnet. It is the safest, most stable, and most accessible environment for anyone beginning Solana development.

For further reference, consult the official Solana cluster documentation and verify any transaction at Solana Explorer.