Mining with a Moonlander 2 and Raspberry Pi

Well here I am, fashionably late to the cryptocurrency mining party. I have memories of trying to set up Bitcoin mining on my computer around 4 years ago but getting bored pretty quickly, giving up, and forgetting about it. Ah well, hindsight is a glorious thing.

Nevertheless, I’ve recently purchased a FutureBit Moonlander 2 just out of interest. A FutureBit Moonlander 2 is a USB Scrypt miner that doesn’t really need much in the way of power or hardware resources to get to work. Fortunately I have a spare Raspberry Pi 2 knocking about that I’m going to utilise for this. Though I’m fully aware that I’m unlikely to make much (or any) money with this, I’m going to document my first venture on the world of mining.

First up: Configuring the Raspberry Pi

Raspberry Pi 2

Start with all the good stuff in raspi-config such as memory split and filesystem expansion and then run the other usual commands;

sudo apt-get update
sudo apt-get upgrade -y

Install all the nescessary bits for the Moonlander 2:

sudo apt-get install -y libcurl4-gnutls-dev libjansson-dev

Make directory moonlander2 and cd into it:

mkdir -p moonlander2; cd moonlander2

Decompress file and cd into:

tar -xzf bfgminer_5.4.2-futurebit2_linux_armv6.tar.gz
cd bfgminer_5.4.2-futurebit2_linux_armv6

Now it’s time to connect your Moonlander 2.

The Raspberry Pi 2 won’t provide enough power over the USB ports to power this stick so you’re going to have to use an external powered hub. It’s recommended to have at least 1A per device but I picked up a hub pretty cheaply on Amazon.

Vemont USB hub
Link to buy on Amazon UK here.

Apply your mining settings

Edit the mining script with nano.

sudo nano

Here are the contents of my file to get you started:

./bfgminer --scrypt -o stratum+tcp:// -u jonners321 -p "n=PiMoonlander a=scrypt" -S MLD:all --set MLD:clock=625

You’ll notice here that I’m using Prohashing. I’ve gone with this pool for now as it allows mining and payment in many different coins and there’s good things said about it online. I’ve used CoinBase to manage my wallets. CoinBase is a very popular wallet and was really quick to get set up – I’ve created a LiteCoin wallet and set up my Prohashing account to automatically pay in to it.

The parameters that I’ve used in my file come from looking around online for advice on what settings others are using. I’m sure that with some tweaking the performance can be improved.

Once you’ve set up the script with your own settings it’s finally time to …

Start mining!

Run the script to start:


After a few seconds you will see LEDs come to life on the Moonlander stick and communication going on between your Pi and the pool.

… and that’s it. We’re mining! Don’t worry that nothing is getting accepted to begin with. It took mine around 20 minutes before anything got accepted.

I hope you found this post helpful. I’ll keep mining with the Moonlander 2 for a few months and update this blog with how I get on.

(Some of the installation steps were ‘borrowed’ from

How is mining on the Moonlander 2 working out for you? Drop a comment below to let me know!

If you found this guide useful, please consider buying me a coffee.


  • thanks. this helped me set up. only thing there must be an easier way to start mining , seems i have to go through the following steps every time ?

    cd moonlander2
    cd bfgminer_5.4.2-futurebit2_linux_armv6
    then finally : ./

    must be an easier way
    tried just double clicking on “start moonlander” but does not work

    thanks again

    • I ended up writing a shell script to start the miner.

      In your home directory put this in to a file called

      cd moonlander2
      cd bfgminer_5.4.2-futurebit2_linux_armv6

      You’ll then need to give it executable permissions (chmod +x then you’re good to go!

  • Have got everything working now on a raspberry pi 2 / Fuze / Moonlander 2

    in the log in scrip i did not put password in for second worker

    Many thanks for your set up tutorial : it is the only one that works !

    One question : there has been a bfg miner update … will that run on raspberry 2 and how to we install with out messing everything up ?

    • I’m not too sure about this as I’ve not done the update. I’ll have to check it out and let you know.

  • Hi . Just set up a new worker with 2 MoonLander2.

    Initially I went to : DOES NOT WORK
    Tried official moonlander page: DOES NOT WORK

    Then started again with your website = BINGO


    This is crazy can’t just be you with a workable for dummies moonlander set up ?

    I am having the same issues with Gekko 2PAC … any chance you could work your magic ? supplier instructions just don’t work on a raspberry pi.

    Thanks for Moonlander2 . Bitshopper + Moonlander + Bitcoin talk should have your instructions

    • Hey, glad this worked for you. When I set mine up I struggled to find any working instructions so I pieced this together from a few different sources.

      There’s a chance that I could work something out with the Gekko 2PAC but I don’t have access to one!

  • your update … was much easier 2nd time round

    I just follow instructions / copy paste into terminal bash

    I think somewhere I did go onto silabs to download drivers

    but otherwise just copied paste your tutorial

    then pointed my miners towards NYC


Leave a Reply

Your email address will not be published. Required fields are marked *