

Staking Spectrecoin on your Raspberry Pi is really easy to set up. Just follow this guide and you can sit back and watch your Pi do the work for you!

— — — — — — — —

Summary

Flash the latest Raspi image from the official Spectrecoin Github onto your SD-card. Look for the file Spectrecoin-*-RaspbianLight.zip

-> https://github.com/spectrecoin/spectre/releases/latest Start your Raspberry pi with the SD-card inserted and connect it to your router Login to your Pi via SSH and change the SSH password and the RPC password. Transfer your wallet.dat file to the directory /home/pi/.spectrecoin/ on the Pi. Start the wallet and unlock it for staking only. Now you can exit and let the Raspberry Pi do the staking for you!*

*Note: The initial syncing process can take a while, just be patient.

— — — — — — — —







1. Preparations, what you need to get started



To stake Spectrecoin on your Raspberry Pi, make sure you have the following things prepared:

Raspberry Pi (including power adapter of course)

microSD card + adapter

LAN cable, if you don’t want to stake via WIFI

Spectrecoin wallet.dat file with your balance







2. Download the latest Raspi image

You can find the latest Raspi image on the official Github repository of Spectrecoin in the ‘releases’ section. Look for the file Spectrecoin-*-RaspbianLight.zip

https://github.com/spectrecoin/spectre/releases/latest

After you have downloaded the image, use a tool like Etcher (https://www.balena.io/etcher) to flash the image onto your SD-card.

3. Boot up the Pi and log in via SSH



Insert the micro-SD card with the Spectrecoin image on it into the Raspberry Pi and boot it up. Use the LAN cable to connect the Pi to your router.

Now you need to find out which IP address your Pi has, so you can access it via SSH. To do this simply log into to your router and view the devices on your network. You can also use one of the many programs available to scan IP addresses of the devices on your network.

Now you can access your Raspberry Pi directly via SSH

username: pi

password: raspberry

On Mac: open terminal and type: ssh pi@IPaddressofyourPi

On Windows: use an SSH client (e.g. MobaXterm) and access the Raspberry Pi at it’s IP address







4. Change the SSH and RPC passwords



Once logged in to your Pi it is important to change the default passwords for security reasons. First change the SSH password, to do this type ‘passwd’ and enter a new password.

Make sure the wallet is not running by typing ‘wallet-stop’. To change the RPC password type ‘nano ~/.spectrecoin/spectrecoin.conf’. This will open the config file, there you need to edit the RPC password, make sure to make it a very long and random password. Once that is done press CTRL+X to save the changes and exit .

Note: To get a truly random password, you can issue the following on the cmdline and use the resulting output:

cat /dev/urandom | tr -dc ‘a-zA-Z0–9’ | fold -w 44 | head -n 1







5. Copy your wallet.dat file to your Raspberry Pi



Now it is time to move your wallet.dat file over to your Raspberry Pi. Your wallet.dat file needs to be copied to /home/pi/.spectrecoin/



Note: files/directories starting with a dot are hidden. If you can't find it, make sure to activate the option to display all files/directories.



You can do this via one the of the many available file transfer programs.

If you want to do this via USB you first need to mount the USB stick before you copy the wallet file into the target directory (see for instance here: https://www.raspberrypi-spy.co.uk/2014/05/how-to-mount-a-usb-flash-disk-on-the-raspberry-pi/)

6. Start your wallet and begin staking!

Type in ‘ui’ to start the Spectrecoin rpc-wallet-ui. This neat interface allows you to conveniently interact with the Spectrecoin wallet on your Raspberry Pi. Just go to ‘Unlock’, type in your password and the staking can begin once the wallet is fully synced. Once you are done press ‘Quit’ and make sure to select the option to keep the daemon running. The initial syncing process can take a while, just be patient.



If you want to view the syncing progress, exit the UI as described above and then execute this: tail -f ~/.spectrecoin/debug.log

Once the value height= is at the level of the current blockchain height, it is fully synced. To exit the log view, press ctrl+c.

Note: If you want to shut down your Raspberry Pi make sure to log in and type ‘wallet-stop’ before you do this, otherwise it could lead to a corrupted blockchain file and you would need to resync from scratch.

Happy staking!