How to deploy a Steem Witness node by Docker?steemCreated with Sketch.

in #witness23 days ago (edited)

Pre Words

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....

WTF!

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.

Tutorial Start

Please do this tutorial under the root user.

Pre Environment

  • A Linux OS
  • Docker installed
  • wget installed
  • lz4 installed
  • Get in root user environment. All commands need be done under root.

Prepare folders

# 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_log file. 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 steem_witness.tar.lz4 file.
# 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

Replace 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

Edit /data/steem/data/config.ini and add witness= and private-key = config into it.

Run Node

  • 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 tail param to show more info.

Stop Node

# 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

I would really appreciate your witness vote! You can vote by AuthSteem. Or open https://steemitwallet.com/~witnesses page, input ety001 to vote.

2.gif

Thank you!

Sort:  

Thank you for the new tutorial.
One day I'll take the time to set up a node too :-)

Hello @ety001
I've been looking for the latest instructions for days. There are many, but not up to date. I'll try to create a seed node with your tutorial as soon as I've downloded. Unfortunately, the download rate is very low. Would it be possible to send the data quickly? if so, I would be very happy.
Thank you for the great guide, I hope it works.
I had no success with someguy's steem-docker, it hangs when replaying.

Since I'm using a cheap big storage vps, there's nothing I can do to increase my VPS network speed.
I think you can buy a cheap VPS located in US West as a transfer proxy to download.

Coin Marketplace

STEEM 0.26
TRX 0.07
JST 0.033
BTC 24041.33
ETH 1791.72
USDT 1.00
SBD 3.29