Skycoin Forum

Full Version: DIY Skyminer on raspberry pi devices
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
INTRO

I wrote some simple scripts to setup your skiminer on raspberries pi, available on github.

Here is a short and extremely easy tutorial to set up your skyminer using raspberry pi (RB) devices. I used Raspberries pi 3 B+ with OS raspbian lite.


FLASH YOUR SD CARD

I downloaded the official OS raspbian lite. I chose the lite version because we don't need a desktop environment, the install is faster, and occupies les space (less than 1Gb).

Flash your SD card from:
Before removing the SD card from your pc/mac, you can activate ssh by adding a file named ssh (no extension) to the visible part of the SD card. Upon the next reboot of your RB, ssh will be activated. From windows, use MobaXterm, PuTTY or similar to connect to your RB with ssh. If you can't figure out how to do this, connect a monitor and a keyboard to your RB and proceed to the next step.


FIRST BOOT AFTER INSTALL

Let's boot the RB.

If you did not activate ssh, you can simply connect a monitor (HDMI) and a keyboard (USB) to the RB. In that case, you first log in with user pi and password raspberry. Also, you can now activate ssh from your RB:

Code:
sudo touch /boot/ssh
reboot

Upon reboot, you will be able to connect to your RB with ssh as described above and get rid of the monitor and keyboard. You can continue the installation process without ssh. However, I recommend you use ssh in order to overcome problems like bad configured keyboards. Also, it's really more comfortable to use ssh.

You can now connect to your RB from any device connected to your local network. For Linux/Mac, open a terminal and write:

Code:
ssh pi@<IP_OF_YOUR_RB>

For windows, use MobaXterm, PuTTY or similar.

From here on, it doesn't matter whether you connect through ssh or use the RB with monitor and keyboard setup. Let's log into our RB.

The default password for the user pi is raspberry. Once logged in, you can reset that password with:

Code:
sudo passwd pi

Also, reset the password of the root, as we will need the root in the coming sections:

Code:
sudo passwd root

Other useful commands:

Code:
sudo -i # or simply su to become root
sudo raspi-config # to setup basic stuff like wifi connection, timezone, keyboard, etc


SKYWIRE MANAGER AND NODES

One RB must run the skywire manager which manages the skywire nodes. That same RB can also run a node. The installation described below is exactly the same for each RB. However, you have to choose which RB will run the manager:

  1. Choose the RB which will run the manager
  2. Make sure the RB is connected to your local network (with wifi or ethernet)
  3. From a browser on any device connected to your local network, go to your router (typically 192.168.1.1 or 192.168.0.1)
  4. Locate your RB and set its IP as static
  5. Write the static IP down. Let's call it STATIC_IP (we'll refer to it later).
This is important! It makes sure that the IP of your RB which runs the manager (i.e. STATIC_IP) does not change. That way, the other RB nodes will be able to find the manager easily.


INSTALLATION

This is actually the easiest part! Log into your RB providing your user (pi) and password, download the install scripts from github, and execute them. Once logged in:

Code:
# first install git to download the scripts from github
sudo apt-get install git

# cd to the directory we want to download the scripts
cd /home/pi # for example

# download the scripts
git clone https://github.com/MFnx/skywire.git
cd skywire # cd into the downloaded skywire folder

# become root
sudo -i

# execute the install script
bash setup.sh --all --manager-ip STATIC_IP # STATIC_IP is the IP you wrote down before

At the end, your RB will reboot. You can now remove the folder /home/pi/skywire if you want to. Do the same for each RB, using the same STATIC_IP every time. The skywire services are run automatically upon each rebooot of your RB (give it a minute or two), so you won't have to do that manually.


SKYWIRE MANAGER

You can access the skywire manager from a browser on any device connected to your local network. Just enter STATIC_IP:8000. There you'll be able to monitor your nodes (you'll find the public and private keys there).


WHITELIST YOUR MANAGER

https://github.com/skycoin/skywire/wiki/...ing-System
very good.

You can skip out the keyboard and monitor part by adding an SSH file to the SD card while its in your device as you image it. Just make a file called ssh.txt and drag it over.

Overall well done tho!
(07-12-2019, 08:30 AM)I Am You Wrote: [ -> ]very good.

You can skip out the keyboard and monitor part by adding an SSH file to the SD card while its in your device as you image it. Just make a file called ssh.txt and drag it over.

Overall well done tho!

Thank you! I mentioned how to activate ssh when flashing your SD in the section: FLASH YOUR SD CARD

The file should have no extension though (i.e.: ssh, not ssh.txt)
Works like a charm! Thanks!