Starting up a new witness
For information on securing your server please read the official documentation for Smoke witnesses.
If at anytime while using this guide, these instructions are unclear or you get stuck please message me on Discord. You can find be me in the smoke.io Discord group as "J. R. Swab".
- Use the official instructions to install Docker for ubuntu
- Clone the Hotbox Git repository:
git clone https://gitlab.com/jrswab/hotbox
cd hotbox
docker pull jrswab/hotbox
./run.sh
a. To specify ports just add them directly after run.sh eg../run.sh 20001 28090
b. If no ports are specified the script will expose port 2001 to 20001 and port 8090 to 28090../wallet.sh
set_password *PickPassphrase*
unlock *YourPassphrase*
import_key *Your Smoke Private Active Key*
suggest_brain_key
a. This will give you three keys. A private brain key (all words), a private WIF, and a Public WIF in that order from top to bottom.
b. Save these in a safe place. If you can I recommend encrypting them.import_key *Private WIF*
a. Use the private WIF from the suggested brain key command above.ctrl+b
c
to open a new Tmux window./config.sh
a. Vim is also included in the Docker if you prefer that editor. Use./config.sh vim
- Find the line that says
#witness =
a. remove the#
and add your Smoke username
b. eg. witness = "jrswab"
c. Quotes are required. - Find the line that says
#private-key =
a. remove the # and add your private WIF we got from the wallet in step 10.
b. eg.private-key = xxxxxxxxxxxxxxxx
c. No quotes around the key. - Save and exit the config
a. In nano: ctrl + x then y to save the press enter to execute. ./smoked.sh
a. Now the witness is running.
b. Wait until you seehandled block ] Got 1 transactions on block
showing on the screen.
c. Once you see them you can now enable your witness.ctrl+b 0
to go back to the screen with your wallet.update_witness "username" "url" "Public Key" {} true
a. Replace username and url with your information.
b. The "Public Key" is the public key we got from the wallet in step 10.
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.
Now you can go back to the feed with ctrl+b 1
to see the blocks!
Congrats! You are a witness now!
Updating a Current Hotbox Instance
- Disable your witness
update_witness "username" "url" "SMK1111111111111111111111111111111114T1Anm" {} true
- Replace
username
andurl
with your information. - Copy and paste the command into the CLI_Wallet.
- Wait for it to broadcast. You will see some yellow words scroll by and then a group of grayish-white text.
- Close your wallet with
ctrl+d
if open. - Shut down smoked with
ctrl+c
. - Make a copy of your smoke directory:
cp -r ~/hotbox/smoke ~/smokebackup
- Pull the Hotbox Git repository:
cd
- this is to move into your home directory- Remove old rep
sudo rm -r ~/hotbox
(Make sure to double check that your config.ini file is backed up!) git clone https://gitlab.com/jrswab/hotbox
docker pull jrswab/hotbox
./run.sh
- To specify ports just add them to the end eg.
./run.sh 20001 28090
- If no ports are specified the script will expose port 2001 to 20001 and port 8090 to 28090.
- If you have a firewall make sure to open the ports used.
- To specify ports just add them to the end eg.
./smoked.sh
ctrl+b c
to make a new Tmux window../wallet.sh
- Unlock the wallet with your secret passphrase.
- Re-enable your witness.
- Re-lock your wallet (it seems smoked will run fine even if the wallet is locked and it's safer)
Moving a Non Hotbox Witness to the Hotbox
- Disable your witness
update_witness "username" "url" "SMK1111111111111111111111111111111114T1Anm" {} true
- Replace
username
andurl
with your information. - Copy and paste the command into the CLI_Wallet.
- Wait for it to broadcast. You will see some yellow words scroll by and then a group of grayish-white text.
- Use the official instructions to install Docker for ubuntu
- Close your wallet with
ctrl+d
if open. - Shut down smoked with
ctrl+c
. - Make a copy of your smoke directory:
cp -r ~/smoke ~/smokebackup
- Pull the Hotbox Git repository:
cd
- this is to move into your home directorygit clone https://gitlab.com/jrswab/hotbox
- Copy your smoke directory into hotbox:
cp -r ~/smoke/* ~/hotbox/smoke
docker pull jrswab/hotbox:latest
./run.sh
- To specify ports just add them to the end eg.
./run.sh 20001 28090
- If no ports are specified the script will expose port 2001 to 20001 and port 8090 to 28090.
- If you have a firewall make sure to open the ports used.
- To specify ports just add them to the end eg.
./smoked.sh
ctrl+b c
to make a new Tmux window../wallet.sh
- Unlock the wallet with your secret passphrase.
- Re-enable your witness.
- Relock your wallet (it seems smoked will run fine even if the wallet is locked and it's safer)
To get back to the smoked screen to see the blocks fall into place type ctrl+b 0
.
To detach from the Hotbox
ctrl+b c
to open a new Tmux window (needed to detach).ctrl+h
to detach the docker to the background of your server
To enter the Hotbox
./run.sh
(after typing this it may look like it hangs. Just press enter and you will see the docker prompt.)- If it looks like it hangs, if so just press enter to view the prompt
Check if Hotbox is Running
docker container ps -a
.- You should see something like:
8753ea10189a jrswab/hotbox "/bin/bash" 22 minutes ago Up 22 minutes 0.0.0.0:20001->2001/tcp, 0.0.0.0:28090->8090/tcp hotbox
- If you see the work "exited" your Hotbox is not running. To restart, run:
docker rm hotbox
run.sh
- You should see something like:
Hope this docker is helpful in making running a witness more predictable and reliable.
If you have any ideas on how to make this better please let me know or submit a pull request.
Thank you JR. Excellent work.
Thank for the kind words mate <3
Great guide, keep up the good work @jrswab 👍
Thank you!
Hi @jrswab, can hotbox be setup on a dedicated server with a service like AWS, or is this geared for a home server?
Both! It's always better to run a witness on a very reliable host.
Absolutely, as reliable as possible is the name of the game! Just wasn't sure if this was built to be compatible with both types of setups but apparently it is which is great.
Helpful. Thank you.
Welcome <3
I m new to this. Just want to know can i be a witness ?
For sure! As long as you are willing to learn Linux