Creating a Local Bitcoin Testnet / Regtest - Programming Bitcoin

preview_player
Показать описание
UPDATE: a few specifics have changed, see below for up-to-date commands

In this video we create a local bitcoin testnet within a docker container. Then we'll connect to our testnet from Bitcoin-Qt on our desktop (host) machine.

Essentially, run:

docker pull freewil/bitcoin-testnet-box
docker run -t -i --name bitcoind -P -p 49020:19000 freewil/bitcoin-testnet-box
make start

Now we'll have a local testnet we can use for test transactions.

Tips: 1FfxymRtVTJbqtFg5ZK9p16mABVFCjqg6J

------------------

It's been a few years since I recorded this and the commands for `freewil/bitcoin-testnet-box` have changed.

* Make sure you expose port 19000, too: `docker run -t -i -p 19000:19000 -p 19001:19001 -p 19011:19011 freewil/bitcoin-testnet-box`
* Instead of using bitcoind at 9:31, use: `bitcoin-cli -datadir=1 stop`
* Now use bitcoin-cli for most functions instead of bitcoind
* E.g. `bitcoin-cli -datadir=1 listaccounts`
Show less
Рекомендации по теме
Комментарии
Автор

Thanks for the tutorial, but as of 12/31/2017 this is outdated. For example, there is no longer a 1/testnet3 directory in the docker container. Rather than try to mess with docker, I think I'm just going to run the bitcoind server with the testnet-1 flag. Thank you though!

gameragedad
Автор

what about regtest? can i get a walkthrough?

CINDY-wnst
Автор

Can you leave a pinned comment here that explains updates since video was made?

Million
Автор

Nice video, except freewil switched to using regtest now...

rjljr
Автор

I've been stuck at figuring out the port numbers for 2 hours.

pythgoreansassistant
Автор

why use Docker+VM+testnet when you can just use regtest ??

MrJDOaktown
Автор

Can you give me your facebook???, I want to ask you a few questions

CoDonKiep