How to run a IOST Servi-Node

in #iost6 years ago

Introduction

<p dir="auto">The following tutorial will guide you step by step trough the process of running a servi-node on the IOST Blockchain. For more information regarding IOST and their Block Production Algorithm please go to <a href="https://iost.io" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">iost.io. <p dir="auto">At the time of writing this tutorial the IOST Mainnet has not been launched, so we will create a Servi-Node for the Everest Testnet version 2.5.0, however the process should be the same for the Mainnet once its launched. <p dir="auto">On this guide we will assume that you have some basic Linux knowledge and that you understand how to ssh into a remote server. <h2>Prerequisites <p dir="auto">Please install this packages before you start the tutorial: <ul> <li>Curl (any version you like) <li>Python (any version you like) <li>Docker 1.13/Docker CE 17.03 or newer <li>Docker Compose <h2>Step by Step Tutorial <p dir="auto">1.- Get a Server from one of your preferred platform. <p dir="auto">A 8gb Ram VPS or dedicated server is required, you must also make sure you have enough disk to store the blockchain. This guide is intended for Ubuntu 16.04 or 18.04, but you can also select other operating systems as long as they support Docker. <p dir="auto"><span>If you don't have a server provider, I recommend Vultr.io because they have Bitcoin payments and you can also scale up very quickly, you can use this referral code to get $25 of free credit on your first buy: <a href="https://www.vultr.com/?ref=7825074-4F" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">https://www.vultr.com/?ref=7825074-4F. <p dir="auto">2- Once you have your IP address , log in to the server and do the <a href="https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-16-04" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">routinary initial set up. Installing fail2ban and disabling password authentication to your server is also recommended for security reasons. <p dir="auto">3- The first thing you need to do is create the server directory where your Data will be stored. <pre><code>mkdir iserver cd iserver <p dir="auto">4- Inside the iserver folder, download the latest genesis and iserver.yml files. <pre><code>curl "https://developers.iost.io/docs/assets/testnet/latest/genesis.tgz" | tar zxC . curl "https://developers.iost.io/docs/assets/testnet/latest/iserver.yml" -o iserver.yml <p dir="auto">5- Go back to your root folder and create the docker-compose.yml file <pre><code>cd .. sudo nano docker-compose.yml <p dir="auto">6- Inside the text editor, paste this text: <pre><code>version: "2" services: iserver: image: iostio/iost-node:2.5.0 container_name: iserver restart: on-failure ports: - "30000-30003:30000-30003" volumes: - YOURDATADIR:/var/lib/iserver:Z <p dir="auto">Replace YOURDATADIR with the directory where your iserver is located, it should be /root/iserver if you followed this guide and are under the root user. <p dir="auto">7- Exit the nano editor by tying ctr+x and run the docker container <pre><code>docker-compose up -d <p dir="auto">8- Check that the docker is running and the blockchain is syncing <pre><code>docker-compose exec iserver ./iwallet state <p dir="auto"><center><span><img src="https://images.hive.blog/768x0/https://telegra.ph/file/2e392f3db31b6bb7a200b.png" srcset="https://images.hive.blog/768x0/https://telegra.ph/file/2e392f3db31b6bb7a200b.png 1x, https://images.hive.blog/1536x0/https://telegra.ph/file/2e392f3db31b6bb7a200b.png 2x" /><center><em>If the value of "headBlock" is increasing that means you are syncing <p dir="auto">9- Now you need to wait until you are fully synced, that is when your "headBlock" matched the head block of the <a href="https://explorer.iost.io" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">IOST Explorer <p dir="auto">10- While your node is syncing you can create your IOST account. First thing you will need is a key pair. <pre><code>docker-compose exec iserver ./iwallet key <p dir="auto"><center><span><img src="https://images.hive.blog/768x0/https://telegra.ph/file/ade81499a714405287436.png" srcset="https://images.hive.blog/768x0/https://telegra.ph/file/ade81499a714405287436.png 1x, https://images.hive.blog/1536x0/https://telegra.ph/file/ade81499a714405287436.png 2x" /><center><em>The output should give you a Public and Private Key <p dir="auto">11- Head over to the <a href="https://explorer.iost.io/applyIOST" target="_blank" rel="nofollow noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">IOST Explorer account creation page and use your Pubkey to create an account, remember that the name should be between 9 t 12 characters long.<br /> <center><span><img src="https://images.hive.blog/768x0/https://telegra.ph/file/358757da3b1941621e8c7.png" srcset="https://images.hive.blog/768x0/https://telegra.ph/file/358757da3b1941621e8c7.png 1x, https://images.hive.blog/1536x0/https://telegra.ph/file/358757da3b1941621e8c7.png 2x" /> <p dir="auto">12- Go back to the terminal and import your account using this command <pre><code>docker-compose exec iserver ./iwallet account --import <THENAMEYOUPICKED> <YOUR PRIVATE KEY> <p dir="auto">13- Add your private key to the server.yml file we downloaded at step 4. To do so, you must replace the generic key provided on the file and put your own private key after "seckey:". For the mainnet it is recommend we create a second set of keys that we will use only for signing blocks, but for testnet we can just add the one we just created. <p dir="auto">14- Now we have created our account we can go ahead and register as a servi-node, but first lets make sure we have enough RAM available by checking our balance. <pre><code>docker-compose exec iserver ./iwallet balance <YOURACCOUNT> <p dir="auto"><center><span><img src="https://images.hive.blog/768x0/https://telegra.ph/file/84e0393a071bc674956d9.png" srcset="https://images.hive.blog/768x0/https://telegra.ph/file/84e0393a071bc674956d9.png 1x, https://images.hive.blog/1536x0/https://telegra.ph/file/84e0393a071bc674956d9.png 2x" /> <p dir="auto">15- If you don't have any RAM available you can buy some with this command <p dir="auto"><code>docker-compose exec iserver ./iwallet --account <YOURACCOUNT> call 'ram.iost' 'buy' '["<YOURACCOUNT>","<YOURACCOUNT>",1000]' --amount_limit '*:unlimited' --chain_id 1024 <p dir="auto">16- Lets now register the producer. Note that your Network ID can be obtained with the "iwallet state" command specified on step 8. <p dir="auto"><code>docker-compose exec iserver ./iwallet --account <YOURACCOUNT> call 'vote_producer.iost' 'applyRegister' '["<YOURACCOUNT>","<YOURPUBLIC KEY>","COUNTRY","WEBSITE","YOUR NETWORK ID",true]' --amount_limit '*:unlimited' <p dir="auto">17- Now we start the producer <p dir="auto"><code>docker-compose exec iserver ./iwallet --account <YOURACCOUNT> call 'vote_producer.iost' 'logInProducer' '["<YOURACCOUNT>"]' --amount_limit '*:unlimited' <p dir="auto">18- Your servi-node is now register and can be voted in by the community, you may also chose to vote for your own producer with this command. <p dir="auto"><code>docker-compose exec iserver ./iwallet --account <YOURACCOUNT> call "vote_producer.iost" "vote" '["<YOURACCOUNT>","<YOURACCOUNT>","<AMOUNT>"] <p dir="auto"><span>19- You can ask for testnet votes on the <a href="/trending/development"> #development channel of [IOST Slack Channel](19- You can ask for testnet votes on the <a href="/trending/development"> #development channel of IOST Slack Channel). <p dir="auto">I hope this tutorial helps the IOST community build a lot of servi-nodes as we want to build the biggest decentralized and robust Blockchain in the world. <p dir="auto"><center><span><img src="https://images.hive.blog/768x0/https://telegra.ph/file/edbc363317abec45f9283.png" srcset="https://images.hive.blog/768x0/https://telegra.ph/file/edbc363317abec45f9283.png 1x, https://images.hive.blog/1536x0/https://telegra.ph/file/edbc363317abec45f9283.png 2x" /><center>Please support us by voting for IOST Venezuela as your Serve-Node <hr /> <p dir="auto">For additional help or command references please visit the [IOST Developer Portal](For additional help or command references please visit the IOST Developer Portal).
Sort:  

