create account

Steem-in-a-box for v0.17.0 by someguy123

View this thread on steemit.com
· @someguy123 ·
$17.99
Steem-in-a-box for v0.17.0
Hardfork 17 has been very controversial. Despite this, I've produced a docker image for v0.17.0 for those who do want to upgrade, however it was [postponed today](https://steemit.com/hardfork-17/@steemitblog/patience-with-the-hardfork-there-must-be-consensus). There may have been bug fixes, memory improvements etc. so you can still upgrade if you want without any negative effects.

##### 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 (e.g. witnesses).

----

### Are you looking for a new hosting provider? @Privex are offering low-cost dedicated and virtual servers with a 100% Block-Miss SLA for witnesses (we pay you $2 for every block miss caused by our service). Message me on [STEEMIT.CHAT](https://steemit.chat/direct/someguy123) or email `sales [at] privex.io` (We accept STEEM and most other cryptos, as well as PayPal)


----

# What is Steem-in-a-box?

<center>![](https://i.imgur.com/XOsLHJQ.png)</center>

Steem-in-a-box (or just SIAB for short) is a small piece of software I wrote for deploying STEEM nodes (and GOLOS), it is updated alongside my docker images. SIAB is used by quite a few witnesses including myself @someguy123, @chitty, @arcange, @thecryptodrive and many more due to it's ease of use.

Technical details: SIAB is a set of bash scripts which assist with deployment of the STEEM docker images which I create, source available here: https://github.com/Someguy123/steem-docker

Since I never properly explained the "SHM Fix" in a single up to date guide, I've decided to include an up to date fresh install, and upgrade guide for Steem-in-a-box (for witnesses)

**If you're upgrading, skip to the bottom of this article for upgrade instructions from HF16**

# Fresh install 

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

If you're a witness, you'll need to add your name and private key to the `config.ini`, as well as adjust the shared memory size depending on how much RAM you're willing to give it.

Open `data/witness_node_datadir/config.ini`, and adjust the size of the shared memory file as needed. 8GB is the minimum for a witness, 12GB is the default and recommended if you have enough RAM for that.

```
# Remember to comment out p2p-endpoint and rpc-endpoint if they're not needed
# p2p-endpoint is for SEED nodes, rpc-endpoint is for RPC's but it also allows inspection
# of your witness's synchronization state
shared-file-size = 12G
# If you want to use the disk instead of memory, change to /steem/ instead of /shm/
shared-file-dir = /shm/
```

Now, make sure you adjust the `/dev/shm` size to the size you put in the config (preferably bigger). If you don't have enough RAM for this, you should reduce the shared memory size or you'll risk missing blocks. You may be able to get away with using SWAP, however I cannot guarantee that you won't miss blocks if you do that.

```
# Adjust /dev/shm to 13gb
./run.sh shm_size 13G
```

----

### 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. It does not "mine" or "witness" blocks.

**Steem-in-a-box comes preconfigured as a seed, and will automatically attempt to expose PORT 2001 to the world. You DO NOT need to follow the instructions below unless you want to change the port.**

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 named "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 the server

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 FROM HF16

For those of you with an existing HardFork 16 installation (of steem-in-a-box), the following instructions will get you up to date:

**Disable your witness, or change it to your backup key**

```
./run.sh wallet

locked>> unlock "supersecurepassword"
unlocked>> update_witness "someguy123" " " "STM1111111111111111111111111111111114T1Anm" {"account_creation_fee":"30.000 STEEM","maximum_block_size":65536,"sbd_interest_rate":300} true
```

Now stop the witness server

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

Delete any old leftover docker containers

```
docker rm {seed,witness}
```

Now, make sure you delete the `/dev/shm` files, as they will not be compatible with HF17 and need to be re-built

```
rm -rf /dev/shm/*
```

Finally, upgrade your steem-in-a-box, then start it with replay

```
git pull
./run.sh install
./run.sh replay
```

You can now check the logs with `./run.sh logs` and see that it's rescanning the blockchain. Once it's fully replayed, you can re-broadcast your witness :)


