Skip to content
This repository has been archived by the owner on Mar 7, 2020. It is now read-only.

alexellis/spotminer

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

spotminer

What is this?

spotminer automates the Packet.net spot market and a cryptocurrency miner so that you can lower the costs of mining in the cloud and access bare metal performance.

Packet's Spot Market allows users to bid on spare server capacity at reduced rates.

Features:

  • Set a budget (max price) for each host
  • Automatically sets the closest stratum server
  • Places the minimum bid for the host
  • Uses my mine-with-docker project and cpuminer
  • Can be run on a timer - i.e. every 5 minutes to ensure reclaimed hosts are replaced
  • Easy configuration in YAML
  • Docker Swarm used as an init process to keep the miner running if it crashes
  • Configure one of the supported algorithms and Stratum of port i.e. hodl or cryptonight
  • Atom hosts are supported through a separate Docker image

Note: See disclaimer and check T&Cs with any cloud provider before embarking on mining.

Q&A

If you have additional questions or you want to try mining but don't want to use this example then consult my mine-with-docker project. You can also rebuild your own Docker image/binaries from source.

Installation

  • Install Go 1.9

  • Run go install

go install github.com/alexellis/spotminer

This installs spotminer into your $GOPATH/bin directory, so update your $PATH variable if necessary. $GOPATH is normally set to $HOME/go.

The config file is read from config.yml, so copy config.example.yml as a template and fill in your Packet API key and project ID. Set the CONFIG_FILE environment variable for a different filename or path. You must also configure the bitcoin wallet address for your mining here.

packet:
  project_id: ""
  api_key: ""
preferences:
  max_spot_instances: 6
  max_price: 0.15
  mine_algo: "cryptonight"
  port: 3355
  bitcoin_wallet: wallet_address

For mining Hodl use mine_algo: hodl and port: 3352

Packages:

Dependencies are managed through the dep tool.

  • github.com/packethost/packngo

Go package used to talk to the Packet API

  • gopkg.in/yaml.v2

Used to read YAML configuration files

Disclaimer

This software is provided without any warranty or support. Use at your own risk and consult the T&Cs of your cloud or hosting provider before running this software.

About

Golang automation for mining cryptocurrencies on the Spot Market

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages