> For the complete documentation index, see [llms.txt](https://zokanetwork.gitbook.io/zokanetwork/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zokanetwork.gitbook.io/zokanetwork/mining/running-a-miner.md).

# Running a Miner

Build the binaries:

```sh
cargo build --release --features randomx --bin zoka --bin zokahd
```

Run a mainnet miner using the network configuration:

```sh
zoka fullnode \
  --network mainnet \
  --network-config docs/mainnet-network.v1.json \
  --mine-interval-secs 30 \
  --mine-blocks 1 \
  --min-mine-peers 1 \
  --address <your-zka1-address> \
  --password <your-password>
```

For production operation, prefer protected password channels where supported, such as environment-backed password options or stdin, instead of placing real passwords directly in shell history.

## Sync Gate

Standalone mining checks whether the local chain is aligned with configured public RPC state before mining. If the local database is behind the network, the miner should sync first instead of producing blocks from a stale view.

The usual repair/bootstrap command is:

```sh
zoka rpc-sync --network mainnet --limit 512
```

## Desktop Mining

ZSilent Core is the preferred desktop control surface for users who want wallet, node, and miner controls in one application.

From the desktop app, the node can stay online while mining is started and stopped through local node control. This is useful for users who want to keep sync and monitoring active without relaunching the node process.

## Mining Pools

Mining pools are not part of the current documented public flow. Future pool support should be documented only after the implementation and payout model are reviewed.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://zokanetwork.gitbook.io/zokanetwork/mining/running-a-miner.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
