Steem-in-a-Box - Ready for HF15 (v0.15.0)
steem·@someguy123·
0.000 HBDSteem-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></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.
----
----👍 someguy123, bosjaya, joele, riscadox, jsg, secom, ioc, leesunmoo, wang, joseph, aaseb, runridefly, anomaly, teamsteem, immortalfame, lamech-m, goose, karen13, taker, zaxar, ullikume, thegoodguy, mipob, stiletto, paco-steem, spaninv, applecrisp, steempredict, cryptoctopus, grandpere, godzilla, coinbitgold, felhagara, ditarcanekiller, fyrstikken, davidjkelley, ethical-ai, strong-ai, digital-wisdom, jwaser, herpetologyguy, cryptofunk, kanoptx, thecryptodrive, bravenewcoin, steemdrive, annieb, biternator, steemsports, expanse, portuguesinha, globeskeptic, jesusislord, allpunk, webdeals, thewhitewolf, ap2002, andrewawerdna, ervin-lemark, jaycobbell, bitcoiner, elena000, nano2nd, trifevilona, gifts, salkree, asarez, remlaps, tygrathnuarin, barals, floridagypsy, faddat, asmolokalo, marialin, iamthebeloved, elijahgentry, steemleak, bitchplease, exploretraveler, snowden, chazerrez, newfermiones, laurareverria, shadowness, armen, jl777, proto, dares, kagalkiso, morning, shataxemanabor, hudorshagami, coleretton, vip, leveretty, mereonnizi, taoteh1221, denrecirez, wesres, dmacshady, kindermix, marev, barrshaktilar, elokat, minofenid, canadian-coconut, bitcoinparadise, voterinterstpool, klye, jrcornel, ausbitbank, christoryan, christoph3, krystle, debmund, r4fken, siniceku, blueorgy, dgiors, onthewayout, dantheman, rishi556, bitshares101, nonlinearone, allmonitors, monster-energy, dragonslayer109, collabornation, vannour, ace108, dragosroua, raluca, astrologybits, phenom, mokluc, cih, ianstrat, rmach, sudipdasin, bleujay, funnyman, cryptomental, elyaque, benjojo, arcange, picokernel, vratnik, xeldal, enki, mineralwasser, bingo-0, bingo-1, boombastic, thecryptofiend, luisucv34, future24, kingscrown, josem11200, steempty, bue-witness, bue, mini, boy, healthcare, bunny, daniel.pan, moon, helen.tan, chryspano, marto, rxhector, animus, mapesa, the-ego-is-you, toxonaut, claudia, dailybitcoinnews, xochicotta, senseiteekay, rawnetics, smooth, smooth.witness, jfesrom, gutzofter, mada, levycore, adelja, steemvest17, drac59, steevc, infovore, food-creator, sochul, caminito, celsogoya, vegascomic, antro735, anonymous, hello, world, fufubar1, xeroc, michaelx, cryptojoy.com, lindo, blakemiles84, albertogm, gomeravibz, brendio, nulliusinverba, tracemayer, pairmike, steve-walschot, mrhankeh, raymondspeaks, ct-gurus, dhrms, ianboil, chitty,