create account

How to make a Witness using a VPS by username

View this thread on: hive.blogpeakd.comecency.com
· @username ·
$0.05
How to make a Witness using a VPS
<html>
<p>Overview</p>
<p>This guide gives much of the inside info and technical nitty-gritty that you will need to make a respectable attempt at being a witness for Steem.</p>
<h1>Within the witness node config.ini file</h1>
<ul>
  <li>Comment or delete all of the <strong>miners</strong>.</li>
  <li>Comment or delete the <strong>mining-threads</strong> setting.</li>
  <li>Have one <strong>witness</strong> (your witness, of course).</li>
  <li>Assign the signing key for the witness to the <strong>private-key</strong> setting.</li>
</ul>
<p>The signing key is the <em>private key</em> for the signing <em>public key</em> that is reported for the<strong>get_witness</strong> command. Example:<code>get_witness mywitness</code>An example of select parts of the witness node config.ini file is:</p>
<pre><code># name of witness controlled by this node (e.g. initwitness)<br>
witness = "mywitness"<br>
<br>
# name of miner and its private key (e.g. ["account","WIF PRIVATE KEY"] )<br>
# miner = COMMENTED OUT<br>
<br>
# Number of threads to use for proof of work mining<br>
# mining-threads = COMMENTED OUT<br>
<br>
# WIF PRIVATE KEY to be used by one or more witnesses or miners<br>
private-key = 5PRIVATESIGNINGKEY<br>
</code></pre>
<p>Notice that there are no quotes around the private key.</p>
<h1>For the witness server in general</h1>
<ul>
  <li>Close all <em>incoming</em> ports except SSH (port 22) and only open SSH for the IPs you know you'll use to control the witness server.</li>
  <li>Be extra sure your blockchain is functioning by starting with the <strong>--replay-blockchain</strong> flag.</li>
  <li>Redirect your <em>stderr</em> (and <em>stdout</em>) on start-up so your witness doesn't go down when you disconnect from SSH. See the example start command below for how this is done.</li>
</ul>
<p>It is best to close ports using your hosting provider's firewall. Otherwise you should configure<a href="http://ipset.netfilter.org/iptables.man.html">iptables</a> or similar.The start command for the witness node should look like this:</p>
<pre><code>./steemd --replay-blockchain --rpc-endpoint 2&gt;debug.log 1&gt;&gt;info.log &amp;<br>
</code></pre>
<p>Replay will take a while and is <em>optional</em>. Do it upon first start if, for example, you sync using a copy of a witness directory from elsewhere. If you need to boot in a hurry, say if your primary witness node goes down, leave out <strong>--replay-blockchain</strong>.</p>
<h1>Set up a separate seed node</h1>
<p>The seed node is a <em>completely different</em> server from your witness node. It is a requirement for those who want to credibly offer themselves as witnesses.If the seed node is going to be on a dynamic IP address, use a dynamic DNS service like ZoneEdit, and register a domain name to point at it.</p>
<ul>
  <li>Open port 2001 in your firewall. You can actually use any port, but 2001 is a <em>de facto</em>standard established by Dan Larimer. Unless you have a fairly good reason to use another port, just use 2001.</li>
  <li>With port 2001 open in your firewall, start the seed node with the flag <strong>--p2p-endpoint=0.0.0.0:2001</strong>.</li>
  <li>Ensure your seednode daemon stays live like you did with the witness node by redirecting output. See the start command above.</li>
  <li>Check your seed node connectivity with the shell command <strong>telnet SEED_IP 2001</strong> from a second computer. A <em>successful</em> connection will spit out a line starting with "Trying SEED_IP...", then "Connected to ..." then "Escape character ..." and then some garbage. After a few seconds it will disconnect automatically due to a non-response time out.</li>
</ul>
<h1>Advertising your intent to be a witness</h1>
<ul>
  <li>Put up a post at <a href="https://steemit.com/">steemit's</a> "witness-category" explaining your credentials as a witness operator and how perfectly awesome your hosting service is for your witness node. Provide the IP address (if static) or domain mame for your seed node. Also provide the port (e.g. 2001). <em>Do not</em> provide the IP address or domain name of your witness node. This latter information should be kept secret, for security.</li>
  <li>Cross-post your witness post to <a href="https://bitcointalk.org/index.php?topic=1410943">the Steem thread at bitcointalk</a></li>
  <li>Let everyone at the <a href="https://steem.slack.com/">Steem Slack</a> know your intentions, especially in the "#witness" channel.</li>
  <li>Be helpful to the community as much as possible. Try not to use profanity. Genuinely enjoy the outdoors, children, and small animals. Respect your elders. Be attentive to your civic duties. Go to bed early. Get up early. Drink plenty of water. Lay off the carbs and avoid trans fats. Exercise.</li>
