How to deploy a Steem Witness node by Docker?
Recently there are some new users coming in Steem ecology and they want to build their witness nodes.
I wrote a simple tutorial to tell people how to deploy it long long ago (https://steemit.com/steem/@ety001/a-simple-tuturial-for-a-dockerize-steem-witness-deployment).
This tutorial uses a tool bash which were wroten by Someguy123. In my tutorial I just use this tool bash
./run.sh start command. Other commands were not tested by me, so I didn't write into my tutorial.
But people always get in confused. They always ask me why
./run.sh install command runs failed or why
./run.sh dlblocks runs failed, etc....
I didn't tell you to run those commands. That means these commands are not fully testd by me. I am not responsible for these.
Well. That's why I decide to write a new tutorial without using Someguy123's bash tool.
BTW, please learn some base knowledge of Docker before you decide to deploy witness node by Docker. That will save everyone's time. I don't think explaining every docker command mean is my job.
Please do this tutorial under the
- A Linux OS
- Get in root user environment. All commands need be done under root.
# mkdir -p /data/steem/data/blockchain
Prepare blockchain data
You could get my backup blockchain data from here: https://files.steem.fans/.
- If you want to replay blockchain data, just download
block_logfile. Replay data will takes a long time.
# wget https://files.steem.fans/data/block_log_20220714.tar.gz # gzip -d block_log_20220714.tar.gz # mv block_log /data/steem/data/blockchain/
- If you don't want to replay blockchain data, download
# wget https://files.steem.fans/data/steem_witness_20220714.tar.lz4 # tar --use-compress-program=lz4 -xf steem_witness_20220714.tar.lz4 -C /data/steem/data
Notice: maybe the file name contains another date tag. Please refer to https://files.steem.fans.
Prepare sign private key
# docker run -it --rm \ steemit/steem:0.23.x-mira \ /usr/local/steemd/bin/get_dev_key STM your_random_str
your_random_str by a strong random string.
Prepare config file
# wget https://gist.githubusercontent.com/ety001/42aee2d6f32be4baaf55a6f45efd87a9/raw/dce400d1626ed6097ef1646256b4c7f7ed69f3c6/config_witness.ini # mv config_witness.ini /data/steem/data/config.ini
/data/steem/data/config.ini and add
private-key = config into it.
- If you want to replay, do this command below:
# docker run -itd \ --name witness \ -p 2001:2001 \ -v /data/steem/data:/steem \ ety001/steem-mira:0.23.1 \ steemd --data-dir=/steem --replay-blockchain
- If you don't want to replay, do this command below:
# docker run -itd \ --name witness \ -p 2001:2001 \ -v /data/steem/data:/steem \ ety001/steem-mira:0.23.1 \ steemd --data-dir=/steem
Check Node Log
# docker logs -f --tail 100 witness
You could edit the
tailparam to show more info.
# docker stop witness # docker rm witness
One more thing
If you replay blockchain data by yourself, please remember to restart node without the
--replay-blockchain param after replaying finished.
Any issue, please leave a message for me.
Thank you for reading. I'm a witness. You could find more on my site https://steem.fans