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

in #witness-category7 years ago

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


cd condenser
mkdir tmpgit clone https://github.com/steemit/condenser

Install dependencies.


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

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

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

npm install -g yarn
yarn global add babel-cli
yarn install
yarn run build

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.

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.
sudo /sbin/iptables -t nat -I PREROUTING -p tcp –dport 80 -j REDIRECT –to-port 8080

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

And 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.


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


Thank youFollow me @Yehey. Please Vote Up and RESTEEM.

Sort:  

I would suggest you change the session key.

I would also recommend using nginx as a reverse proxy and then lock everything down on the firewall other than SSH, 80, 443. Change the port of SSH, install and configure Fail2ban for the new port.

There are other changes you need to make to the condenser config files for full functionality.

What is a "soft reboot". If you are just logging back in, you are only reloading your profile.

I'd make sure things are locked down before having people put their private keys on it. There are more steps to it there you have here to properly set it up and secure things unless you just running it privately behind your firewall for personal use.

Done it the first time. I have different ways protecting my servers.
All noted and appreciate all the tips.

Still working on some config file. Will update soon.
Thanks again, we need this constructive feedback to make this community better ever

Wow this is incredible. Ill have to try yehey.org at work. I cant access busy.org so its awesome to have another option.

Absolutely! Feedback please.

Still working some minor update, UI, logo, etc. I will gradually update the site.

Actually those are STEEM witnesses for the BLOCKCHAIN, not the steemit app. We are not dependent upon the success of steemit. if you tried steemitstage.com or busy.com you'd realize the upvote only takes forever on steemit.

What do you mean?

the steem blockchain is dope! as are the community of apps building around it. Steemit.com is just one of many front ends for the blockchain.

I've seen reply comments end up top-posted. Was this an instance of that? (I'm using busy.org right now, and it did that there earlier today, twice.)

I am sooper confused about what you are asking? like the replies are at the top of the page?

Yeah, it happened twice to me, and yours (above my earlier) looks similar to the reply you made above, to @nedspeaks, which was why I asked.

woaaaaah! I don't even know what to think, except I might have first tried submitting that comment via steemit, and then switched to steemitstage because stalled.

nice post let's make steem beat bitcoin

Good stuff Yehey, good stuff. To upvote you I have wait like 35 seconds nowadays.
Why do you wanna be a witness for STEEMIT knowing that it has gone from sucky to suckier?

I witness for STEEM not for Steemit :)

Like I said you can access to different front end like Yehey.org, Busy.org

I have been made to understand some important steps are missing on how to secure the site that are in the github instructions. unless the post is updated this might not get the traction you'd hope for.

I cooked it well, still making some minor updates to improve performance.

Actually those are STEEM witnesses for the BLOCKCHAIN, not the steemit app. We are not dependent upon the success of steemit.

That's correct.

Amazing! Thanks.

I come to try it!

Which distro of Linux did you use?

Ubuntu 16.04 as proven to support STEEM blockchain

.

Dont you worry I am building a few servers with load balancing. It will be better.
Try it out https://yehey.org and leave us feedback.

Thank you.

.

Great tutorial. Thanks for sharing. Did you use node/express as your server ? Thanks for https://yehey.org :)

What do you mean node express? You can assign any node you prefer to use if thats the question, answer is yes.

nice bro.Hi friends,I hoop you upvote and following me.thanks for following me.

nice bro.Hi friends,I hoop you upvote and following me.thanks for following me.

Great tutorials, i never know you are great developer. yehey.org runs smooth and fast. Am really enjoying that. Good work done👍

Is it theoretically possible to tweak condenser to use a separate graphene based blockchain (perhaps even just a forked and reset version of the steem blockchain) to build an entirely separate network/app? :-)

Or at least to pick apart the code to learn how.

It's open source, you can modify it to your liking.

nice bro.Hi friends,I hoop you upvote and following me.thanks for following me.