Congratulations @iostvenezuela! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><span><img src="https://images.hive.blog/768x0/https://steemitimages.com/60x70/http://steemitboard.com/@iostvenezuela/voted.png?201902012243" srcset="https://images.hive.blog/768x0/https://steemitimages.com/60x70/http://steemitboard.com/@iostvenezuela/voted.png?201902012243 1x, https://images.hive.blog/1536x0/https://steemitimages.com/60x70/http://steemitboard.com/@iostvenezuela/voted.png?201902012243 2x" /><td>You received more than 50 upvotes. Your next target is to reach 100 upvotes. <p dir="auto"><sub><em><a href="https://steemitboard.com/@iostvenezuela" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Click here to view your Board<br /> <sub><em>If you no longer want to receive notifications, reply to this comment with the word <code>STOP <blockquote> <p dir="auto">Support <a href="https://steemit.com/@steemitboard" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">SteemitBoard's project! <strong><a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1" target="_blank" rel="noreferrer noopener" title="This link will take you away from hive.blog" class="external_link">Vote for its witness and <strong>get one more award!

Awesome Stuff Keep it up!

Hello @iostvenezuela! This is a friendly reminder that you have 3000 Partiko Points unclaimed in your Partiko account!

Partiko is a fast and beautiful mobile app for Steem, and it’s the most popular Steem mobile app out there! Download Partiko using the link below and login using SteemConnect to claim your 3000 Partiko points! You can easily convert them into Steem token!

https://partiko.app/referral/partiko