This thread is an update to my first Reddcoin staking tutorial
that was written 7 months ago. The reason for the update
My Reddcoin Core software crashed and became unusable. My Raspberry Pi 3B would lag and freeze, I couldn't stake anymore.
Instead of just redoing everything the same way, I wanted to see if I could improve on 3 points:
- Use an OS that was lighter
- Update the Reddcoin Core software (220.127.116.11 => 18.104.22.168)
- Make improvements to the configuration.
If you would like to tip me
- OS: using Lubuntu instead of Ubuntu MATE. Lubuntu uses less resources (130 MB RAM vs. 190 MB RAM on initial boot).
- Reddcoin Core: v22.214.171.124-a8767ba-beta instead of v126.96.36.199-92768f9-beta.
- Swap: using a swap partiton instead of a swap file. Also adjusting the swap size: from 1 GB to 2 GB, after reading the comments to my previous tutorial.
- All data to USB: Blockchain data and the swap are now stored on the USB drive, instead of the SD card.
- Private keys: added instructions on how to backup the private keys of your Reddcoin addresses!
Writing a tutorial like this takes time and effort; tips are appreciated. My Reddcoin address: RqvdnNX5MTam855Y2Vudv7yVgtXdcYaQAW
- Hardware: Raspberry Pi 3 Model B.
- OS: Lubuntu 16.04.2 (Xenial).
- Storage space: I am using an 8 GB microSD card for the OS, and a 128 GB USB drive for data. Minimums I would recommend: 8GB SD card and 32 GB USB drive.
- Reddcoin Core client version: v188.8.131.52-a8767ba-beta (most recent version at this moment). ↳ Screenshot
- You need software to write the OS to the SD card. I use Etcher. Download Etcher: https://etcher.io/.
- Run Etcher.
- Select image: select the lubuntu-16.04.2-desktop-armhf-raspberry-pi.img.xz file.
- Select drive: select your microSD card.
- Plug the SD card into your Raspberry Pi and power it up.
- Lubuntu should boot up.
- Set up Lubuntu, connect to the internet (wired or wireless). ↳ As username, I chose "rpi3b". You will see this username throughout this whole tutorial.
- Make sure date and time are correct ([Menu] > System Tools > Time and Date). ↳ Click on Unlock to make changes. I personally change Configuration to "Keep synchronized with Internet servers". ↳ Screenshot
- Reboot ([Menu] > Logout > Reboot). I am connected to wifi, but have issues getting wifi to work on initial boot. A reboot solves this issue.
- Make sure system is up-to-date, install never versions.
- Open LXTerminal ([Menu] > System Tools > LXTerminal). ↳ Screenshot
- Enter the following in LXTerminal: sudo apt update && sudo apt upgrade ↳ Screenshot
- You will be asked if you really want to continue. Enter Y (yes).
- Updates are being installed! Wait until it's finished.
- Install programs that will be used in this tutorial.
- GParted: to partition the USB drive.
- Htop: to see the amount of memory (RAM) and swap that is in use.
- Enter the following in LXTerminal to install these 2 programs. sudo apt install gparted && sudo apt install htop ↳ Screenshot
- Create 2 partitions on the USB drive: 1) Swap partition 2) data partition (for the Reddcoin blockchain) The swap partition is necessary: The Reddcoin wallet can be memory intensive. To prevent any crashes or freezes, add 2 GB of 'virtual' memory by creating a swap partition.
- Important: Backup your USB drive if needed. The USB drive will be formatted, so the data on the USB drive will be wiped.
- Please use the USB drive solely for this purpose, do not combine it with other stuff.
- Keep your USB drive plugged in, do not (randomly) plug it out.
- Plug your USB drive in.
- GParted will be used to create the partititons. Start GParted via LXTerminal: sudo gparted ↳ Screenshot
- In GParted, switch from your SD card (default) to your USB drive. ↳ Screenshot ↳ Screenshot
- You will now see the all the partition on USB drive. Delete every partition (right mouse click). If you can't select Delete, do an Unmount first. ↳ Screenshot ↳ Screenshot
- After deleting all partition, you will only see 'unallocated' space on your USB drive. ↳ Screenshot
- Create the first partition: the swap partition. Right click on the blank space, select New and enter the following:
- New size (MiB): 2048
- File System: linux-swap
- Click on Add. ↳ Screenshot
- Create the second partition: the data (blockchain) partition. Richt click, select New and enter:
- File system: ext4
- Label: usb
- Click on Add. ↳ Screenshot
- Apply the changes. Click on the check mark or select Edit > Apply All Operations. ↳ Screenshot ↳ Screenshot
- Important: The name of the swap partition is needed later, so please write it down. Mine is /dev/sda1 (first partition on first drive (drive 'a')). ↳ Screenshot
- Reboot. After the reboot, the data partition you just created should be visible on your desktop. ↳ Screenshot
- The swap partition is created, so now we can enable and use it.
- The swap in use can be monitored with the program Htop. Open Htop ([Menu] > System Tools > Htop) to see the 'Swp' (swap) in use. ↳ Screenshot By default, swap is not used, so 0K. ↳ Screenshot You can leave Htop open.
- To enable the swap partition, open LXTerminal and enter the following commands: (Assuming /dev/sda1 is your swap partition.)
- You've enabled the swap partition. Switch back to Htop and check the 'Swp' (swap) value. It should read '2.0G'. ↳ Screenshot
- To make sure the swap file is persistent (so it survives a reboot), you have to add a line to the /etc/fstab file.
- In LXTerminal, enter the following command to open the file in Leafpad (text editor): sudo leafpad /etc/fstab ↳ Screenshot
- In Leafpad, add this text in a new line: /dev/sda1 swap swap defaults 0 0 ↳ Screenshot (I've added spaces to vertically align the text.)
- Save and close the file.
- Reboot your Pi.
- To see if the swap partition is in use after a reboot, open Htop ([Menu] > System Tools > htop) and check the 'Swp' (swap) value. It should read '2.0G'. ↳ Screenshot
- So, the swap partition is enabled and in use, and the data partition is prepared. We now can install the necessary software for the Reddcoin wallet; enter the following commands into LXTerminal:
- sudo apt-get update && sudo apt-get install git build-essential libqt4-dev libprotobuf-dev protobuf-compiler libtool autotools-dev autoconf libssl-dev libboost-all-dev wget pkg-config ↳ Screenshot
- sudo add-apt-repository ppa:bitcoin/bitcoin ↳ Screenshot
- sudo apt-get update
- sudo apt-get install db4.8 ↳ Screenshot ↳ Screenshot
- sudo apt-get install libminiupnpc-dev ↳ Screenshot
- sudo apt-get install libqrencode-dev ↳ Screenshot
- Reboot your Raspberry Pi.
- After the reboot, open LXTerminal again. Download, unpack, configure, build and install Berkeley DB.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.) ↳ Screenshot
- sudo wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz ↳ Screenshot ↳ Screenshot
- sudo tar xfvz db-4.8.30.NC.tar.gz ↳ Screenshot
- cd db-4.8.30.NC
- cd build_unix
- sudo ../dist/configure --enable-cxx
- sudo make This took about 10 minutes for me.
- sudo make install
- Set BerkeleyDB variables (in LXTerminal):
- export CPATH="/uslocal/BerkeleyDB.4.8/include" ↳ Screenshot
- export LIBRARY_PATH="/uslocal/BerkeleyDB.4.8/lib" ↳ Screenshot
- sudo leafpad /etc/ld.so.conf.d/daemon-libs.conf ↳ Screenshot
- Add this line in Leadpad: /uslocal/BerkeleyDB.4.8/lib/ ↳ Screenshot
- Save and close the file.
- Back in LXTerminal: sudo ldconfig ↳ Screenshot
- Download the source of the Reddcoin wallet and build it.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.)
- Download Reddcoin Core source files: sudo wget https://github.com/reddcoin-project/reddcoin/archive/arm_support_v2.zip ↳ Screenshot ↳ Screenshot
- Unzip the file: sudo unzip arm_support_v2.zip ↳ Screenshot
- rename the folder from ''unzip arm_support_v2'' to ''reddcoin'' (easier to use when needed) sudo mv reddcoin-arm_support_v2/ reddcoin/ ↳ Screenshot
- cd reddcoin ↳ Screenshot
- sudo ./autogen.sh ↳ Screenshot
- sudo ./configure --disable-tests --enable-sse2=no ↳ Screenshot
- sudo make ↳ Screenshot ↳ Screenshot ↳ Screenshot (This will take some time; with me it took just over 1 hour.)
- sudo make install ↳ Screenshot ↳ Screenshot
- Speed up synchronizing with the Reddcoin blockchain by bootstrapping.
- Set the working directory to your USB drive: cd /media/rpi3b/usb (rpi3b is the username I chose; if you have a different username, change it to yours.)
- Download the bootstrap file (1.45 GB): sudo wget https://github.com/reddcoin-project/reddcoin/releases/download/v184.108.40.206/bootstrap.dat.xz ↳ Screenshot ↳ Screenshot
- Unpack the file (large file, takes around 15 minutes to unpack): sudo xz -d bootstrap.dat.xz ↳ Screenshot
- After a successful unpack, your will find the file bootstrap.dat in your USB root folder. ↳ Screenshot
- On the first run of the Reddcoin Core client, it will ask for a data directory to store the blockchain and wallet data.
- Start the Reddcoin Core client: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot
- The welcome screen will appear and ask you about the data directory. I suggest a new folder on your USB drive, I picked blockchain. The directory will be created with all the necessary files. ↳ Screenshot
- Select Use a custom data directory. ↳ Screenshot
- Click on the three dots (...) on the right. ↳ Screenshot
- Click on Create Folder at the upper right corner. Type and enter in the folder name. (In my case: blockchain.) Click on Open. ↳ Screenshot ↳ Screenshot ↳ Screenshot
- After selecting the directory, the Reddcoin Core client will start. Wait till it's fully loaded and close it.
- Move the bootstrap.dat file to your data directory you selected in the previous step. By doing this, Reddcoin Core will use the bootstrap.dat file to import the blockchain, which speeds up syncing. sudo mv bootstrap.dat /media/rpi3b/usb/blockchain/ (Assuming blockchain as data directory.) ↳ Screenshot
- The Reddcoin Core client set up is completed, but you still have to sync fully with the blockchain before you can send, receive and stake.
- Launch the Reddcoin Core client again: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot ↳ Screenshot
- Keep the client running until it's fully synchronized. It will use the bootstrap file first, and download the rest of the blockchain to complete the sync. This can take some time (it took 2 days for me). Syncing the blockchain uses a lot of resources, so the software may react slow.
- You can see the progress in the debug window (Help > Debug window). ↳ Screenshot
- When the synchronization is completed, the red (out of sync) will disappear on the Overview screen! ↳ Screenshot
- When synchronization is complete, you can start staking your Reddcoins.
- For staking, your wallet needs to be encrypted: Settings > Encrypt... Do not forget your password! ↳ Screenshot ↳ Screenshot ↳ Screenshot ↳ Screenshot ↳ Screenshot
- Your wallet will be encrypted, and the Reddcoin Core client will be closed. Launch the Reddcore Client again. sudo /media/usb/reddcoin/src/qt/reddcoin-qt
- To start stake, you need to unlock your wallet (by entering your password).
- Settings > Unlock Wallet... ↳ Screenshot
- Make sure "For staking only" is checked before clicking OK. ↳ Screenshot
- You can only stake with Reddcoins that have matured: coins have to be at least 8 hours in your wallet to mature.
- The grey arrow at the bottom should be green when staking. Hover over that icon to see the progress of staking. ↳ Screenshot
This video shows how long it takes to start Reddcoin Core. TL;DR:
- [01:11] Reddcoin Core started (sudo password entered).
- [01:13] Message shown on screen: Loading block index...
- [10:14] Message shown on screen: Verifying blocks...
- [10:18] Message shown on screen: Loading wallet...
- [12:49] Message shown on screen: Done loading
- [13:13] Reddcoin Core ready to use.
Backup your wallet to prevent losing the RDDs in your wallet! There are two methods to backup, do both
. Make new backups if you create a new receiving address!
- Method 1: Backup your wallet.dat. Open Reddcoin Core. Use the menu to backup: File > Backup Wallet... ↳ Screenshot
Boot with only 1 USB drive plugged in:
- Method 2: Backup your private keys. In case you lose your wallet.dat backup, you still can import your private keys later when needed.
- To extract your private keys:
- If you have a passphrase on your wallet, unlock your wallet first. Settings -> Unlock Wallet... (make sure 'For staking only' is not checked) ↳ Screenshot ↳ Screenshot
- Extract your private keys. Debug window -> Console -> dumpprivkey ↳ Screenshot
- You can write down your private key or copy and save it in a document. Make sure you save it somewhere only you can access it.
- To import later: Debug window -> Console -> importprivkey [label] [label] is optional. ↳ Screenshot (without a label) ↳ Screenshot (with a label)
Make sure only the USB drive (with the swap partition and data partition) is plugged in when you boot up your Raspberry Pi. This to make sure the swap partition (/dev/sda1) is recognized correctly. If you boot up with multiple USB drives, Lubuntu might see the USB drive with the swap partition as the second drive (instead of the first drive), and ignore the 2 GB swap partition. If this happens, starting Reddcoin can render the Raspberry Pi unresponsive. Connection issues
If you have issues syncing the blockchain because you have 0 network connections, please follow the instructions in this thread
. Start Reddcoin Core easier
Run a shell script (.sh file), so you can start Reddcoin just by double clicking on an icon on your Desktop.
- Right Click on your Desktop and select Create New -> Empty File. ↳ Screenshot
- Enter a file name, make sure it ends with .sh, and click on OK. I've chosen for Reddcoin.sh. ↳ Screenshot The file will be created on your Desktop. ↳ Screenshot
- Add the command to start Reddcoin to the file.
- Right click on the file, select Leafpad (to open the file in a text editor). ↳ Screenshot
- Add the following to the file and save the file: sudo /media/rpi3b/usb/reddcoin/src/qt/reddcoin-qt ↳ Screenshot
- To be able to execute the shell script (.sh), it has to have 'execute permissions'.
- Right click on the file, and select Properties. ↳ Screenshot
- Click on the Permissions tab.
- For Execute, select Anyone, and click on OK. ↳ Screenshot
- To start Reddcoin Core, double click on the file. A new window will pop-up, asking you what you want. Execute in Terminal is what we want, so you can click on enter. ↳ Screenshot Reddcoin Core will now start. Do not close the Terminal window, you can minimize it if needed.
Adjust minimization options, so you can safely press on the X button (the close/exit button on the upper right corner).
RealVNC VNC Viewer (client) and VNC Connect (server):
- Activate 'Minimize on close'. Settings -> Options... -> Window (tab) -> Minimize on close. ↳ Screenshot Reddcoin will still run when you click on the X button. To close/exit Reddcoin, right click on the Reddcoin icon in the system tray (bottom right corner). ↳ Screenshot
To remote connect to the Raspberry Pi, I use VNC Viewer ad VNC Connect from RealVNC.
Chromium as browser:
- On your Raspberry Pi:
- Download VNC Connect from the RealVNC website: https://www.realvnc.com/en/connect/download/vnc/raspberrypi/.
- After your download is finished, open the file and click Install Package. ↳ Screenshot
- To run the VNC Connect once:
- Open [Menu] > Run, and enter: vncserver-x11 ↳ Screenshot
- To auto run on startup:
- Open Default applications for LXSession ([Menu] > Preferences > Default applications for LXSession). ↳ Screenshot
- In LXSessions configuration, select Autostart in the menu left.
- Under Manual autostarted applications, enter vncserver-x11 and click on + Add. ↳ Screenshot ↳ Screenshot
- Reboot your Raspberry Pi and check if VNC Connect is started automatically after the reboot.
- When VNC Connect is running, you'll see a VNC icon on the right bottom corner. Double click the icon to open VNC Connect and to see the IP address you need to enter to connect to your Raspberry Pi. ↳ Screenshot
The updates break Firefox, the browser crashes when you try to run it. Install another browser, Chromium, to solve this issue.
Updates / Upgrades
- In LXTerminal, enter: sudo apt install chromium-browser ↳ Screenshot
- You can run Chromium via [Menu] > Internet -> Chromium Web Browser ↳ Screenshot
If Software Updater shows up and tells you that there is updated software available, do not install the updates using Software Updater. Use LXTerminal
to update Lubuntu.
- Open LXTerminal and enter this command to update: sudo apt update && sudo apt upgrade ↳ Screenshot
Credits in previous tutorial:
- cryptoBUZE on reddit.com; for getting the official arm_support_v2.zip to work.
- worstkaas on reddit.com; for his suggestion of using 2 GB instead of 1 GB for the swap space.
- My main source: damsal01 on reddcointalk.org. His RDD address for donation: Rqd8xDv6oV9BYFaVrLdkWcR5JU6sPPZTKs.
- hieplenet on reddit.com. His RDD address for donation: RaF3TeWqgTzAdnaZQffnsxS74dag13zsAY.
- joroob on Github.com. He made some adjustments to the reddcoin wallet source code so it will compile on ARM cpus. His RDD address for donation: Rb8754QZvpbw6DjrMV1qX9SnHzYnSyXRMC.
I'm fairly new to this sub and to having a home lab in general and I found this community to be so kind and helping, I wanted to give back what I've learned. I'm seeing a lot of questions asked around on improvements and on what to do with x extra hardware so I thought it would be nice to have a thread to regroup that.
I'll put here some stuff I gathered and the most common questions I've seen, feel free to contribute and i'll update the post along. Latest Additions
- oVirt -> Viurtualization
- Hurrcane Electric DNS -> Dynamic DNS
- No-IP -> DynamicDNS
- SpiceWorks -> Misc
- ERPXE -> Backup
Posts about dashboards have been growing lately and here are some of the best that were kind enough to provide us with their sources.
Or build yours from scratch: PRTG API
Some other resources: Custom Monitoring Scripts
Credits to apt64
for his original post
= Pi specific =
- Pi-hole Prevents ads from even reaching you by blocking dns queries. Works as a relay between your isp's dns server (or whichever you choose). Can also work as a local dns.
- RetroPie From their website: The RetroPie Project is a collection of works that all have the overall goal to turn the Raspberry Pi into a dedicated retro-gaming console.
- raspnode Tutorials for installing cryptocurrency nodes on a Raspberry Pi. Participate in the Bitcoin, Litecoin, or Ethereum network. Full nodes, SPV wallets, cold storage, offline transaction signing.
- flightradar24 is a flight tracking service that provides you with real-time info about thousands of aircraft around the world.
- The Plane Finder is the easiest and most accurate way to share your ADS-B and MLAT data with us.
- PiAware is the world's largest flight tracking data company and provides over 10,000 aircraft operators and service companies as well as over 12,000,000 passengers with global flight tracking solutions.
= Download Automation =
- Torrent clients: Transmission, qBittorrent, uTorrent(sorry), Azureus, rTorrent, TransmissionQT to name a few Most torrent clients will support a "Black Hole" function where it will monitor a specific folder for .torrent files and automatically download them.
- CouchPotato is an wesome PVR for usenet and torrents. Just fill in what you want to see and CouchPotato will add it to your "want to watch"-list. Every day it will search through multiple NZBs & Torrents sites, looking for the best possible match. If available, it will download it using your favorite download software.
- SickBeard is a PVR for newsgroup users (with limited torrent support). It watches for new episodes of your favorite shows and when they are posted it downloads them, sorts and renames them, and optionally generates metadata for them.
- SickRage Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
- Sonarr is a PVR for Usenet and BitTorrent users.
- FlexGet is a multipurpose automation tool for content like torrents, nzbs, podcasts, comics, series, movies, etc.
- sabnzbd makes Usenet as simple and streamlined as possible by automating everything we can.
- nzbget is a binary downloader, which downloads files from Usenet based on information given in nzb-files.
- headphones is an automated music downloader for NZB and Torrent, written in Python. It supports SABnzbd, NZBget, Transmission, µTorrent and Blackhole.
= Virtualization =
- XenServer is an open source project and community managed by Citrix. The project develops open source software for securely running multiple operating systems and applications on a single device, enabling hardware consolidation and automation to reduce costs and simplify IT management of servers and applications.
- vmWare vSphere is a free bare-metal hypervisor that virtualizes servers so you can consolidate your applications on less hardware. - See more at: http://www.vmware.com/products/vsphere-hyperviso#sthash.nxaz6a9Y.dpuf
- Proxmox is a complete open source server virtualization management software. It is based on KVM virtualization and container-based virtualization and manages KVM virtual machines, Linux containers (LXC), storage, virtualized networks, and HA clusters.
- VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use.
- SmartOS is a hypervisor lean enough to run entirely in memory, powerful enough to run as much as you want to throw at it.
- KVM is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V).
- oVirt is free, open-source virtualization management platform. It was founded by Red Hat as a community project on which Red Hat Enterprise Virtualization is based.
= Monitoring =
- Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
- OMD avoids the tedious work of manually compiling and integrating Nagios addons while at the same time avoiding the problems of pre-packaged installations coming with your Linux distribution
- Pandorafms is the most flexible monitoring software in the market. With a single tool, Pandora FMS can monitor everything: infrastructure, applications, services, and business progress.
- PRTG Monitoring is a network monitoring software that is powerful and easy to use. Free for 100 sensors.
- Zabbix is the ultimate enterprise-level software designed for real-time monitoring of millions of metrics collected from tens of thousands of servers, virtual machines and network devices.
- Observium is a low-maintenance auto-discovering network monitoring platform supporting a wide range of device types, platforms and operating systems.
- LibreNMS is a fully featured network monitoring system that provides a wealth of features and device support.
- Cacti is a complete network graphing solution designed to harness the power of RRDTool's data storage and graphing functionality.
- Munin surveys all your computers and remembers what it saw. It presents all the information in graphs through a web interface.
- ZenOSS is an award winning, open source monitoring product that automatically discovers resources, without the use of agents, and provides visibility across all aspects of your IT environment whether physical, virtual or in the cloud.
- AlienVault OSSIM is an open source security information and event management system. OSSIM combines Snort, OpenVAS, Nagios, OSSEC, and other tools into a single portal with log collection and correlation.
- Graylog Centralize and aggregate all your log files for 100% visibility. Use our powerful query language to search through terabytes of log data to discover and analyze important information.
= Media Cent