DEV Community

HornGang
HornGang

Posted on • Edited on

3 1

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

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay