DOGEcoin miner on Raspberry Pi

I happen to have a handful of Raspberry Pi 4’s lying around and thought I would experiment with setting them up as DOGE coin miner.  Appreciate that this is more of a proof-of-concept (PoC) exercise, the Pi is not going to fill your crypto wallet with DOGE coins.

Instructions below will focus on installing the 64-bit Raspbian operating system via the Raspberry imager application.

First, we need to transfer the Raspbian image on to an SD card.

  1. Go to www.raspberrypi.com/software
  2. Download and install the Raspberry Pi Imager application
  3. Open Imager, then:
  4. Click on ’CHOOSE OS’
  5. Click on ‘Raspberry Pi OS (other)’
  6. Click on ‘Raspberry Pi OS Lite (64-bit)’
  7. Click on ‘CHOOSE STORAGE’
  8. Select the SD micro card you just inserted
  9. Click on the gear icon to configure some initial settings for headless connectivity
  10. Check ‘Set hostname’ and enter a value
  11. Check ‘Enable SSH’ and check ‘Use password authentication’
  12. Check ‘Set username and password’ and enter username/password (default: pi/raspberry)
  13. Check ‘Configure wifi’ and enter SSID and Password (PSK)
  14. Select your local country code from the ‘Wifi country’ dropdown menu
  15. Click ‘Save’
  16. Click ‘Write’
  17. Once the burn is complete, insert the SD card into the Raspberry Pi
  18. Connect the power supply to the Raspberry Pi and turn it on

Next, we must do a little bit of preparation by creating an address with Dogecoin.  You can get a DOGE address by visiting the DOGECOIN official website and following the instructions there to set up on Windows, macOS, Linux, or Android.  For this PoC, Multidoge (a “light” wallet) will be sufficient; we do not need to download and install Dogecoin core (a “full” wallet).  Multidoge skims through the block chain, while Dogecoin core syncs by downloading the blockchain.

Once installed, open the app and search for your DOGE address.  It should be a 34-character value, often represented in blocks of four characters. (e.g. DH7f KLqw 74yY P6u8 LF5v key6 YETI vFAT Si).

The next thing we need to do is set up a mining pool, such as unMineable.  To set up your mining outfit with unMineable:

  1. Go to the unMineable website and click on ‘Dogecoin’ in the coins list
  2. As we’re using a Pi, click the ‘RandomX’ tab
  3. Note the URL and port number of the global server (rx.unmineable.com:3333)

Install xmrig Raspberry Pi OS

Now we are ready to set up the Raspberry Pi which should have finished booting and be connected to your Wi-Fi network.

  1. Connect the Pi using SSH:

ssh wifivitae@wifivitae.local 

  1. Install the prerequisites:

sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y

  1. Clone xmrig from GitHub:

git clone https://github.com/xmrig/xmrig.git

  1. Navigate to the xmrig build folder:

mkdir xmrig/build && cd xmrig/build

  1. Compile the code:

sudo cmake ..

sudo make -j$(nproc)

  1. Download an xmrig template from GitHub into the build folder:

wget https://raw.githubusercontent.com/xmrig/xmrig/master/src/config.json

  1. Edit the config.json template:

nano config.json

  1. In the ‘pools’ section, update the URL and user fields.  (The name field (e.g. wifivitae) is something unique that you can make up.  This name will be listed as a ‘worker’ once mining begins, and it connects to unMineable):

“pools”: [

        {

            “algo”: null,

            “coin”: null,

            “url”: “rx.unmineable.com:3333”,

            “user”: ” DOGE:DH7fKLqw74yYP6u8LF5vkey6YETIvFATSi.wifivitae”,

            “pass”: “x”,

Quick side note: If you would like to reduce the management fee from 1% to 0.75%, feel free to use this referral code (ovxc-11um) and add it after the worker name for ‘user’ in the config.json file, as shown below:

“user”: ” DOGE:DH7fKLqw74yYP6u8LF5vkey6YETIvFATSi.wifivitae#ovxc-11um”,

  1. Save and exit
  1. Start your miner:

./xmrig

Check your progress status on unMineable

Enter your DOGE address (e.g. DH7fKLqw74yYP6u8LF5vkey6YETIvFATSi) in the search field.  The worker name you made up in the config.json, should appear in the worker column.

Again, this is a PoC, not a money-making setup.  If you want to keep using your Pi to mine, you may want to consider overclocking your Pi, setting up a Pi cluster, and installing a cooling system.

Install xmrig macOS

For comparison purposes (if you don’t have access to a graphics card to set up a dedicated mining rig), here are instructions to set up up xmrig on macOS.

  1. If not already done, install Homebrew.  Instructions on how to install Brew can be found here.
  1. Install the prerequisites:

brew install cmake libuv openssl hwloc

  1. Clone xmrig from GitHub:

git clone https://github.com/xmrig/xmrig.git

  1. Navigate to the xmrig build folder:

mkdir xmrig/build && cd xmrig/build

  1. Compile the code:

git clone https://github.com/xmrig/xmrig.git

  1. Download an xmrig template from GitHub into the build folder:

wget https://raw.githubusercontent.com/xmrig/xmrig/master/src/config.json

  1. Edit the config.json template:

nano config.json

  1. In the ‘pools’ section, update the URL and user fields.  (The name field is something unique that you can make up.  This name will be listed as a ‘worker’ once mining begins and it connects to unMineable):
  1. Save and exit.
  1. Start your miner.

./xmrig

Slàinte!

Resources:

This article was very much inspired from an article posted on Instructables.

Spread the word. Share this post!

Leave a comment

Your email address will not be published.