How to build your own Steemit.com website

in #steemit8 years ago (edited)

I have just mounted a clone of Steem.It with their open source code, you can check it here
https://steemlt.com/ (Yes there is a 'l' instead of an 'i') it is working ! I am publishing this post from my clone ;-)

So you want to do the same ? I am sure you do .....

Here is the guide

This guide will help you build a two things:

  1. A steem node
  2. A steemit.com cloned website backend

These are the two elements you need to have running on your system to have a fully functional steemit.com clone website on your system.

This guide can be used to build a system on a Windows machine or directly on a Ubuntu 16.04 LTS server (I am not an OSX person, but as VmWare is going to be used, it should be easy to adapt).

The subject is quite dense, and you'll need some knowledge about virtual machine, linux, nodejs, networking, how to open multiple bash terminals.

The steemd node

This is the guide I used to build my node.
https://steemit.com/allinone/@omotherhen/ezsteem-suite-1-0-the-ez-way-to-setup-your-steem-miner-node-in-a-linux-vm-windows-compatible

BUT, BEFORE YOU START BUILDING your node, you'll have to change the following in order to have a fully running node, being able to read posts content:

So if you follow @omotherzhen post, you will get to this instruction:

sudo git clone https://github.com/omotherhen/EZSTEEM/

What we need to do is change the 3 following files:

bin/minerScript.sh
bin/nodeScript.sh
bin/recompile.sh

and replace DLOW_MEMORY_NODE=ON by DLOW_MEMORY_NODE=OFF. This will enable your node to return post content. All the tutorial you found around here are more into mining, that's why the option was turned ON. Thanks @jesta.

So you can go and change it yourself or you can use this repo (https://github.com/artakan/EZSTEEM.git), where I already made the change.

Now you are good to go and you can keep on following @omotherhen guide.
Choose option 1) so you can mine and serve you website ....

Note: you will be asked to enter an account name. This require some more explanation:

  1. You will not be able to use your regular steemit account, at least not immediately.

  2. You will need to use a new account name, which you will NOT create on steemit.

  3. Your private key (WIF) is given by the script, and can be read in the this file:
    ~/EZSTEEM/steem/programs/steemd/witness_node_data_dir/config.ini
    look for miner = ["#newAccountName", "5K... WIF Key"]

  4. This is the part I was really confused, the new account will be created as soon as a block will be mined, you do not have to create it on steemit.

Synchronizing the blockchain looks like this:
enter image description here

(by the way https://onpaste.com/ is the best tool for cut and paste screenshot, you can even draw on it)

Ok, after the blockchain is synchronized, you now have a running mining node.

You should see this:
enter image description here
We observe some hashrate, all is good !

We will live our node running for now, you never know it could mine a block ;-)

Open a new terminal (I hope you know how to do that, otherwise I am not sure you are on the right page).

steemit.com cloned website backend

The reference for all this is:
https://github.com/steemit/steemit.com/ README.md

I will repeat the steps here. I also have added some package that were necessary but that were not mentioned.

First you'll have to clone the steemit repo:

git clone https://github.com/steemit/steemit.com/
cd steemit.com

Install npm

sudo apt-get update
sudo apt install nodejs-legacy
sudo apt install npm

install dependencies

npm install
sudo npm install -g babel-cli

Create config file

cd config
cp steem-example.json steem-dev.json