---

**Tired of missing blocks?** @Privex are offering low-cost dedicated and virtual servers with a **100% Block-Miss SLA for witnesses** (we *pay you* $2 for every block miss caused by our service). 

Message me on [STEEMIT.CHAT](https://steemit.chat/direct/someguy123) or email `sales [at] privex.io` (We accept STEEM and most other cryptos, as well as PayPal)

---

# 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 129 others
properties (23)
post_id2,200,194
authorsomeguy123
permlinksteem-in-a-box-for-v0-17-0
categorywitness-category
json_metadata"{"format": "markdown", "links": ["https://steemit.com/hardfork-17/@steemitblog/patience-with-the-hardfork-there-must-be-consensus", "https://steemit.chat/direct/someguy123", "https://github.com/Someguy123/steem-docker", "https://steemit.com/witness-category/@someguy123/seriously-what-is-a-witness-why-should-i-care-how-do-i-become-one-answer", "https://steemit.com/~witnesses"], "app": "steemit/0.1", "tags": ["witness-category", "witness-update", "witness", "steem"], "users": ["privex", "someguy123", "chitty", "arcange", "thecryptodrive"], "image": ["https://i.imgur.com/XOsLHJQ.png"]}"
created2017-03-20 17:55:54
last_update2017-03-20 17:55:54
depth0
children3
net_rshares9,053,325,057,254
last_payout2017-04-20 18:59:48
cashout_time1969-12-31 23:59:59
total_payout_value16.278 SBD
curator_payout_value1.715 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length8,121
author_reputation80,455,466,172,351
root_title"Steem-in-a-box for v0.17.0"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (193)
@camb ·
$0.09
I tried installing a Steem node a few weeks ago without success. every time I restarted it it would get stuck syncing and would not complete. I'll try SIAB. Thank you!
👍  
properties (23)
post_id2,200,241
authorcamb
permlinkre-someguy123-steem-in-a-box-for-v0-17-0-20170320t175920209z
categorywitness-category
json_metadata"{"app": "steemit/0.1", "tags": ["witness-category"]}"
created2017-03-20 17:59:21
last_update2017-03-20 17:59:21
depth1
children1
net_rshares140,898,136,327
last_payout2017-04-20 18:59:48
cashout_time1969-12-31 23:59:59
total_payout_value0.087 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length167
author_reputation2,733,170,135,442
root_title"Steem-in-a-box for v0.17.0"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@mattgimel · (edited)
Hi Camb, How did your installation of SIAB go.. I just setup mine up and was able to sync under a day.. Now I am not sure what to do next.. my account on https://steemd.com/@mattgimel.. still now mined: false.. Now sure when  my server will start processing blocks or am I missing a step. ??
👍  
properties (23)
post_id4,155,145
authormattgimel
permlinkre-camb-re-someguy123-steem-in-a-box-for-v0-17-0-20170616t215704111z
categorywitness-category
json_metadata"{"app": "steemit/0.1", "links": ["https://steemd.com/@mattgimel"], "tags": ["witness-category"]}"
created2017-06-16 21:57:03
last_update2017-06-16 21:57:36
depth2
children0
net_rshares0
last_payout2017-06-23 21:57:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length291
author_reputation120,534,427,956
root_title"Steem-in-a-box for v0.17.0"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)
@freebornangel ·
Now that is customer service,...
👍  , ,
properties (23)
post_id2,201,084
authorfreebornangel
permlinkre-someguy123-steem-in-a-box-for-v0-17-0-20170320t193012187z
categorywitness-category
json_metadata"{"app": "steemit/0.1", "tags": ["witness-category"]}"
created2017-03-20 19:30:15
last_update2017-03-20 19:30:15
depth1
children0
net_rshares15,931,922,807
last_payout2017-04-20 18:59:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length32
author_reputation75,470,595,669,689
root_title"Steem-in-a-box for v0.17.0"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (3)