Getting Started with Solana Development — Devnet, Mainnet, Faucets, and the First Things to Know

Practical guide to starting Solana development. Devnet vs mainnet, how to get free SOL for testing, the first things to set up, and the pitfalls that catch new developers.

BoltTx Team··7 min read
solanadevnetmainnetfaucettutorialbeginner

If you're new to Solana development, the first hour is mostly setup — installing tools, getting a wallet, getting test SOL, picking an RPC. None of it is hard, but the order and choices matter, and a few decisions early on will save you headaches later.

This is a practical getting-started guide for someone who's never deployed to Solana before. We'll cover devnet vs mainnet, how to get test SOL, the toolchain to install, and the first patterns that distinguish a working setup from a fragile one.

Devnet vs Mainnet vs Testnet

Solana has three production networks:

Devnet — your testing playground. Test SOL is free; chain state can be reset; nothing here is real money. Use this for development.

Testnet — primarily for validators testing protocol changes. Most app developers don't touch this directly.

Mainnet-beta — the real network. Real SOL, real transactions, real consequences. Deploy here when you're ready.

The flow for any Solana project: develop on devnet, deploy to mainnet-beta when stable. There's no canonical "staging" environment beyond devnet — most teams use devnet for testing, then go to mainnet-beta with production-grade infrastructure.

Getting Free SOL for Devnet

Devnet has faucets that distribute free test SOL. The two main ones:

Solana CLI faucet:

solana airdrop 2 <YOUR_PUBKEY> --url devnet

