Automated Setup: Ubuntu rig using EWBF with NVidia GPUs in Flypool

I recently built my first small mining rig. I went with Linux instead of Windows because I wanted an adventure. Unlike previous adventures, I encoded every step of the way in a script, so I could not only remember what I had done, but so I could quickly set up additional machines if I wanted.

If you want

  1. To mine ZCash
  2. On Ubuntu Linux
  3. With EWBF’s Miner
  4. On NVidia GPUs
  5. Into the Flypool mining pool
  6. With DataDog monitoring (You can build online dashboards like this: )

Then just provide an internet-connected Ubuntu linux machine with the GPUs connected and powered, and the scripts will take care of the rest! Whether you choose Ubuntu desktop (with a GUI) or Ubuntu server (no graphical server), they’ll still work. If you set up auto-login (done via the GUI in Ubuntu desktop, or with the included instructions for Ubuntu server), then the miner will start mining as soon as it powers on and comes online, without anyone having to touch it. This enables you to truly set it and forget it, especially if you combine it with Datadog and set up alerting!

This does assume you’ve got a fairly recent NVidia GPU (any of the 1050, 1060, 1070, 1080s should be fine) and are on Ubuntu 17.x.

Most of the setup scripts’ contents should be fairly self-explanatory, and could be modified if you end up needing to… depending on your familiarity with Linux & Ubuntu. For example, I switched to mining on (using their coin-switching equihash pool) instead of flypool - all I really had to change was the arguments passed to EWBF in the /etc/systemd/system/miner-zec-ewbf.service file that is installed.

As usual, no warranty, no support, good luck! I hope these help someone.

Some observations from a quick look:

modprobe nvidia will load Nvidia kernel module and systemctl restart lightdm or GDM will restart X without having to reboot.

You can combine nvidia-xconfig arguments:

sudo nvidia-xconfig -a --cool-bits=28 --enable-all-gpus

It’s usually bad practice to use sudo inside of scripts instead of having the user use sudo to run the script.

Check BASH syntax with

I use ansible-playbook to bootstrap my rig and point my miners at
as a free hosted proxy service for backup pool support, easy pool switching and unified dashboard.