Steps for setting up a witness node (the manual way)

Several people have asked me for a guide to setup a witness server. I usually send them these two links:

The first link uses @someguy123's "STEEM-in-a-box", which pretty much sets everything up for you - you basically just follow the instructions. There are quite a few people following this method, and I've heard good reviews from the people that use it.

I prefer the second link. I like actually installing all the dependencies and running the build to get it up and running. I've learned quite a bit about the Steem blockchain from all of the times it didn't work. The second link is what I call "the manual way".

While I still prefer the second link for my witness setup, it has gotten to the point though that when I sent people the link, I always need to tell them "It is 95% of what you need, but at this point it is a little bit out of date."

I felt it was time to publish an update that has all the latest instructions using the latest version of the code (20.5). This should hopefully remain current for a while, but of course things may change again. If updated instructions are needed, I (or someone else) will have to publish an updated guide.

As a prerequisite to using this guide, I highly suggest that you also read these other guides. The technical aspect is an obvious and important part of becoming a witness, but as you will soon learn (if you do not know already) - being a good witness involves a lot more than just producing blocks.

Of course you may also be interested in knowing how much witnesses get paid. For that, you can check out TIL - How Much Witnesses and Miners Make Per Block. The post is a little outdated at this point, but if you change "19 top witnesses and one miner" into "20 top witnesses" - all of the other parts are still accurate. You will be able to calculate the current rates based on the current block number.

If you want to see how many blocks per day a witness is making based on their rank, you can go to https://steemdb.com/@witnessname/blocks.

Ok, on to what this post is mostly about - the technical stuff.


I still consider How to become a witness to be the best witness setup guide out there. I did not want to take all of the good stuff in there and repeat it here, because it is not really mine to copy. Therefore, I will refer readers there for the majority of the setup.

As with that guide, this post assumes you're using Ubuntu 16.04 LTS. There are also build instructions here for other operating systems.

Step 1:

Complete Step 1 from the "How to become a witness" guide.

These days a 16 GB RAM server will technically work, but re-indexing the blockchain will be extremely slow. The minimum recommended amount of RAM is 32 GB. 64 GB (or even 128) will give you even faster replays, but is not necessary. Also, fast disk speed is important for replays. Using a SSD disk is the minimum recommendation. NVMe drives are even better.

Step 2:

Complete Step 2 from the "How to become a witness" guide.

Step 3:

 
First install the dependencies:

# Required packages
sudo apt-get install git make automake cmake g++ libssl-dev autoconf libtool libbz2-dev libsnappy-dev -y

# Boost packages (also required)
sudo apt-get install libboost-thread-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-signals-dev libboost-serialization-dev libboost-chrono-dev libboost-test-dev libboost-context-dev libboost-locale-dev libboost-coroutine-dev libboost-iostreams-dev -y

# Optional packages (not required, but will make a nicer experience)
sudo apt-get install doxygen perl libreadline-dev libncurses5-dev -y

#ntp required to keep time
sudo apt-get install ntp -y

#jinja2 required for build dependency
sudo apt-get install python3-pip -y
sudo pip3 install jinja2

 
Next, clone the source code repository, checkout the latest stable version and update the submodules. In the example below, v0.20.5 is used as the version. You can find the list of releases here. Technically it will also work to build from stable or master, but I prefer to explicitly set the version number so I am sure which version I am building, and so I can use the same syntax in case I need to rollback to an earlier version.

git clone https://github.com/steemit/steem
cd steem
git checkout v0.20.5

 
Finally, build and install the software

cmake -DLOW_MEMORY_NODE=ON -DCMAKE_BUILD_TYPE=Release .
make steemd
make cli_wallet
sudo make install

Step 3 (alternate):

 
As an alternate set of instructions, you can follow the official installation instructions in the steem GitHub repository: https://github.com/steemit/steem/blob/master/doc/building.md

Step 4:

Complete Step 4 from the "How to become a witness" guide.

Note - the wss://node.steem.ws/ node listed in the post is no longer active. You can find a more up to date list of nodes here and here. You may still have to try a few until you find one that works.

Step 5:

Complete Step 5 from the "How to become a witness" guide.

In the latest build, it now uses a hidden directory .steemd instead of witness_node_data_dir.

When editing the config.ini file, also make sure that the only plugin that is enabled is the witness plugin. No other plugins besides witness should be listed.
enable-plugin = witness

You can get the latest list of seed nodes here:
https://github.com/steemit/steem/blob/master/doc/seednodes.txt

It may be best to do some separate research on what to use for your price feed, but I will provide a few options here. I modified the steem_price_feed script listed in the post to run once and quit, then control it using crontab. conductor is another popular one.

Step 6:

Complete Step 6 from the "How to become a witness" guide.

With my modified setup, I only run steemd using supervisor. I launch cli_wallet and steem_price_feed as needed using crontab. There are also alternate ways to get steemd to run on its own, so you are welcome to look into those if you don't want to use supervisor.

Step 7:

Complete Step 7 from the "How to become a witness" guide.

Step 8:

Complete Step 8 from the "How to become a witness" guide.


That's it. I hope you find this guide useful. It goes without saying that this guide would not have been possible if it were not for all the great witnesses that came before and charted the way for the rest of us to follow. Thank you to everybody who has contributed knowledge, tools, advise, help, etc. to myself and all the other witnesses that have assembled the material for this guide.

If you run into any issues and need help, you can ask me here, or ask all the folks in the steemit.chat witness channel.

H2
H3
H4
3 columns
2 columns
1 column
29 Comments