create account

Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com) by timcliff

View this thread on: hive.blogpeakd.comecency.com
· @timcliff · (edited)
$32.79
Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)
If you are interested in making changes to the Steemit.com website, you will need to setup a local instance of the website to work on. Here are the instructions to do so!

The steps below are basically the instructions from the <a href="https://github.com/steemit/steemit.com">Steemit.com GitHub Repository</a>, with some minor variations / updates based on some hurdles that I ran into and overcame when I was following the steps. 

I have run these multiple times on a clean Ubuntu 16.04 system, and they should work exactly "as-is" on Ubuntu 16.04. There are also variations in the <a href="https://github.com/steemit/steemit.com">GitHub Repo</a> for OS X, and Debian based Linux.

## Clone Steemit.com from GitHub

```
git clone https://github.com/steemit/steemit.com
```
 
## Create a "tmp" directory
```
cd steemit.com
mkdir tmp
```

## Download and Load NVM
```
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.1/install.sh | bash

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
```

## Verify NVM is running

```
command -v nvm # verify
```
(It should output nvm)

## Install Dependencies

```
nvm install v6
npm install
npm install -g babel-cli
```

## Create Config File

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

## Generate a Secret String

```
node
> crypto.randomBytes(32).toString('base64') 
> .exit
```
(Copy the string that was output.)
(It will look something like this: MQd4aPyBhnHhjeEoqKb7m1QFVuTTYZFtWyGkfejgSbo=)

## Save your secret string to the config file
```
nano steem-dev.json
```
1. Choose and enter a MySQL root password (you will use this later)
2. Paste the secret string in for 'server_session_secret'
http://i.imgsafe.org/953c48a22f.png

## INSTALL SQL
```
cd ..
sudo apt-get update
sudo apt-get install mysql-server
(Enter the MySQL root PW that you used above when prompted)
```

## Run MySQL
```
mysql -u root -p
(enter password)
```

## Create the "steemit_dev" database
```
> create database steemit_dev;
> quit
```

## Install sequelize-cli globally
```
npm install -g sequelize sequelize-cli pm2 mysql
```

## Configure the MySQL Password in the config file
```
cd db
cd config
nano config.json
(enter pw)
```

## Run sequelize db:migrate in db/ directory
```
cd ..
sequelize db:migrate
```

## Launch Steemit.com
```
cd ..
npm start
```

## Wait until it shows "Application started on port 3002".
http://i.imgsafe.org/952af6445c.png

## Connect to your local steemit.com instance!
```
http://123.456.789.001:3002/
```
(Use the IP address of your system)

## That's it!

