> For the complete documentation index, see [llms.txt](https://docs.minervachain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.minervachain.org/run-a-node/run-a-miner.md). Agents can also search and read this documentation through its [MCP server](https://docs.minervachain.org/~gitbook/mcp).

# Run a miner

Mining is the same node with three extra flags: `--mine`, a thread count, and an **etherbase**, the Minerva account that receives the rewards. The account needs no key on the machine; consensus credits it directly.

## 1. Get a reward address

Create an account in [Minerva Wallet](https://docs.minervachain.org/use-minerva/create-account.md) or with the SDK and copy its `0x` address. It can be brand new and undeployed; rewards accumulate as balance and you spend them from the wallet. Never put a wallet seed or Recovery Kit on the mining host.

## 2. Start mining

**Docker** (the same container as [Join the mainnet](https://docs.minervachain.org/run-a-node/join-mainnet.md), plus the miner variables):

```sh
docker run -d --name minerva-miner --restart unless-stopped \
  -e MINERVA_NETWORK=minerva-mainnet \
  -e MINERVA_NETWORK_ID=77139 \
  -e MINERVA_GENESIS_HASH=0xc6c1ed201cf79b13116217843a4711628f02d58bedfa4100a7fb3b4385f7dd07 \
  -e MINERVA_BOOTNODES="enode://d2c423002b5fe7564791948210966b521434010ccf7041d31df0205ffe4a31223895974f1778ede6e742bea0ab4cb7f25f8833e2c7da5bde0d35d2ee0240aa17@40.160.80.95:30303,enode://78cf6e41f4c046cdbfce7b339f1ed4cbb54ff30660323e323fa12f9717bcd865aa4c5619aea0368e904e7b83e858c71f491eb6e1b0a3282a80d4ae0fb9ff0bd0@148.113.222.230:30303" \
  -e MINERVA_P2P_NAT="extip:YOUR.PUBLIC.IP" \
  -e MINERVA_MINER_ETHERBASE=0xYourMinervaAccount \
  -e MINERVA_MINER_THREADS=8 \
  -v "$PWD/genesis.json:/genesis.json:ro" \
  -v minerva-mainnet-data:/data \
  -p 30303:30303/tcp -p 30303:30303/udp \
  -p 127.0.0.1:8545:8545 \
  minerva/minerva-geth:local
```

The entrypoint adds `--mine --miner.threads 8 --miner.etherbase 0xYour… --miner.gaslimit 30000000` when `MINERVA_MINER_ETHERBASE` is set. In Compose, add the two variables to the `environment` block.

**Bare metal:** append to the command from the previous page:

```sh
  --mine --miner.threads 8 \
  --miner.etherbase 0xYourMinervaAccount \
  --miner.gaslimit 30000000
```

Set the threads to the number of physical cores you want to dedicate. The Ethash DAG for the current epoch is generated on first start (a few minutes, about 1 GB on disk under the data directory).

## 3. Check that you are mining

```sh
curl -s -X POST http://127.0.0.1:8545 -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"minerva_getMiningStatus","params":[]}'
```

```json
{"result":{"chainId":"0x12d53","mining":true,"hashrate":"0x1a2b3","peerCount":"0x4","syncing":false,
           "difficulty":"0x9453e15","averageBlockTimeSeconds":37.1,"sampleBlocks":"0x64"}}
```

`mining` must be `true` and `hashrate` non-zero after the DAG is built. `syncing` must be `false`: a node mines on its own fork until it is at the head, and those blocks are discarded. The log line `🔨 mined potential block` followed by `🔗 block reached canonical chain` means a reward was credited.

Watch rewards arrive:

```sh
curl -s -X POST https://mainnet.minervachain.org/rpc -H 'content-type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"eth_getBalance","params":["0xYourMinervaAccount","latest"]}'
```

or open the address in the explorer at `https://mainnet.minervachain.org/explorer`.

## What you earn

|              |                                                                              |
| ------------ | ---------------------------------------------------------------------------- |
| Block reward | 1 MRV per block until block 10,500,000, then halving every 10,500,000 blocks |
| Fees         | the priority fee of every transaction in the block plus 30 % of the base fee |
| Uncles       | nothing; only the canonical block winner is paid                             |

Your expected share is your hashrate over the network's. The network's difficulty and recent block time are in `minerva_getMiningStatus` on any node and on the explorer's charts page. The chain launched on 2026-12-04 with two CPU miners, so the hashrate is small and additional miners change the picture quickly.

## Several machines

Point every miner at the same etherbase; the address is just a recipient. Each machine runs its own full node and must sync before it mines. There is no pool software for Minerva yet; the Ethash stratum protocol is unchanged, so existing Ethash pool stacks can be adapted by their operators.

## Good practice

* Keep the node's RPC on localhost. A miner's RPC exposes nothing valuable, but there is no reason to serve it.
* Run `minerva-geth doctor` after each restart; a clock drift of more than a few seconds produces blocks peers reject.
* Rotate the reward account's key from the wallet like any other account; mining does not care which key controls the address.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.minervachain.org/run-a-node/run-a-miner.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
