DOCSTR.APP

Bitcoin mining, documented from first principles

How to mine bitcoin

A practical guide to ASIC selection, electrical planning, cooling, network access, pool configuration, wallet setup, operating costs, and the reasons a mining project may not be viable.

Updated July 2026US / EnglishTechnical pillar guide
Bitcoin mining decision map from ASIC hardware and electricity to pool payout and wallet
Mining is an infrastructure decision before it is a software configuration task.

To mine Bitcoin, you need purpose-built SHA-256 ASIC hardware, an electrical circuit that can safely support its continuous load, enough airflow or liquid cooling to remove heat, a reliable internet connection, a Bitcoin payout address, and usually a mining pool account. Before buying equipment, model electricity, hosting, pool, repair, downtime, and hardware-depreciation costs; miners comparing proof-of-work networks may also study how to mine ethereum to understand why hardware, algorithms, and network economics are not interchangeable. A profitable-looking daily estimate is not proof that a machine will recover its purchase cost.

Bitcoin mining is the competitive process that adds valid blocks to the Bitcoin blockchain. Miners construct candidate blocks, repeatedly hash block headers, and search for a value below the network target. A valid result proves that computational work was performed, but every full node still checks the block against Bitcoin’s consensus rules. Mining does not give a participant authority to rewrite those rules, create arbitrary coins, or make invalid transactions valid.

How Bitcoin mining works

A mining device receives work from a pool or constructs work through its own node and pool software. It changes a nonce and other adjustable block-header data, calculates double SHA-256 hashes, and compares each result with a target. Most hashes fail. The expected number of attempts depends on network difficulty, while the miner’s hashrate describes how many attempts its hardware can perform each second.

When a miner or pool finds a valid block, nodes independently verify its proof of work, transaction structure, subsidy, signatures, script conditions, and other consensus requirements. The block reward combines the current block subsidy with transaction fees included in that block. The subsidy follows Bitcoin’s programmed issuance schedule and periodically halves; transaction fees vary with block-space demand.

Hashrate

Hashrate measures attempts per second. More hashrate increases expected share of discovered blocks but also requires more hardware, electricity, cooling, and capital.

Difficulty

Difficulty adjusts so that block production remains near the protocol target despite changes in total network hashrate. Rising difficulty reduces expected production from unchanged hardware.

Shares

Pools use lower-difficulty proofs called shares to estimate contributed work. Shares are accounting evidence; they are not Bitcoin blocks and do not appear on-chain.

Variance

Block discovery is probabilistic. A small solo miner may wait far longer than the statistical average, while pools combine work to create more frequent, smaller payouts.

Diagram of the Bitcoin mining stack from ASIC hardware through site infrastructure and pool to wallet
The miner is only one layer; power, heat removal, pool accounting, and wallet control are separate systems.

Choose mining hardware that fits the site

Modern Bitcoin mining is dominated by ASICs designed for SHA-256 hashing. A laptop, phone, general-purpose CPU, or gaming GPU can technically calculate hashes but is not economically competitive with current ASIC fleets. The practical comparison begins with hashrate and efficiency, then expands to voltage, current, connector requirements, noise, dimensions, firmware, operating temperature, warranty, repair access, and the condition of a used unit.

Efficiency is commonly expressed in joules per terahash. Lower values indicate less electrical energy for the same amount of hashing work. That metric matters because power is usually the largest recurring expense, but it should not be isolated from price and reliability. A highly efficient machine bought at an excessive price can still produce a worse return than a less efficient machine acquired cheaply at a site with low-cost power.

Hardware questionWhy it matters
What is the rated hashrate?It determines expected contribution before pool fees and downtime.
What is the wall-power draw?The circuit, cable, connector, breaker, and service must support continuous operation.
What is the efficiency in J/TH?It links hashrate to energy consumption and operating cost.
What noise and heat are produced?ASIC fans and exhaust can make residential operation impractical.
Is firmware trusted and supported?Unknown firmware can create instability, hidden fees, or security risk.
Can the unit be repaired?Fans, power supplies, control boards, and hashboards can fail.

Read the dedicated Bitcoin mining hardware guide before comparing listings. It explains how to interpret hashrate, efficiency, power specifications, used-equipment risk, and site compatibility without turning the guide into a product ranking that will become stale.

Price electricity, cooling, and electrical work

An ASIC is a continuous industrial load. Electrical planning must use the manufacturer’s actual input requirements and local electrical code, not a generic extension cord or a household outlet assumption. Continuous-load rules, conductor size, breaker rating, receptacle type, phase, voltage, panel capacity, grounding, surge protection, and disconnect requirements should be reviewed by a qualified electrician. Overloaded conductors and poor connections can overheat long before a breaker behaves the way an inexperienced operator expects.

Power consumption also becomes heat. Nearly all electrical energy used by an air-cooled miner eventually enters the room as heat, so airflow must move that heat outdoors or a cooling system must absorb it. Recirculating hot exhaust into the intake raises chip temperatures and fan speed. Dust, humidity, salt, insects, vibration, and seasonal ambient temperatures influence reliability. Noise can exceed what is acceptable in a home, apartment, shared office, or neighborhood.

Site gate: do not purchase a miner until the electrical path, ventilation plan, noise constraints, internet route, fire safety, and shutdown procedure are documented.

