I need approximately 100 Bitcoin Testnet to run an experiment on the lightning network.

Any suggestion on how to run CPU mining? Should I use cgminer? Make any sense to perform solo mining on testnet?

Currently I am running a full testnet node with bitcoind on a linux environment.

  • Maybe you can find a faucet? Here is an older but probably still appropriate answer: bitcoin.stackexchange.com/questions/29791/…
    – Eddie Dunn
    Mar 13, 2019 at 16:35
  • 1
    You will have to wait until the difficulty is reset to 1, and even then, you might not be able to win a block with the flood of other blocks coming in.
    – JBaczuk
    Mar 14, 2019 at 15:50

1 Answer 1


It's possible to mine Testnet BTC with CPU (even with the basic generatetoaddress command), because testnet difficulty drops significantly when there are no blocks on the network for 20 minutes:

bitcoin-cli generatetoaddress nblocks "address" ( maxtries )

If you want to continuously mine on Linux, create a bash loop:

while [ 1 ]
    bitcoin-cli generatetoaddress 1 "2N5fJkfCv4cF6vsa5QQJnsazBKWNXynn9zp" 10000000

Your luck will depend on other miners activity, for example I was able to mine 6 blocks in 2.5 months.

  • 'generate' methods are only effective on Regtest, where you can create blocks at will. Testnet works like Mainnet (although with lower difficulty), so you need proper mining equipment to generate a block.
    – FedFranz
    Oct 28, 2021 at 11:00
  • You can mine with this command, like I did, check my testnet BTC address: blockstream.info/testnet/address/… This is possible because the difficulty drops to 1 on testnet if there is no new block after 20 minutes.
    – DaWe
    Oct 29, 2021 at 17:25

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.