If you have any questions, let me know and I will do my best to help :-)
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 199 others
👎  
properties (23)
authortimcliff
permlinkinstructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com
categorysteemit
json_metadata{"tags":["steemit","dev","development","programming"],"image":["http://i.imgsafe.org/953c48a22f.png","http://i.imgsafe.org/952af6445c.png"],"links":["https://github.com/steemit/steemit.com"],"app":"steemit/0.1","format":"markdown"}
created2017-01-26 01:44:45
last_update2017-01-26 05:22:15
depth0
children18
last_payout2017-02-26 02:26:48
cashout_time1969-12-31 23:59:59
total_payout_value30.624 HBD
curator_payout_value2.168 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,643
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,568
net_rshares67,926,398,303,534
author_curate_reward""
vote details (264)
@krnel ·
Thanks for putting this together.
👍  ,
properties (23)
authorkrnel
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t014555660z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 01:45:54
last_update2017-01-26 01:45:54
depth1
children1
last_payout2017-02-26 02:26:48
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_length33
author_reputation1,343,547,270,297,082
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,576
net_rshares167,419,345,822
author_curate_reward""
vote details (2)
@timcliff ·
Welcome :)
properties (22)
authortimcliff
permlinkre-krnel-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t014713021z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 01:47:09
last_update2017-01-26 01:47:09
depth2
children0
last_payout2017-02-26 02:26:48
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_length10
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,582
net_rshares0
@merej99 ·
Ooooo...  I bookmarked this to favorites. Thanks for the step by step...and @transisto had an excellent question. I would guess that the proper hardware is half the battle. :)
👍  ,
properties (23)
authormerej99
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t040518561z
categorysteemit
json_metadata{"tags":["steemit"],"users":["transisto"],"app":"steemit/0.1"}
created2017-01-26 04:08:27
last_update2017-01-26 04:08:27
depth1
children1
last_payout2017-02-26 02:26:48
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_length175
author_reputation109,727,414,619,488
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,345,185
net_rshares39,349,341,976
author_curate_reward""
vote details (2)
@timcliff ·
:)
properties (22)
authortimcliff
permlinkre-merej99-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t041744867z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 04:17:45
last_update2017-01-26 04:17:45
depth2
children0
last_payout2017-02-26 02:26:48
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_length2
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,345,220
net_rshares0
@noisy ·
BTW, there is not LICENCE file in the condenser repository. Do you know, is it also on MIT licence?
properties (22)
authornoisy
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170423t075835146z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-04-23 07:58:36
last_update2017-04-23 07:58:36
depth1
children1
last_payout2017-04-30 07:58:36
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_length99
author_reputation59,974,373,499,600
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id3,088,552
net_rshares0
@timcliff ·
Not sure. You'd have to email Sneak.
properties (22)
authortimcliff
permlinkre-noisy-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170423t172224544z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-04-23 17:22:18
last_update2017-04-23 17:22:18
depth2
children0
last_payout2017-04-30 17:22:18
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_length36
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id3,092,654
net_rshares0
@shaunmza ·
Resteemed as I would like to see how I can help out. A bookmark button would be great though!
👍  
properties (23)
authorshaunmza
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170129t172336841z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-29 17:23:36
last_update2017-01-29 17:23:36
depth1
children4
last_payout2017-02-26 02:26:48
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_length93
author_reputation17,139,522,306,343
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,373,092
net_rshares153,118,045,835
author_curate_reward""
vote details (1)
@timcliff ·
Awesome! Maybe that could be your first pull-request ;) I think a "Favorite Posts" feature would be an awesome addition!

As a suggestion - if you are planning to work on changes, email sneak@steemit.com first to make sure that they are on board with whatever you are planning to do. (He is the project manager for the development team.) It is not a guarantee that they will accept the PR, but it is good to check in with them and see if they are at least in support of your idea before you start doing a lot of coding work on it.
properties (22)
authortimcliff
permlinkre-shaunmza-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170129t172620438z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-29 17:26:15
last_update2017-01-29 17:26:15
depth2
children3
last_payout2017-02-26 02:26:48
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_length530
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,373,106
net_rshares0
@shaunmza ·
Haha, was more of a comment.

Would definitely start on bug fixes first so I could learn the ropes.
👍  
properties (23)
authorshaunmza
permlinkre-timcliff-re-shaunmza-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170129t173225885z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-29 17:32:24
last_update2017-01-29 17:32:24
depth3
children2
last_payout2017-02-26 02:26:48
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_length99
author_reputation17,139,522,306,343
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,373,139
net_rshares153,118,045,835
author_curate_reward""
vote details (1)
@thunderbird ·
This seems very useful.
👍  ,
properties (23)
authorthunderbird
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t015236187z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 01:52:42
last_update2017-01-26 01:52:42
depth1
children1
last_payout2017-02-26 02:26:48
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_length23
author_reputation611,700,494
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,619
net_rshares39,148,831,635
author_curate_reward""
vote details (2)
@nurhayati ·
https://steemitimages.com/DQmdGxvz24moTVFBd4Uvc6PRtW8bgncuoK3fHpNQqHQUM3s/.png.

