Zcash Mining on Linux made easy with Docker

7
Zcash Logo For STH
Zcash Logo For STH

Recently we have published a number of Monero mining Docker images in our ServeTheHome repository on Docker Hub. These images have been extremely popular and seen a combined tens of thousands of pulls. We actually started the Monero series using a different cryptocurrency, Zcash. Today we are going to publish a few Docker containers for Linux to let you quickly and easily mine Zcash using a single command.

The Quick Zcash Background

Zcash Logo For STH
Zcash Logo For STH

Zcash officially launched in Q4 of 2016 making it one of the newest cryptocurrencies on the market. Backing Zcash is a host of VC funding looking to back the next Bitcoin. Like Monero and several others, Zcash is focused on fixing some of the privacy issues with Bitcoin. Although many presumed Bitcoin to be anonymous when it first started, time has shown that transactions are easily treaceable.

One of the better reads on Zcash and the future of the project can be found on the official blog. That is certainly worth a look as the Zcash ecosystem is rapidly maturing.

Zcash mining is best done on GPUs, however, we have a CPU version Dockerized if you wanted to speculate on the future value of the currency.

CPU Mining with Zcash and Docker

There are hundreds of questions out there on how to mine Zcash with CPUs and various Linux distributions. Docker and our pre-made container makes that ridiculously simple. There is no more dependency hunting, build troubleshooting, or other work. Just a simple command to run the popular nheq CPU miner.

Just to give you an idea of how easy this is to setup and use, within 8 days we rocketed past 50K Docker Hub pulls on our minergate image.

Step 0: Install Docker (if it is not already)

If you want to install Docker you can either use your standard package manager or the company makes a one-liner install script that works on most platforms. Installing anything downloaded directly is dangerous so use this at your own risk:

wget -qO- https://get.docker.com/ | sh

You will also likely want to use the usermod -aG command at the end of the installation script so you can use Docker without having to sudo every time. If you do not, you can just append sudo to the start of the following commands.

Step 1: Determine a Pool and Get a Wallet

We recommend mining in a pool to get started. If you want to mine in a pool, some of the more popular are minergate and moneropool. With Minergate, you can simply sign-up and start mining using an e-mail address. Using other pools like flypool.org you will want to get a wallet.

Step 2: Start Mining

The final step in the process is to start mining. Here is the command you can use to do CPU mining on your Docker server using the Minergate pool, similar to how we setup the Monero version:

docker run -itd -e username=example@example.com servethehome/zec_cpu_nheq_minergate

Replace example@example.com with your Minergate username. We do not take any shares for using our image but we do appreciate using the STH affiliate link when you sign up.

If you want to use flypool.org there is a very similar command:

docker run -itd -e username=walletID servethehome/zec_cpu_nheq_flypool

Here you should replace walletID with your Zcash wallet address.

We are using -itd to launch the Docker containers but you can instead use simply -d. We assume most getting started with Docker will be interested in their performance which is why the commands above will print information to the console.

These images are swarm friendly so you can use Portainer, Rancher or plain Docker Swarm support to launch and manage miners across a cluster of systems.

Final Words

That is it! With any of the above one-liners you can mine Monero on a Docker host using a single command. We created these containers, and are using Wolf’s miner specifically so they are easy to deploy across a Docker Swarm. You can even use web management tools like Portainer and Rancher to deploy these as low priority containers across entire clusters within seconds.

7 COMMENTS

  1. Hi,

    Great!
    How can I know it’s running?
    How to stop it from running?
    How to set how many threads?
    Cam I use GPU as well?

    Regards

  2. miners sit at 0 Sol all the time, what is wrong with the image when handed a valid minergate email?

  3. isn’t it Step 1 is missing Pull command to the Docker image ?
    I’m new to Linux and Docker and had hard time to put it togther.

  4. I’ve run this container for a day now, and it still shows as “Offline” with no work done in MinerGate. It doesn’t seem to be working.

LEAVE A REPLY

Please enter your comment!
Please enter your name here