coininstant's instagram Feed : 2019/03/29 08:47:13 How to set up a Smoke.io Witness Hotbox with Digital Ocean on Ubuntu Bionic - 20 step guide!

in #share2steem6 years ago (edited)

Special thanks to J.R. Swab (@jrswab) for shining the light onto the darkness of smoke for me '&&' creating the very first helpful guides I followed!

F771E000-7FE6-4C44-BB50-DA3EE09B8138.JPG
Wow I’m glad JR kept such a clear head and made this awesome latest open source guide for us to follow!

https://smoke.io/guide/@jrswab/update-your-witness-to-v0-0-6-hotbox-update

This post is about how I followed his steps and any other steps or tricks I stumbled upon my way to setting up my new smoke.io witness @hightimes on Smoke.io!

For this example I started with an Ubuntu Docker 18.09.2~3 18 Image from Digital Ocean's new pre-build distribution marketplace, nice! However for this example that was not important because I ended up installing docker-ce | 5:18.09.4~3-0~ubuntu-bionic Docker CE as per the official instructions!

D7086322-336B-430B-A718-4997B1B9558F.JPG

Video - Click on the Image to Play

bandwith-public.png

Getting Started

The first thing I did was set up a new server at Digital Ocean. I just spun up the most Docker compatible looking one they had, also the cheapest one for now because I am just learning and can always upgrade later. The first thing we do is ssh into your root server and create another user and give them Sudo privileges. After that we will need to install Docker CE and make sure we use that correct runtime environment.

Also make sure to verify there is a Docker group and add your user to the group so you can run all Docker commands without sudo.

Smoke Witness in a Nutshell!

Now the fun part begins, simply git clone (download) the smoked repository form GitHub, and also the JrSwab Hotbox Docker Code, test cmake .. the smoked build Directory & check for potential dependency errors! Now back it all up and copy it over to the inside of your new Hotbox; after you create a new empty smoke directory of course. (I know this looks like a typo on the previous sentence "smoke", but I did not forget the d!) This is to link the outside smoked directory up to the smoke directory inside the hotbox.

Secure Your Server!

Security is very important, and very easy, so always remember to never run as root and always set up your UFW firewall ports!

If you don’t follow all the steps you put the whole network in jeopardy! So UFW is the easiest way to set up your firewall rules and ports!

Enter the Hotbox and breath deep, pull in a deep breath of smoke! lol

Then we have to enter the Hotbox && pull the latest from JrSwab’s Hotbox Gitlab Repo. Once were in the hotbox we run the initial setup, create a new password, passfrase, public key, and then we link your new witness account up to our Smoke.io account by importing your smoke active private key! Once the wallet settings are started, run smoked and wait for the blocks to finish downloading and then enter back into the wallet and update your witness, url, and public key and you should be golden!

Before moving on, if you are not already, familiarize yourself with your new terminal, and follow this tutorial to get started:
https://www.digitalocean.com/community/tutorials/initial-server-setup-with-ubuntu-18-04

Setting up Smoke Hotbox Witness 🤙 #share2steem

Step 1.

ssh into root from your terminal! I suggest using this link to set up and copy your ssh keys to your server so you dont have to use a password to save time!
https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys-on-ubuntu-1604
ssh root@your_server_ip

Step 2.

Create a new user that is not root! I added user coininstant, use your desired username

adduser coininstant

Step 3. add sudo privileges

usermod -aG sudo coininstant

Step 4. Switch to new user account

su coininstant

https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart

Step 5. install Docker CE - Use the official instructions to install Docker for ubuntu

docker-ce.png
I used exactly
docker-ce | 5:18.09.4~3-0~ubuntu-bionic

sudo apt-get install docker-ce=5:18.09.4~3-0~ubuntu-bionic docker-ce-cli=5:18.09.4~3-0~ubuntu-bionic containerd.io
https://docs.docker.com/install/linux/docker-ce/ubuntu/

Step 6. Docker Post Install:

Add user to the Group Docker (copy and paste line below exactly, no need to put your username here) Docker group should be created with but to be thorough make sure with the lines below to add Docker to the Sudo Group. Test with Docker Hello World Script.

