ANOTHER STEEM WITNESS SETUP GUIDE?!
Yeah, well, believe it or not the currently available material is a bit lacking or outdated. Crypto changes quickly and the guides representing the tech should as well. Understandably, though, it is hard to keep up with these constant changes. Thus....
I PRESENT THE CONCISE STEEM WITNESS SETUP GUIDE
Disclaimer:
I spent a lot of time and effort writing and compiling this guide in such a way that you can essentially just start from the top at Update and upgrade packages
and copy/paste every following command in order to get a fully working Witness server. However, despite the ease of implementation this guide provides, I HIGHLY encourage you to become familiar with the technology and exactly what this guide is having you do. The headings should help you to understand the goal of what each block of commands is going to achieve.
Let's go ahead and assume you know what a witness is and why you would want to manage one. This will save us some time and space in this guide. For the sake of sanity, let us assume one more thing. That is that you know where you are going to obtain a server(s) with the necessary hardware requirements.
Server Hardware Specifications
- RAM: 8GB Minimum - 16GB+ Preferred
- Storage: 50GB+
- Network: 1Gb/s+ Preferred
- OS: Ubuntu 16.04-16.10
Links
- STEEM repo
- Open source repo containing precompiled source code for Steemd and the cli_wallet
- @GTG Blockchain Snapshot
- ~17GB snapshot file used to replay the blockchain thru Steemd on first run
- @Netuoso Generic Witness Config
- Line 8: Shared memory size.
df -h
- look for
/dev/shm
or/shm
and the free space remaining - set
shared-file-size
just below the limit
- Line 9: Shared file dir.
- use the result from
df -h
(eg:/dev/shm
)
- use the result from
- Line 75: Witness
- set this to your STEEM username the Witness will use
- Line 84: Private key
- this key will be generated via the
cli_wallet
with commandsuggest_brain_key
- this key will be generated via the
- Line 107: Log level
- you can change this to
warn
if you want less output ..
- you can change this to
- Line 8: Shared memory size.
- @Someguy123 steemfeed-js
- Steemd Systemd Script
- Cli_wallet Systemd Script
- Price Feed Systemd Script
Update and upgrade packages
It is always good to try to keep updated and patched software installed on your server. These commands will help you with that:
sudo apt-get update -y
sudo apt-get upgrade -y
Install dependencies
We will need to compile C source code. These commands will help you install the dependencies that will be required:
sudo apt-get install git cmake g++ python-dev autotools-dev libicu-dev build-essential libbz2-dev libboost-all-dev libssl-dev libncurses5-dev doxygen libreadline-dev dh-autoreconf htop
Compile Steemd and cli_wallet
In order to communicate with the blockchain and configure our witness/wallet we will need to compile from source. These commands will help you through the process:
cd $HOME
git clone https://github.com/steemit/steem
cd steem
git submodule update --init --recursive
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONTENT_PATCHING=OFF -DLOW_MEMORY_NODE=ON
make steemd cli_wallet
sudo cp programs/*/{steemd,cli_wallet} /usr/local/bin
Run Steemd for the first time to generate the data_dir
cd $HOME
steemd
- wait 5 seconds then exit (
CTRL+C
) curl https://raw.githubusercontent.com/netuoso/cryptoscripts/master/steemit-config.ini.witness > witness_node_data_dir/config.ini
Generate a brain_wallet_key
screen
(press enter)cd $HOME
(in case you aren't already there)steemd
CTRL+A then CTRL+C
(create new screen window)cli_wallet
set_password SOMESECRETPASSWORDYOUWILLREMEMBER
unlock SOMESECRETPASSWORDYOUWILLREMEMBER
suggest_brain_key
- copy/paste the entire result into a note window so you won't lose it (I use lastpass secure notes)
CTRL+D
(exit the wallet)CTRL+D
(exit the second screen window)CTRL+C
(exit Steemd process)
Customize the config
- NOTE: (see Links section for more information about each line)
nano $HOME/witness_node_data_dir/config.ini
- edit line 8 with your shared-file-size
- edit line 9 with your shared-file-dir
- edit line 75 with your witness account name
- edit line 84 with your private key from the step above (should be in the note)
- edit line 107 with desired log level (info/warn) [optional]
Download the blockchain snapshot
cd $HOME
wget https://gtg.steem.house/get/blockchain/block_log -o witness_node_data_dir/blockchain/block_log
Replay the blockchain (this is a good chance to see if anything went wrong)
steemd --replay
(this can take hours)- you should now be seeing some information about the replay
- a way to check this step is working...
- open a new terminal window (hopefully you are still in screen
CTRL+A then CTRL+C
) ls -al $HOME/witness_node_data_dir/blockchain
(the block_log.index will grow to ~100MB)ls -al $HOME/witness_node_data_dir/blockchain
(did block_log.index change size? its still indexing.. be patient)
- open a new terminal window (hopefully you are still in screen
- ignore red text saying warnings or
applying hard fork
.. these are expected - the replay is finished after 100% and when you see
handling block
- exit when the replay is finished (
CTRL+C
)
Set up steemfeed-js (or find another price feed)
cd $HOME
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
sudo apt-get install nodejs -y
git clone https://github.com/Someguy123/steemfeed-js
cd steemfeed-js
mv config.example.json config.json
nano config.json
(add your STEEM username and active private key)npm install
Install the Systemd service scripts and enable on boot
cd $HOME
curl https://raw.githubusercontent.com/netuoso/cryptoscripts/master/steemd.service > steemd.service
curl https://raw.githubusercontent.com/netuoso/cryptoscripts/master/cli_wallet.service > cli_wallet.service
curl https://raw.githubusercontent.com/netuoso/cryptoscripts/master/price_feed.service > price_feed.service
sudo chown root:root *service
sudo chmod 0644 *service
sudo mv *service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable steemd
sudo systemctl enable cli_wallet
sudo systemctl enable price_feed
Restart Steemd; import STEEM active private key; broadcast Witness
cd $HOME
sudo service steemd restart
cli_wallet
unlock SOMESECRETPASSWORDYOUWILLREMEMBER
import_key ACTIVEPRIVATEKEYFROMSTEEM
update_witness "YOUR_WITNESS_NAME_HERE" "https://link_to_your_witness_intent_post" "ACTIVEPUBLICKEYFROMSTEEM" {"account_creation_fee":"0.200 STEEM","maximum_block_size":131072,"sbd_interest_rate":0} true
CTRL+C
(exit wallet)
Enable cli_wallet and price_feed
sudo service cli_wallet restart
sudo service price_feed restart
Setup alias to view Steemd logs
nano $HOME/.bashrc
- add the following:
alias steemdlogs='sudo journalctl -u steemd.service -f'
alias feedlogs='sudo journalctl -u price_feed.service -f'
- now you can use
steemdlogs
andfeedlogs
to view the logs for either service - you need to logout/login or open a new shell for the alias to become active
Congratulations. You are now a STEEM Witness. Make sure you campaign and stay active! Go get those votes!
How to change your Witness SBD interest or account creation fee (SBD 2% interest example)
cd $HOME
cli_wallet
unlock SOMESECRETPASSWORDYOUWILLREMEMBER
update_witness "YOUR_WITNESS_NAME_HERE_AGAIN" "https://link_to_your_witness_update_post" "ACTIVEPUBLICKEYFROMSTEEM" {"account_creation_fee":"0.200 STEEM","maximum_block_size":131072,"sbd_interest_rate":200} true
Vote for @netuoso as Witness
- Go to the witness voting page on SteemIt.com
- Scroll to the bottom of the page and locate the vote box (shown below)
- Input my name (netuoso) and hit vote.
- Give yourself a high-five for making such an awesome decision
Comments, questions, or concerns
If you have any questions, comments, or concerns .. please feel free to make your voice heard in the comment section. Providing high quality, educational content is of the utmost importance to me. If you find any errors, I would like to know about them as soon as possible so I can correct them and make a retraction (and a mention to you, the error killer).
Shoutouts
You can find me in the Peace, Abundance, Liberty (P.A.L.) discord channel
Follow me on Github | Tweet me on Twitter | Stalk me on LinkedIn
Congratulations! This post has been upvoted from the communal account, @minnowsupport, by netuoso from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, and someguy123. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.
If you like what we're doing please upvote this comment so we can continue to build the community account that's supporting all members.
This post received a 4.8% upvote from @randowhale thanks to @r0nd0n! For more information, click here!
thanks @r0nd0n and @randowhale
What is the most money a comment can make, I'm new to this.. Just started using my account a few days ago...
Btw not really related to Witnessing, but I think the payout limit is set to $1M for each
The whole witness system did not make sense. Whether you intended to or not, this post helped me understand it a little better! Thanks @netuoso!
I close my eyes and I follow @netuoso's guide. Success 🤑
Instructions unclear. Summoned The Great One.
Ee-aye, Ee-aye, Cthulu-ftahgen.
Please advise.
Hello world. @nettybot here letting you know that MSP3k is just over the horizons! Keep your eyes open!
no specific cpu requirements for server ?
@netuoso the part I am having difficulty with is editing the ini file, any advice there?