Hosting transfers some site work to a third party but adds counterparty risk. Review contract duration, power-price formula, deposits, repair policy, curtailment rights, insurance, termination terms, machine ownership records, reporting access, withdrawal control, and what happens if the operator becomes insolvent. A low advertised energy rate may exclude management charges, demand charges, taxes, deposits, setup costs, or revenue sharing.

Step-by-step mining setup

Define the operating model.

Choose between a self-hosted ASIC, third-party hosting, or no mining. Write down the objective: learning, heat reuse, long-term infrastructure operation, or a strictly financial return.

Build a conservative cost model.

Use measured wall power, local energy price, pool fee, realistic uptime, repair reserve, facility cost, and hardware purchase price. Run lower-price and higher-difficulty scenarios rather than one optimistic estimate.

Prepare electrical and thermal capacity.

Complete qualified electrical work, confirm ventilation direction, install monitoring, and define safe startup and shutdown procedures before energizing the machine.

Create and secure a payout wallet.

Use a Bitcoin wallet you control or a custody arrangement you deliberately selected. Verify the address, backup process, payout threshold, and accounting records.

Choose a mining pool.

Compare payout method, fee, minimum payout, server regions, transparency, security, support history, and how the pool handles transaction fees and stale shares.

Configure the ASIC.

Connect it only to a trusted local network, change default credentials, install supported firmware, enter pool endpoints and worker names, and confirm that the payout account belongs to you.

Test and monitor.

Check wall power, temperatures, fan speed, hashrate, rejected shares, network stability, pool-side reported work, and payout records. Investigate material deviations instead of assuming the dashboard is accurate.

Wallet and pool configuration

A pool usually requires a payout address or account identifier plus one or more worker names. The exact arrangement varies. Some pools credit balances to a platform account before withdrawal, while others pay directly to a configured Bitcoin address. Confirm whether address changes trigger a security delay and whether the pool supports allowlists, multi-factor authentication, and notification of account changes.

Payout methods distribute variance differently. Pay-per-share models generally offer predictable credit for valid work but incorporate fees and pool risk. Proportional and score-based approaches tie payment more closely to blocks found during a round. Pay-per-last-N-shares methods use a moving share window. Labels alone are insufficient: read the pool’s current formula, fee treatment, transaction-fee policy, minimum payout, and stale-share rules.

The mining pool basics guide provides a structured checklist for pool selection and configuration.

Estimate mining economics without pretending to predict them

Expected gross revenue depends on your effective hashrate relative to the network, blocks produced over time, the block subsidy, transaction fees, pool policy, and Bitcoin’s market value. Net cash flow then subtracts electricity, hosting, pool fees, repairs, internet, cooling, labor, taxes, financing, insurance, downtime, and other facility costs. Economic return also needs the initial hardware and infrastructure cost.

Diagram separating Bitcoin mining gross revenue, operating costs, and changing risk factors
A calculator output is a scenario, not a guaranteed production or payback result.

A useful model separates assumptions from measured facts. Hardware hashrate and wall power should be measured after installation. Electricity price should include all applicable charges. Pool fee and payout formula should come from current pool documentation. Network difficulty and fee conditions change. Bitcoin price changes. Hardware performance can decline through heat, dust, power events, aging fans, failed chips, or curtailment.

InputUse in the modelStress test
Effective hashrateExpected share of network workLower for rejected shares and downtime
Wall powerkWh consumedMeasure at actual voltage and mode
Electricity priceMain operating costInclude seasonal and demand components
Network difficultyExpected BTC productionModel sustained increases
BTC priceFiat value of productionModel large declines without assuming recovery
Hardware valueCapital recovery and resaleAssume rapid obsolescence

The separate mining profitability guide explains contribution margin, break-even electricity price, payback limitations, and scenario analysis. It avoids publishing a single live profit figure because such a figure can become misleading as soon as difficulty, fees, price, or local power cost changes.

Main risks and failure modes

Economic risk

Revenue can fall because Bitcoin price declines, network hashrate rises, difficulty increases, transaction fees fall, or the pool changes terms.

Hardware risk

ASICs can arrive damaged, contain modified firmware, fail outside warranty, or become uneconomic before recovering their purchase price.

Electrical and fire risk

Incorrect circuits, connectors, conductors, ventilation, or maintenance can cause overheating, damage, and fire.

Counterparty risk

Hosting providers, sellers, repair shops, pools, and custodial wallets can delay service, restrict withdrawals, fail financially, or misrepresent equipment.

Regulatory and tax risk

Permits, zoning, noise rules, electricity tariffs, reporting, and tax treatment vary by location and can change.

Common beginner mistakes

Pre-purchase checklist

Authoritative context

The Bitcoin developer guide to the blockchain explains how nodes validate blocks and maintain consensus, while Bitcoin Core validation documentation describes why full validation remains independent of miners. For energy context, the US Department of Energy data-center electricity report illustrates why large continuous computing loads must be considered within broader grid and facility planning.

Next step

Start with the site, not the machine. Confirm electrical capacity, heat rejection, noise tolerance, network reliability, legal constraints, and conservative operating cost. Only then compare hardware and pool options. If the project requires optimistic Bitcoin prices, flat difficulty, perfect uptime, and zero repairs to break even, the defensible decision may be not to mine.