Note Docker must be restarted before these changes take place.

sudo groupadd docker

sudo usermod -aG docker $USER

service docker restart

docker run hello-world

OPTIONAL STEP I.E. I added IPV6 here. Just a post install example! (Switch user back to root for this, exit to root to add the file)
exit
nano /etc/docker/daemon.json
added-ipv6-optional.png
https://docs.docker.com/install/linux/linux-postinstall/
use nano editor to add daemon.json file.


Step 7. Set Up Docker to start on boot

If you opted for the optional step then I probably don't have to remind you to remember to log back into your non root account for the rest of this smoking exercise!!

sudo systemctl enable docker

Step 8. Clone Smoked from Github to the home ~

directory of your new user CD ~ means Chang Directory to home, which in my case is the same thing as /home/coininstant/

git clone https://github.com/smokenetwork/smoked


Optional Step! I just installed all the required dependencies from the readme, just in case something was left off the Docker image. I was being thorough here!
Run your own Smoked Dependency Check with cmake below, make sure you can build make smoked without docker. If you do get a cmake error that is still ok because we should be really pulling all the dependencies from the docker image anyway in the next step. This is just a sneak preview for you to take a break and smoke a joint! lol!

build-cmake-test.png


smokeconfigured.png

cd ~

cd smoked

git submodule update --init --recursive
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake ..

https://github.com/smokenetwork/smoked/blob/master/doc/building.md

Step 9. Clone Hotbox From Github to your home ~ if you are not already there!)

cd ~

git clone https://gitlab.com/jrswab/hotbox

Step 10.

Create an empty folder in your new hotbox folder, and name it smoke
make-directory-smoke.png
cd hotbox

mkdir smoke

Step 11

Copy your Smoked Directory into the new empty smoke directory we just created in the hotbox directory.