</ul>
<h1>Testing your witness node</h1>
<p>You can test your witness node during the mining period (which may be over by the time you see this).In addition to a witness server and a seed node, you need a mining machine.Testing your witness node is for experts only. However, if you lack the confidence in your expertise to try this, then you may want to reconsider being a witness.First <strong>WHATEVER YOU DO, DO NOT ADD YOUR WITNESS TO THE MINER</strong>!!!Yeah, that's shouting and potentially obnoxious, but it's for your own good. If a witness tries to mint blocks on two different machines, it runs the risk of being caught for producing double work on a block, which will be interpreted as a malicious attempt to fork the chain. When this happens, the witness will likely be reported by an observer, and the totality of the witness's VESTS will be transferred to the reporter. The witness will cease to be a witness and it will be a dark day for the witness's owner.You have been warned.With this setup, when your miner broadcasts PoW, your witness will enter the queue. When it gets into the top 21 of the queue, it will begin to mint blocks as a witness, which your witness node should handle. It may miss some blocks depending on the competition at the top of the queue. However, if it hits its fair share, then the witness node is operating correctly.Following are example relevant sections of configuration files for the miner and witness nodes.</p>
<h2>Miner Node</h2>
<pre><code># config.ini for miner machine<br>
witness = "otherminer"<br>
<br>
miner = ["mywitness", "5MYWITNESSOWNERKEY"]<br>
miner = ["otherminer", "5OTHERMINEROWNERKEY"]<br>
...<br>
</code></pre>
<p>Notice how the <strong>witness</strong> setting for "mywitness" is missing. That's <strong>real important</strong>!</p>
<h2>Witness Node</h2>
<pre><code># config.ini for witness machine<br>
witness = "mywitness"<br>
<br>
# 5MYWITNESSSIGNINGKEY does not necessarily need to be 5MYWITNESSOWNERKEY<br>
private-key = 5MYWITNESSSIGNINGKEY<br>
<br>
# miners = DON'T PUT ANY MINERS IN<br>
<br>
# mining-threads = COMMENT THIS OUT</code></pre>
</html>
👍  , , , , , , , ,
properties (23)
authorusername
permlinkhow-to-make-a-witness-using-a-vps
categorywitness
json_metadata{"tags":["witness"],"links":["http://ipset.netfilter.org/iptables.man.html","https://steemit.com/","https://bitcointalk.org/index.php?topic=1410943","https://steem.slack.com/"]}
created2016-07-22 23:33:24
last_update2016-07-22 23:33:24
depth0
children4
last_payout2016-08-23 00:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.052 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length6,894
author_reputation26,855,596,798
root_title"How to make a Witness using a VPS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id285,317
net_rshares43,984,416,284
author_curate_reward""
vote details (9)
@cheetah ·
Hi! I am a content-detection robot. This post is to help manual curators; I have NOT flagged you.
I have detected a potential source:
https://steemd.com/recent/witness
Please try to refrain from copying articles to Steemit. Even if one links the source, this is still considered plagiarism and can end up in a DMCA notice being sent. You may also be downvoted, and added to a downvote bot's list if your account does this repeatedly.
If I am correct, please edit your post to only link to the article, then provide your own original thoughts on it.
NOTE: I am too dumb to tell if you are the author, so ensure you have proper verification in your post for human curators to check!
👍  , ,
properties (23)
authorcheetah
permlinkre-how-to-make-a-witness-using-a-vps-20160722t233422
categorywitness
json_metadata""
created2016-07-22 23:34:24
last_update2016-07-22 23:34:24
depth1
children2
last_payout2016-08-23 00:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length680
author_reputation942,693,160,055,713
root_title"How to make a Witness using a VPS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id285,329
net_rshares17,187,753,931
author_curate_reward""
vote details (3)
@anyx ·
https://steemit.com/steemhelp/@steemed/become-a-steem-witness-essentials
👍  
properties (23)
authoranyx
permlinkre-cheetah-re-how-to-make-a-witness-using-a-vps-20160722t233422-20160722t233618277z
categorywitness
json_metadata{"tags":["witness"],"links":["https://steemit.com/steemhelp/@steemed/become-a-steem-witness-essentials"]}
created2016-07-22 23:36:21
last_update2016-07-22 23:36:21
depth2
children0
last_payout2016-08-23 00:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length72
author_reputation98,676,136,100,181
root_title"How to make a Witness using a VPS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id285,357
net_rshares16,535,657,616
author_curate_reward""
vote details (1)
@username ·
Hey i just thought it would be helpful to share a relevant post from 3 months back. As it was buried deep.

Witness's are in short supply, i am creating one right now and documenting how to do so step by step on my next post.
properties (22)
authorusername
permlinkre-cheetah-re-how-to-make-a-witness-using-a-vps-20160722t233422-20160722t233816807z
categorywitness
json_metadata{"tags":["witness"]}
created2016-07-22 23:38:18
last_update2016-07-22 23:38:18
depth2
children0
last_payout2016-08-23 00:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length225
author_reputation26,855,596,798
root_title"How to make a Witness using a VPS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id285,392
net_rshares0
@endgame ·
Where can I rent a VPS? the provider I use state that mining is not allowed... Id prefer to be able to pay in bitcoin...
properties (22)
authorendgame
permlinkre-username-how-to-make-a-witness-using-a-vps-20160723t095934759z
categorywitness
json_metadata{"tags":["witness"]}
created2016-07-23 09:59:33
last_update2016-07-23 09:59:33
depth1
children0
last_payout2016-08-23 00:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length120
author_reputation-1,051,794,900,426
root_title"How to make a Witness using a VPS"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id293,654
net_rshares0