@thunderbird. Thank you already vote my writing.
https://steemit.com/indonesia/@nurhayati/this-about-on-the-job-training-bagian-kedua.

I just used steemit media.
I look forward to your knowledge and experience.
Please guide you.
I am from Indonesia.
I am a student.
@nurhayati
properties (22)
authornurhayati
permlinkre-thunderbird-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170823t180001551z
categorysteemit
json_metadata{"tags":["steemit"],"users":["thunderbird","nurhayati"],"image":["https://steemitimages.com/DQmdGxvz24moTVFBd4Uvc6PRtW8bgncuoK3fHpNQqHQUM3s/.png"],"links":["https://steemit.com/indonesia/@nurhayati/this-about-on-the-job-training-bagian-kedua"],"app":"steemit/0.1"}
created2017-08-23 18:00:03
last_update2017-08-23 18:00:03
depth2
children0
last_payout2017-08-30 18:00:03
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_length358
author_reputation5,754,775,236,968
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id12,661,272
net_rshares0
@transisto ·
What are the suggested hardware requirements ?
👍  
properties (23)
authortransisto
permlinkre-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t021850056z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 02:21:09
last_update2017-01-26 02:21:09
depth1
children4
last_payout2017-02-26 02:26:48
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_length46
author_reputation330,357,940,720,833
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,728
net_rshares36,142,140,186
author_curate_reward""
vote details (1)
@timcliff · (edited)
Great question! I don't know the answer, but I will try to find out.

This is probably overkill, but these are the specs of the server I am running it on:

- OS: Ubuntu Server 16.04 LTS
- Processor: Intel Xeon E3 1225v2
- Frequency : 3.2 GHz+
- Cores: 4
- Threads: 4
- RAM: 16 GB DDR3
- HD: 3 x 120 GB SSD
- RAID: Soft

[Edit] I am going to ask around, but it might take me a bit to get an answer.
properties (22)
authortimcliff
permlinkre-transisto-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t022609306z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 02:26:06
last_update2017-01-26 04:52:09
depth2
children2
last_payout2017-02-26 02:26:48
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_length397
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,344,746
net_rshares0
@gtg ·
Yes, that's an overkill for simple dev work, but only when you connect to external `steemd` full node, like in your example: `wss://node.steem.ws`.
You would definitely need that hardware when you want to run full node by yourself (with twice as much RAM)
👍  ,
properties (23)
authorgtg
permlinkre-timcliff-re-transisto-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170126t114356859z
categorysteemit
json_metadata{"tags":["steemit"],"app":"steemit/0.1"}
created2017-01-26 11:43:57
last_update2017-01-26 11:43:57
depth3
children1
last_payout2017-02-26 02:26:48
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_length255
author_reputation461,794,417,113,823
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,347,217
net_rshares62,630,649,844
author_curate_reward""
vote details (2)
@timcliff ·
The answer that I got from the dev team is _not really, but good CPU is most important_. Also, _a 2011mbp with 2.3ghz i5 is a little slow for dev work but it works_.

I'm not 100% sure on this, but I would estimate 8 GB for RAM. 4 could work, but IDK.

@gtg also comment below regarding running a local instance of steemd vs. connecting to wss://node.steem.ws. This will make a big difference as well.
properties (22)
authortimcliff
permlinkre-transisto-re-timcliff-instructions-for-installing-a-steemit-com-instance-for-developers-interested-in-working-on-changes-to-steemit-com-20170127t013026456z
categorysteemit
json_metadata{"tags":["steemit"],"users":["gtg"],"app":"steemit/0.1"}
created2017-01-27 01:30:24
last_update2017-01-27 01:30:24
depth2
children0
last_payout2017-02-26 02:26:48
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_length401
author_reputation272,954,445,077,789
root_title"Instructions for Installing a Steemit.com Instance (For Developers Interested in Working on Changes to Steemit.com)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,353,780
net_rshares0