Every Bitcoin builder needs a reliable local environment before touching protocol code. Think of this lesson as preparing a workshop: if your tools are missing or half-configured, every later lesson becomes frustrating noise.
Why this matters
Bitcoin software is unforgiving. A broken Node install, an old OpenSSL, or no way to run regtest (a private local chain) will block wallets, explorers, and Lightning labs. Getting the toolchain right once pays off for months.
Analogy
Setting up for Bitcoin development is like packing for a multi-day hike. You do not need every gadget in the store, you need the few tools you will actually use daily, verified before you leave the trailhead.
Choose your stack
Most Pull lessons assume you can run a modern JavaScript or Rust toolchain. Pick one primary language for app code, but keep both runtimes available for ecosystem tooling.
Required tools
- Git
- Node.js 20+ or Rust stable (ideally both)
- Docker (optional, recommended for Bitcoin Core)
- A code editor with TypeScript and MDX support
Verify your setup
Run these checks from a clean terminal:
git --version
node --version # or: rustc --version
docker --version # optionalIf each command prints a version, your base toolchain is ready.
type ToolchainCheck = {
name: string;
command: string;
required: boolean;
};
const checks: ToolchainCheck[] = [
{ name: "Git", command: "git --version", required: true },
{ name: "Node", command: "node --version", required: true },
{ name: "Rust", command: "rustc --version", required: false },
{ name: "Docker", command: "docker --version", required: false },
];Project layout
Organize repositories so scripts, docs, and experiments stay easy to navigate:
my-bitcoin-lab/
docs/
scripts/
src/
tests/
Loading diagram…
Common mistakes
- Installing Node via random package managers and ending up with two conflicting versions, use a version manager (
nvm,fnm, orasdf). - Skipping Docker and fighting OS-specific Bitcoin Core builds early, start with a container if installs fail.
- Mixing mainnet credentials into learning projects, keep regtest configs isolated.
Worked mental model
Re-read the diagrams in this lesson once out loud in plain language. If you cannot explain the flow to a friend without jargon, pause and revisit Mastering Bitcoin / Mastering Lightning chapters linked in Resources. Chapter references are intentional, not decorative.
Hands-on habit
Every protocol idea should be paired with one local experiment:
- Reproduce the happy path on regtest (or Polar for Lightning)
- Break it on purpose (wrong fee, expired invoice, offline peer)
- Write down what error you saw and which layer produced it (wallet, node, mempool, peer)
That habit turns reading into builder instinct.
Glossary check
Pick three terms from this lesson and define them in one sentence each without opening notes. Weak definitions mean the lesson is not finished yet.
Resource order
Use Resources in order: narrative book chapter first, then BIP/BOLT for precision, then implementation docs for commands. Jumping straight to RPC flags without the mental model creates brittle knowledge.
Next steps
Once your environment is verified, move on to Git and open source workflow patterns. Those skills compound quickly when you start contributing to Bitcoin repositories.