Deploy a BitcoinSV node with docker

horngang

HornGang

Posted on May 8, 2020

Deploy a BitcoinSV node with docker

BitcoinSV is an original bitcoin protocol implementation. We can use it as a reliable money transfer process, or secure data storage.

For normal users, run a BitcoinSV node is not very convenient or cheap. It needs a large disk space to store the block data. But the node is the most secure way to communicate with blockchain for enterprise users nowadays. Because the node will check the Merkel tree of transactions and validate the transaction script. And detected the longest chain for you.

N-chain has distributed a docker image of the BitcoinSV node. So we can easily deploy it in our development or production environment. First, make sure you have installed docker. Then pull the image.

docker pull bitcoinsv/bitcoin-sv
Enter fullscreen mode Exit fullscreen mode

This is the start command for bitcoins 1.0.3 .

docker run -d \
-p 8332:8332 \
-v $(pwd)/data:/data \
--name bitcoind bitcoinsv/bitcoin-sv bitcoind \
-server \
-rpcuser=user \
-rpcpassword=password \
-prune=25000 \
-excessiveblocksize=2000000000 \
-maxstackmemoryusageconsensus=200000000
Enter fullscreen mode Exit fullscreen mode

You can set a more secure RPC username and password. The exact meaning of the last two settings can be viewed on bitcoinsv.io.

After running the command above, the BitcoinSV node will be running in the background. Run docker ps to check.

Now you can use the RPC interface via localhost:8332.

curl --user user --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://localhost:8332
Enter fullscreen mode Exit fullscreen mode

To check the latest 100 lines of logs:

docker logs --tail 100 bitcoind

To stop the node:

docker stop bitcoind

To delete the container:

docker rm /bitcoind

💖 💪 🙅 🚩
horngang
HornGang

Posted on May 8, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related