For development or test purpose, is it possible to setup a bitcoind as a private bitcoin blockchain?

  • Do you know about regtest mode? Dec 25, 2015 at 5:45

2 Answers 2


yes,very easy, you can use mainstream bitcoin client:bitcoin core, here is how:

start server: 
    bitcoind -regtest -daemon or bitcoind -regtest -printtoconsole
    you will find a regtest folder generated somewhere, example on ubuntu it's ~/.bitcoin/regtest
    generate blocks:  bitcoin-cli -regtest generate 101 (101 is because when you start this private chain, initially no blocks there and wallet balance is 0, and coinbase reward can only be spent after 100 confirm)
    checkbalance: bitcoin-cli -regtest getbalance
    bitcoin-cli -regtest getblockcount
    bitcoin-cli -regtest getblockhash 0

Bitcoin Core’s regression test mode (regtest mode) lets you instantly create a brand-new private block chain with the same basic rules as testnet—but one major difference: you choose when to create new blocks, so you have complete control over the environment.--https://bitcoin.org/en/developer-examples#testnet



When run with no arguments, all Bitcoin Core programs default to Bitcoin’s main network (mainnet). However, for development, it’s safer and cheaper to use Bitcoin’s test network (testnet) where the satoshis spent have no real-world value. Testnet also relaxes some restrictions (such as standard transaction checks) so you can test functions which might currently be disabled by default on mainnet.

To use testnet, use the argument -testnet with bitcoin-cli, bitcoind or bitcoin-qt or add testnet=1 to your bitcoin.conf file as described earlier. To get free satoshis for testing, use Piotr Piasecki’s testnet faucet. Testnet is a public resource provided for free by members of the community, so please don’t abuse it.


If you need absolutely private network - just made it. Run a few clean wallets on few computers, generate bitcoins and so on.. It will be incompatible with bitcoin network, but will be completely functional in your private local network.

  • 2
    Because of the checkpoints built in to the Bitcoin Core software, your suggestion to "just run a few clean wallets on a few computers" won't work unless you patch the source to remove the checkpoints. Also, by default those wallets will try to sync with the main Bitcoin network, so you'll need to prevent that from happening. Dec 25, 2015 at 5:46
  • I wrote "absolutely private network" - it means (I think) isolated local network.
    – xbtc
    Dec 30, 2015 at 6:45
  • a simple recipe for bitcoin-testnet-box This is a private, difficulty 1 testnet in a box. github.com/greenaddress/bitcoin-testnet-box
    – xbtc
    Feb 24, 2016 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.