/home/coininstant/smoked/* ~/hotbox/smoke
(replace coininstant with your user name)
This is what your folder structure should look like!
hotbox-smoke-contents1.png

Step 12. Security

Install UFW and restrict all ports and then allow the range required to run this container.

sudo apt-get install ufw

sudo ufw allow 2001:20001/tcp

sudo ufw allow 2001:20001/udp

sudo ufw allow 8090:20001/tcp

sudo ufw allow 8090:28090/udp

Step 13. Then we have to enter the Hotbox && pull the latest updates from swab’s Hotbox Github Repo!

cd hotbox && docker pull jrswab/hotbox:1.0.0

Step 14. Run & Enter Hotbox

./run.sh && ./enterHotbox.sh

run-sh-and-enter-hotbox.png
Relax because Docker Does the dirty work here for you here!
Docker pulls and builds the programs we just pulled from jrswab!
These are the files docker runs for us. These are the commands.
folder.png
./run.sh
./update.sh
./smoked.sh

Step 15 Switch out of the smoke.sh

Now that the the wallet settings are started, smoke should be running inside the Hotbox, be sure to wait wait for all the blocks to finish downloading
syncing.png

and then exit out with ctrl+b c (below) Ctrl +B C (this means hold combo Ctrl and B, let go of Ctrl & B and then press C I would type directions stacked like below) I did have some trouble with my ctrl+B C but did manage to get it to work.

ctrl+b c

Step 16

./wallet.sh

Step 17

wallet-2.png
Unlock Wallet, set a brand new wallet password, use it to unlock wallet and then import your external smoke.io active private key! Essential to link your smoke account up to the new witness account wallet. Finally use suggest_brain_key to create your brain_priv_key, wif_priv_key, and your pub_key (keep track of these you will need them)!
Screen Shot 2019-03-30 at 4.50.23 PM.png
set_password yoursupersecurepasswordgoesherenoquotes
unlock yoursupersecurepasswordgoesherenoquotes
import_key yoursupersecurepasswordgoesherenoquotesthisonefromyoursmokeioactiveprivatekey
suggest_brain_key

Step 18

ctrl+b c to open a new Tmux window Use nano or Vim to edit your config file
Screen Shot 2019-03-30 at 4.04.02 PM.png
cd smoke/witness_node_data_dir/
nano config.ini

Find the line that says #witness = remove the # and add your smoke.io username quotes are required. i.e. witness = "hightimes"

Find the line that says #private-key =
remove the # and add your private WIF we got from the wallet in previous step i.e. eg. private-key = xxxxxxxxxxxxxxxx and (no quotes around this key) Edit with nano with commands below, save and exit nano ctrl + x

ctrl + x

Step 19 Re-enable your witness.

(Replace my username & url with yours. Also use the pub_key generated in the previous step. My example string is below:

./smoked.sh

update_witness "username" "url" "Brain Wallet Public Key Here" {} true

update_witness “hightimes” "https://smoke.io/@hightimes" "SMK5xU5KG4GyjffoUw99ohzfVhMe2WqTmzbwUAsjL4uhtVp8Ek3Nq" {} true

b. Replace username and url (optional) I just set it to my blog on smoke.io but usually this would be better for your first witness post.
c. Copy and paste the command into the CLI_Wallet.
d. Wait for it to broadcast. You will see some yellow words scroll by and then a group of grayish-white text.

Step 20

  1. Re-lock your wallet with lock
  2. ctrl+b 0 to see witness log
  3. To leave the hotbox
  4. a. ctrl+b c to get an empty tmux window
  5. b. ctrl+h to exit docker and keep in running
  6. c. Once out use docker ps -a to make sure your docker hotbox is still running.

Pat yourself on the back, you deserve a smoke, sit back relax and roll dube! Don’t forget to Go Vote for yourself too, and if your happy with this post go throw a vote down for @jrswab & #me @hightimes too on smoke.io!
hotbox-container1.png

Housekeeping - i.e. Re Enter your hotbox!

./enterHotbox.sh

Check whats going on back in your server from here:

Ctrl + B 1

enterHotbox.png

Helpful Links:

https://docs.docker.com/install/linux/docker-ce/ubuntu/

https://docs.docker.com/install/linux/linux-postinstall/

https://docs.docker.com/engine/reference/commandline/rm/

https://github.com/smokenetwork/smoked

https://github.com/smokenetwork/smoked/blob/master/Dockerfile

https://github.com/smokenetwork/smoked/blob/master/doc/building.md

https://smoke.io/guide/@jrswab/update-your-witness-to-v0-0-6-hotbox-update

https://www.bitchute.com/video/-TDVmen14AM/

hightimes-reddot.png


Screen Shot 2019-03-29 at 6.01.37 PM.png


coininstant

hightimes_4_witness_smoke.gif
Go to https://smoke.io/~witnesses
and type hightimes in the box at the bottom.


Posted from Instagram via Share2Steem

Sort:  

@coininstant,
Congratz bro really useful and I wish you might think about running a witness node on STEEM too!

Cheers~

Oh for sure, I did not realize how easy all this steem stuff is! lol jk! Oh yeah for sure I want to run a steem node too, I just had to start with the smaller blockchain for now while I learn.

Congratulations broo

Opportunities come infrequently. When it rains gold, put out the bucket, not the thimble

I not understand what is this?

Oh I didn’t either about 24 hours ago, but I learned! It is just the witness hotbox program over on Steem’s clone SMOKE for smoke.io! I like to post so I remember how i did setups.

Posted using Partiko iOS

Hope your work is not troublesome.😁

That's a good guide, Steem witness next?

Posted using Partiko Android

Congratulations for your post. I appreciate your post.. thanks for visiting my post

wHAT THE HECK DOES SMOKE.IO DO?

Smoke.io is just the steemit condenser webapp front end linked up to the smoke blockchain! It is a clone of steemit, but for pot related posts! I’m using it to learn all about steemit and how it works! It is helpful to have so I can see the diffs!

Thanks. Good to know.

Posted using Partiko iOS

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

Looking for some fun games to play on Steemit? Try your luck with Magicdice or Drugwars

Immediately you can not figure it out, but if you follow the instructions step by step, I think it will turn out

Thanks, it is on my list. I started with the easiest and working my way up.

Posted using Partiko iOS

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.029
BTC 61204.65
ETH 2452.61
USDT 1.00
SBD 2.58