HOWTO Step-by-step Guide to build your own BlockChain site like Yehey.org

Updated: February 25, 2018.
Step-by-step Guide – Version 2.0

Lately accessing Steemit.com very frustrating, slow and not able to access the community. Please remember Steemit.com is not STEEM, meaning you have alternative site like Yehey.org, Busy.org or ChainBB where you can login using your steem account.

FYI. You ALWAYS login through SSL e.g. https://yehey.org this is to encrypt your session to the website that gives you access to the blockchain. I hope that’s not too technical.

From Steemit Github “Condenser is the react.js web interface to the world’s first and best blockchain-based social media platform, steemit.com. It uses STEEM, a blockchain powered by Graphene 2.0 technology to store JSON-based content for a plethora of web applications”.
You can follow the guide here: https://github.com/steemit/condenser or follow my guide, both will end good result.

Let’s begin:

Every time I prepare a server, I setup the correct time . This will be useful checking your logs later.
sudo timedatectl set-timezone America/New_York

sudo apt-get install htop //You need to know your server CPU/Memory Utilization

sudo apt-get update
sudo apt-get upgrade
sudo apt install git curl wget

git clone https://github.com/steemit/condenser
cd condenser
mkdir tmp

+++ This is for v1.0 step-by-step guide, skip it ++++++++

Install dependencies.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.5/install.sh | bash
export NVM_DIR=“$HOME/.nvm”
[ -s “$NVM_DIR/nvm.sh” ] && . “$NVM_DIR/nvm.sh”

Close SSH session, re-login again. This is very important, a soft reboot to continue the setup.

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash

nvm install v7.5 // v8.0 is not supported at this time. Don’t even try.

++++++++++++++++++++++

In version 2.0. setup, the condenser is using nvm install v8.7.0

nvm install v8.7

npm install -g yarn
yarn global add babel-cli

+++ Change this command, skip it +++
yarn install 
+++++++++++++++++++++

yarn install –frozen-lockfile
yarn run build // wait for a couple of minutes to compile.

yarn run production // using port 8080, make sure your server allow it.

You should be to access your own blockchain site.
For example:
http://yehey.org:8080 //8080 is a default port. Play around with the new condenser website.

SECURITY – SECURITY – SECURITY we need to implement security at all time.

Install, let’s encrypt.
I’m not going to re-invent the wheel, I followed this guide to install my server digital certificate so I can access with SSL protocol – https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-ubuntu-14-04

After you finished installing SSL on your server. You should be able to access it with SSL.
For example:
https://yehey.org // this will display the default placeholder of Apache page.
https://yehey.org:8080 // will be an error, cannot be display. This is correct we haven’t done anything yet.
http://yehey.org:8080 // you should be able to access the blockchain site (un-secure, not recommended let’s fix it.)

Run this command to forward ports from 8080 to 80. (If doesn’t work, check the alternative command in the references below).
sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080

PLEASE NOTE (double dash dport, and double dash to single dash port)

Now go to:
https://yehey.org // this will show the blockchain site, not the default apache page.

Edit your config default.json file and change the “server session key” by running this command.

node
> crypto.randomBytes(32).toString('base64')
> .exit

Next, Install MySQL server.

Follow this procedure and security recommendation: https://www.digitalocean.com/community/tutorials/how-to-install-the-latest-mysql-on-ubuntu-16-04

 

I post this post using Yehey.org blockchain site. This article is also posted at https://que.com

Work is done.
I hope this help you and I hope you will support me as your Witness.

Update: Dec. 5, 2017: Server Maintenance Routine:

  • Run “sudo apt-get update”
  • Run “sudo apt-get upgrade”
  • Run “sudo apt-get dist-upgrade”
  • Restart the server.
  • cd condenser
  • screen -S condenser
  • Run “yarn run production”
  • in another session, run the next command.
  • Run “sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –-to-port 8080”
  • or this one
  • sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-ports 8080

PLEASE NOTE (double dash dport, and double dash to single dash port) the content management system editor is not properly displaying the codes.

 

To serve the community better. Please VOTE @yehey for Witness, go to https://yehey.org/~witnesses and vote for yehey.

Follow me @Yehey. Please Vote Up and RESTEEM.
Thank you

 

References:

  • https://github.com/steemit/condenser (official website)
  • https://askubuntu.com/questions/444729/redirect-port-80-to-8080-and-make-it-work-on-local-machine
  • sudo iptables -A PREROUTING -t nat -p tcp --dport 80 -j REDIRECT --to-ports 8080
  • Install Node.js using NVM  install steps 1-6. Link: https://www.godaddy.com/help/install-nodejs-ubuntu-17395 to insall Node JS
  • How to install MySQL in Ubuntu – https://www.digitalocean.com/community/tutorials/how-to-install-the-latest-mysql-on-ubuntu-16-04
  • How to un-install MySQL in Ubuntu – https://www.digitalocean.com/community/questions/how-do-i-uninstall-and-reinstall-mysql

EM @QUE.COM

Founder, QUE.COM Game Studios. | Founder, Yehey.com a Shout for Joy! | MAJ.COM Management of Assets and Joint Venture | More at KING.NET Ideas to Life | Network of Innovation | Send your Tip to my Bitcoin/Ethereum or other crypto currency.

Leave a Reply

Privacy Preference Center

Necessary

Advertising

Analytics

Other