create account

Steem-in-a-Box - Ready for HF15 (v0.15.0) by someguy123

View this thread on: hive.blogpeakd.comecency.com
· @someguy123 · (edited)
$72.15
Steem-in-a-Box - Ready for HF15 (v0.15.0)
### This article is a technical article intended for those administrating STEEM servers, including seed nodes, witnesses, and RPC nodes. In layman terms, this article is explaining a piece of software written by myself designed to assist others with setting up STEEM servers.

<center>![](https://i.imgur.com/XOsLHJQ.png)</center>
<center>Cardboard Box by Hay Kranen / Public Domain</center>

Many people use my docker image, [Steem-in-a-box](https://steemit.com/steem/@someguy123/steem-in-a-box-deploy-a-new-seed-witness-or-rpc-server-with-a-one-liner) for deploying their STEEM servers, and it's changed a little since it was first introduced.

Steem-in-a-box uses Docker to isolate the STEEM client, preventing version conflicts, and also allowing for binaries which work on any Linux distribution, since it runs within a compact Ubuntu16.04 docker container.

**DISCLAIMER: Sysadmins, If you have any custom iptables rules, Docker can and WILL interfere with them. [Read about it here](https://fralef.me/docker-and-iptables.html)**

In this article, I will explain

1. Installing Steem-in-a-box
2. Using it for a SEED
3. Using it for a Witness
4. Upgrading existing Steem-in-a-box installs

# Installation

Installation is the same as the original, except now we have a binary image.

**Be aware that docker is a virtualisation technology, which means it's completely safe to run each command as root, since the container will be fully isolated from your system once it's running.**

First, install docker if you don't already have it:

```
apt update && apt install curl git
curl https://get.docker.com | sh
```

Now, download Steem-in-a-box from my Github:

```
git clone https://github.com/Someguy123/steem-docker.git
cd steem-docker
```

The core of Steem-in-a-Box is `run.sh`. This is a *BASH* script which abstracts all of the docker magic, making it easy to deploy a docker-ized STEEM container, without needing to fully understand docker.

Run the following command to download the latest copy of STEEM from my DockerHub:

```
./run.sh install
```

Now you should have a ready-to-go Steem-in-a-box. Let's configure it

# Configure for a seed

A seed is a type of STEEM node which distributes blocks, and broadcasts transactions to other nodes on the network. It's similar to a *Bitcoin Full/Supernode*.

Steem-in-a-box comes preconfigured as a seed, and will automatically attempt to expose PORT 2001 to the world.

**Optional: Change the Steem-in-a-box seed port**

If for some reason, you don't want to use 2001, you can change this. Edit the file `data/witness_node_data_dir/config.ini`, and change 2001 to some other port, let's say 2005

```
p2p-endpoint = 0.0.0.0:2005
```

You'll also need to create a file in the same directory as `run.sh`, called `.env`, this is a file used by Steem-in-a-box to determine custom settings for docker. Put the following in the file:

```
PORTS=2005
```

This tells it to forward port 2005 from docker, to your public IP address.

#  Configure for a Witness

A witness is a special type of STEEM node which produces blocks, similar to a *miner*. You can read more about what a witness does in my article: [Seriously, what is a STEEM witness? Why should I care? How do I become one? (Answer)
](https://steemit.com/witness-category/@someguy123/seriously-what-is-a-witness-why-should-i-care-how-do-i-become-one-answer)


To start, create a file in the same directory as `run.sh`, called `.env`, this is a file used by Steem-in-a-box to determine custom settings for docker. Put the following in the file:

```
PORTS=
DOCKER_NAME=witness
```

By leaving the PORTS blank, this prevents it attempting to forward any P2P ports. We also change the name of the docker container, this prevents confusion when you're managing both a seed and a witness, as the container will be correctly name "witness".

By setting up a witness, I assume that you're aware of the security concerns, and basic procedures for running a witness, so I will explain them only lightly.

Edit `data/witness_node_data_dir/config.ini`, disable the p2p-endpoint, and fill out your witness details. **By default I already disable account_history and all of the other plugins/apis not useful for witnesses/seeds**

```
# p2p-endpoint = 
witness = "someguy123"
private-key = 5JiHZCzXmAhyezYrvSdBu8587YVPPvAnCp5Nx14tJPzGx6MDg4M
```

# Starting Steem-in-a-box

Once you've configured Steem-in-a-box to your requirements, you may start the node with:

```
./run.sh start
```

You can check the status of it with `./run.sh status`, and `./run.sh logs`

You should see the node syncing in the logs. Once it's fully synced, you're ready to go!

# Upgrading an existing Steem-in-a-box

If you're running an older version of Steem-in-a-box, you'll need to pull in the latest changes. Back up your `config.ini` before doing this, as it may get damaged.

```
cd steem-docker
git pull
```

Once you've pulled in the latest changes, you can then upgrade the docker image:

```
./run.sh install
```

Once your docker image is upgraded, you will need to stop the existing node

```
./run.sh stop
```

Destroy the original image, so that it may be replaced by the updated version of STEEM. The default container is called `seed`, regardless of whether it's a seed, witness or an rpc node. If you've got a customized `.env` file, or you've modified `run.sh`, take that into account.

```
docker rm seed
```

Now that you've cleaned up, you can start the system again:

```
./run.sh start
```

Make sure it's syncing with

```
./run.sh logs
```

Once it's done syncing, you can enter the wallet to confirm the version:

```
./run.sh wallet

new >>> about

{
  "client_version": "v0.15.0",
  "steem_revision": "3379b5be8fa1567ece35beab1c8af1761d5d4e00",
  "steem_revision_age": "4 days ago",
  "fc_revision": "636d4530e3ac9e37040d43f1a1ff56caffb38166",
  "fc_revision_age": "33 days ago",
  "compile_date": "compiled on Nov  6 2016 at 02:33:51",
  "boost_version": "1.58",
  "openssl_version": "OpenSSL 1.0.2g  1 Mar 2016",
  "build": "linux 64-bit"
}
```

If you see the updated version, this means you've successfully upgraded your STEEM node :)

#### Steem-in-a-box is an open source project, released under the GNU AGPL 3.0, available at https://github.com/Someguy123/steem-docker
#### Golos-in-a-box is also available, and works exactly the same, but for the GOLOS (голос) network, https://github.com/Someguy123/golos-docker

---

Do you like what I'm doing for STEEM/Steemit?
----
[Vote for me to be a witness](https://steemit.com/~witnesses) - every vote counts. 
----
Don't forget to follow me for more like this.
----

----
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 155 others
properties (23)
authorsomeguy123
permlinksteem-in-a-box-ready-for-hf15-v0-15-0
categorysteem
json_metadata{"tags":["steem","steem-help","witness-category","tools","development"],"links":["https://steemit.com/steem/@someguy123/steem-in-a-box-deploy-a-new-seed-witness-or-rpc-server-with-a-one-liner","https://fralef.me/docker-and-iptables.html","https://steemit.com/witness-category/@someguy123/seriously-what-is-a-witness-why-should-i-care-how-do-i-become-one-answer","https://github.com/Someguy123/steem-docker","https://github.com/Someguy123/golos-docker","https://steemit.com/~witnesses"],"app":"steemit/0.1","format":"markdown","image":["https://i.imgur.com/XOsLHJQ.png"]}
created2016-11-07 01:39:48
last_update2016-11-07 01:42:18
depth0
children6
last_payout2016-12-08 14:57:57
cashout_time1969-12-31 23:59:59
total_payout_value64.812 HBD
curator_payout_value7.339 HBD
pending_payout_value0.000 HBD
promoted10.000 HBD
body_length6,626
author_reputation103,945,664,283,580
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,703,234
net_rshares99,339,064,087,173
author_curate_reward""
vote details (219)
@dragosroua ·
Thanks, that is helpful. I'm playing with the idea of becoming a witness an this will save me a ton of time.
properties (22)
authordragosroua
permlinkre-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-20161107t065524010z
categorysteem
json_metadata{"tags":["steem"]}
created2016-11-07 06:55:21
last_update2016-11-07 06:55:21
depth1
children0
last_payout2016-12-08 14:57:57
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_length108
author_reputation372,798,229,806,288
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,704,498
net_rshares0
@linkback-bot-v0 ·
This post has been linked to from another place on Steem.


  - [The Daily Tribune: Most Undervalued Posts of Nov 07 - Part I](https://steemit.com/curation/@screenname/the-daily-tribune-most-undervalued-posts-of-nov-07---part-i) by @screenname




Learn more about and upvote to support [**linkback bot v0.5**](https://steemit.com/steemit/@ontofractal/steem-linkback-bot-v0-5-the-reddit-awareness-release). Flag this comment if you don't want the bot to continue posting linkbacks for your posts.

Built by @ontofractal
properties (22)
authorlinkback-bot-v0
permlinkre-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-linkbacks
categorysteem
json_metadata{}
created2016-11-08 19:15:00
last_update2016-11-08 19:15:00
depth1
children0
last_payout2016-12-08 14:57:57
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_length520
author_reputation1,915,954,976,722
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,724,164
net_rshares0
@steevc ·
Just a quick question. How do we promote posts now? There used to be a button, but I don't see it now and there are currently only 2 promoted posts.
properties (22)
authorsteevc
permlinkre-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-20161108t105002946z
categorysteem
json_metadata{"tags":["steem"]}
created2016-11-08 10:48:51
last_update2016-11-08 10:48:51
depth1
children2
last_payout2016-12-08 14:57:57
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_length148
author_reputation1,407,070,025,801,033
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,720,727
net_rshares0
@someguy123 ·
There's a bug, so they disabled the promotion feature for now. I promoted my post before the bug occurred.

https://steemit.com/steemit/@steemitblog/promoted-posts-bug
properties (22)
authorsomeguy123
permlinkre-steevc-re-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-20161108t113120519z
categorysteem
json_metadata{"tags":["steem"],"links":["https://steemit.com/steemit/@steemitblog/promoted-posts-bug"]}
created2016-11-08 11:31:21
last_update2016-11-08 11:31:21
depth2
children1
last_payout2016-12-08 14:57:57
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_length167
author_reputation103,945,664,283,580
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,721,049
net_rshares0
@steevc ·
Ah. Thanks
properties (22)
authorsteevc
permlinkre-someguy123-re-steevc-re-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-20161108t114917020z
categorysteem
json_metadata{"tags":["steem"]}
created2016-11-08 11:48:06
last_update2016-11-08 11:48:06
depth3
children0
last_payout2016-12-08 14:57:57
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_reputation1,407,070,025,801,033
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,721,187
net_rshares0
@vegascomic ·
My Man!  Wish I'd come to this thread long ago.  Took a couple fixes to data/witness_node_data_dir/config.ini but it's up and running now.  Let me know when/if you're on Steemit Chat, I have a question.  Thanks again!
properties (22)
authorvegascomic
permlinkre-someguy123-steem-in-a-box-ready-for-hf15-v0-15-0-20161117t054218741z
categorysteem
json_metadata{"tags":["steem"]}
created2016-11-17 05:42:18
last_update2016-11-17 05:42:18
depth1
children0
last_payout2016-12-08 14:57:57
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_length217
author_reputation37,110,678,013,541
root_title"Steem-in-a-Box - Ready for HF15 (v0.15.0)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id1,785,707
net_rshares0