Requirements

This is our recommendation for how to best set up and launch an STX Miner on a cloud-based server. It is based on our experience and it is only one option.

Recommended Server Configuration

Cloud Server:

  • 4 cores CPU Above
  • 8GB RAM Above
  • 600GB disk At least
  • 10MB+ bandwidth

Setting a Bitcoin node

#get bitcoin release
wget https://bitcoin.org/bin/bitcoin-core-0.21.1/bitcoin-0.21.1-x86_64-linux-gnu.tar.gz
# tar
tar xf bitcoin-0.21.1-x86_64-linux-gnu.tar.gz
# create data dir
mkdir /bitcoin_data
# move bitcoin binary to PATH
cd bitcoin-0.21.1
cd bin
mv * /usr/local/bin

Setting a Stacks node

Create Miner Key

In this section, we use the official Stacks tutorial , which uses npx to generate both Stacks and Bitcoin key pairs. These key pairs are generated in localhost. You must record the mnemonic and key info carefully and securely before closing the terminal.

Refer to official tutorial : Running a miner

First, a keychain needs to be generated. With this keychain, we'll purchase some BTC from a crytpocurrency exchange, and then use that BTC to start mining.To get a keychain, the simplest way is to use the stacks-cli. We'll use the make_keychain command.

npx @stacks/cli make_keychain 2>/dev/null | json_pp > keychain.txt

After this runs, you should see some JSON in the new keychain.txt file that looks like this:

{
  "mnemonic": "exhaust spin topic distance hole december impulse gate century absent breeze ostrich armed clerk oak peace want scrap auction sniff cradle siren blur blur",
  "keyInfo": {
    "privateKey": "2033269b55026ff2eddaf06d2e56938f7fd8e9d697af8fe0f857bb5962894d5801",
    "address": "STTX57EGWW058FZ6WG3WS2YRBQ8HDFGBKEFBNXTF",
    "btcAddress": "mkRYR7KkPB1wjxNjVz3HByqAvVz8c4B6ND",
    "index": 0
  }
}