This gives you 2 SOL on devnet. Subject to rate limits (you can't spam it).

Web faucet:

Solana Foundation runs a web-based faucet at faucet.solana.com. Useful when the CLI rate limits you.

A few things to know:

Setting Up the Toolchain

The minimum tools for Solana dev:

Solana CLI:

sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

Includes solana, solana-keygen, and tools for interacting with the network from the command line.

Rust (if you're writing programs):

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Solana programs are written in Rust.

Anchor (recommended for program development):

cargo install --git https://github.com/coral-xyz/anchor anchor-cli

Anchor is a framework that simplifies Solana program development with macros, account validation, and IDL generation.

Node.js / Bun (for client-side):

# Bun is fast; use it if your tooling supports it.
curl -fsSL https://bun.sh/install | bash

For frontend or backend client code interacting with Solana.

Creating a Wallet

The Solana CLI generates wallets:

solana-keygen new --outfile ~/.config/solana/id.json

This creates a keypair file. Keep it secure — anyone with this file controls the wallet. For development, fine to keep on disk; for production keys, use a hardware wallet or KMS.

Set as default:

solana config set --keypair ~/.config/solana/id.json
solana config set --url devnet

Verify:

solana balance
solana airdrop 2

Picking an RPC

For devnet: solana config set --url devnet uses Solana's public devnet RPC. Fine for development.

For mainnet: don't use the public RPC for anything beyond initial testing. It's rate-limited and lags. Get an RPC URL from a provider:

solana config set --url https://your-rpc-provider.example/?api-key=...

For application code, configure RPC URLs via environment variables:

const connection = new Connection(
  process.env.SOLANA_RPC_URL,
  "confirmed"
);

A common pattern: separate RPC URLs for read and write. Read RPC for queries, write RPC for sendTransaction. See Solana RPC for Developers for the full pattern.

Your First Transaction

The classic first thing to do:

import {
  Connection,
  Keypair,
  LAMPORTS_PER_SOL,
  PublicKey,
  SystemProgram,
  Transaction,
  sendAndConfirmTransaction,
} from "@solana/web3.js";

const connection = new Connection("https://api.devnet.solana.com", "confirmed");

// Generate a sender (or load from file)
const sender = Keypair.generate();
const recipient = Keypair.generate();

// Get some test SOL
await connection.requestAirdrop(sender.publicKey, 2 * LAMPORTS_PER_SOL);

// Wait a few seconds for the airdrop to confirm
await new Promise(r => setTimeout(r, 3000));

// Build a transfer
const tx = new Transaction().add(
  SystemProgram.transfer({
    fromPubkey: sender.publicKey,
    toPubkey: recipient.publicKey,
    lamports: 0.1 * LAMPORTS_PER_SOL,
  })
);

const signature = await sendAndConfirmTransaction(connection, tx, [sender]);
console.log("Transaction signature:", signature);

Run this and you've sent your first Solana transaction.

Common First-Time Pitfalls

Things that bite new Solana developers:

Confusing devnet and mainnet RPC URLs. Wrong URL = transaction goes to wrong network. Always verify.

Hardcoding private keys. Don't commit id.json to git. Even on devnet, build the habit.

Ignoring recentBlockhash. Pre-built transactions need a fresh blockhash. The sendAndConfirmTransaction wrapper handles this; if you build manually, set it yourself.

Forgetting compute budget. Default CU budget is 200_000. Many real transactions need more. Set explicitly.

Treating clusterApiUrl as production-ready. It's the public RPC. Fine for tutorials; useless for any real load.

Not handling errors. Devnet works mostly cleanly. Mainnet is messier. Build error handling early.

Submitting without confirming. sendTransaction returns a signature but the transaction may not have landed. Always confirm.

Building with web3.js v1 in 2026. v2 is more efficient but has API changes. For new projects, v2 is worth learning.

What to Build First

The recommended progression for someone new:

  1. Send a basic transfer. Get the round-trip working end-to-end.
  2. Create and use an SPL token. Learn the SPL token program.
  3. Interact with an existing program. Pick something simple — a swap on Raydium, a stake on Marinade — and call it from your client code.
  4. Write a small program in Anchor. A counter, a token escrow, something minimal.
  5. Deploy your program to devnet. Test it end-to-end.
  6. Build a frontend that connects to your program. Wallet integration, basic UI.

Don't try to build the next pump.fun on day one. Get the fundamentals working before scope explodes.

Mainnet Deployment Considerations

When you're ready to move from devnet to mainnet:

Audit your code. Devnet bugs are free; mainnet bugs cost users money.

Use production-grade RPC. Public mainnet RPC is not enough.

Set up Anti-MEV routing. Even basic swap functionality on mainnet is sandwich-target without protection.

Plan for congestion. Network congestion behaviour is something you can't really test on devnet — devnet is typically uncongested. Build retry logic and tip strategy that handles real-world conditions.

Set up monitoring. Per-signature telemetry, error tracking, performance monitoring. Don't deploy to mainnet without observability.

Have a kill switch. Some way to disable risky functionality without redeploying.

What to Do This Week

If you're starting your first Solana project:

  1. Install the toolchain. Solana CLI, Rust if doing programs, Node/Bun for client.
  2. Create a dev wallet. Get test SOL from the faucet.
  3. Send your first transfer. End-to-end devnet roundtrip.
  4. Pick an RPC provider for when you go to mainnet. Test with a free tier.
  5. Read the Solana docs deeply. They're good; many developers skip them.
  6. Pick a small starter project. Don't aim for a full product on day one.

Try BoltTx When You Reach Mainnet

When you're ready to deploy:

import { Connection } from "@solana/web3.js";

const connection = new Connection(
  "https://bolttx.io/?api-key=YOUR_API_KEY",
  "processed"
);

Free tier signup — pay only when transactions land. Solid choice for the write side of any production Solana application.

FAQ

Is Solana free to develop on? Devnet is free (faucet SOL has no real value). Mainnet has small per-transaction fees but no upfront cost.

Do I need to run a Solana validator to develop? No. Use a hosted RPC. Self-hosting is for production at scale, not development.

Can I deploy programs without learning Rust? Solana programs are Rust. There's no real workaround if you want to write programs. Client code can be in any language.

What's the difference between Anchor and raw Rust for Solana programs? Anchor is a framework that adds account validation macros and other developer-friendly features. Most modern programs use Anchor.

Is Solana hard for beginners? Harder than Ethereum tooling, partly because of Rust requirement. Easier than Ethereum economics and gas issues. Net wash; depends on your background.

Further Reading

Back to all posts