Some adjustement in steem-dev.json has to be made, mysql root password and other things ...
(note: it's steem.json in production)

Setup steemd

Go back to your steemd terminal and issue a CTRL-C ( just once otherwise you'll have to reload or reindex the whole blockchain). Restart steemd with --rpc-endpoint 127.0.0.1:8090 flag

We have already done this ..... but we have to edit the config.ini according to the following instructions

enable-plugin = witness account_history tags follow market_history
public-api = database_api login_api network_broadcast_api follow_api market_history_api

Install mysql server

sudo apt-get install mysql-server

DO NOT let the root password empty, and write it down somewhere safe

Now launch mysql client and create steemit_dev database:

sudo mysql -u root -p

create database steemit_dev;

Install sequelize-cli globally:

sudo npm install -g sequelize-cli pm2

Add your password in the file db/config/config.json
Run

sequelize db:migrate in db/ directory.

Add your mysql root password int the steemit.com/config/steem-dev.json

First start:

npm start

This is what you should see, if all goes well
enter image description here

Now you should be able to go in your browser and check your clone at
http://localhost:3002

The one you see at the top of this post is running on Google Cloud platform .... that's the next step ...
maybe another post later ....

But for now try to run it locally, and have fun !

Sort:  

A good reason to clone steemit, is if you want to run your own localized copy "for yourself". This way, if steemit goes down temporarily, you can still post and vote, and do all the things we normally do. Thanks for this info..

Are we sure now people won't create a clone of steemit just to steal user's passwords? spamming like fake links and stuff?

it seems like a lot of trouble to go to to steal passwords... its just as easy to use a fake login page that goes nowhere. or httpd proxy.

Isnt the whole point of making steemit opensource so that everyone can use it.

That's a very good question, that's why I did that, to study how the whole think is working. So far I can see that I can login in this clone, I don't know however is my server received the password ... It might be encrypted by the client ....
I am sure this issue has been studied ... but now that we have the code we can check all that ....

@wisehammer, @artakan:
Phishing?
Since all files are hosted on your end you can simply try to obtain sensitive information such as usernames, passwords etc by creating a fake steemit site. e.g. steemlt.com :-)
@dantheman:
Just so you know, steemlt.com is available for registration.

Just for the fun, I did it
http://steemlt.com:3002/
I just need to clean the port and get some https ... and warn everybody!

That is not why I am doing that ....and there must be a protection mecanism, otherwise we are all doomed ...

No worries @artakan, I'm not saying that you are doing it :-) What I'm saying is that anyone can do it. The only way to protect Steemit users from Phishing is to increase the public awareness e.g. by convincing people to pay attention regarding which site they are using for login to steemit etc :-)

No any more https://steemlt.com ;-) I couldn't resist ...

Does this create a new currency as well?

$10.69 and you are in Business!

steemclone.com

Anyway, I think it's pretty harmless, quite a while back somebody posted a website with every bitcoin address accompanied with it's private key. Panic ensued. Fact of the matter, it is virtual impossible to match up the two.

Same with Steemit upon source website, in my opinion.

http://directory.io/

Nicely done @artakan
Now you can create steemdating.com or steemTube.com :-)

Actually why not make steem dating? it's harmless unless it's like you posted
ifyouknowwhatimeen.jpeg

Isn't piston doing something like this to accomplish a local steem?

Piston is a python version. I haven't looked into it in details. What I describe here is coming from the github site of steemit, it's the original nodejs version.

This could bring upon custom steemit blogs to allow a sense of individualism while still allowing us to be part of the greater good that is the steem network. Awesome post!

Very interesting post . gonna make my on steemit soon . i called mine steeemsheep

Great post! Awesome instructions. How can I contact you?

I'm sure it's not that easy to clone steemit, but maybe you are a genius, and if you are and you can why did u share with us? What's the point? Making a copy? Copy-paste is not an original thing and why people upvote you?

Well Steemit has been designed for cloning ... the blockchain is common to all the clones ... they will be black clone, green clone, whatever variety ..... I am not sure you have understood the whole potential of this new technology

I will try my best to understand it but is too much information for the moment. I'm not saying I do not appreciate​ your work,but Steemit is new, so why should we already clone it ?

Hay please read this article Steemit.com is now open source
Its mean than we can clone steemit

Coin Marketplace

STEEM 0.19
TRX 0.13
JST 0.030
BTC 62567.99
ETH 3431.85
USDT 1.00
SBD 2.47