# Mine MoonBite on your own machine MoonBite mining is **solo and pool-free**. You run a full MoonBite node on your own computer and it mines directly to your own wallet. There is no pool, no website login, no third party that ever touches your coins. Every block you find pays you, and only you. > The "miner" on moonbite.org/start is a **visual demo** and does not mine real > MBITE. Real mining is done here, by the node, using the steps below. ## What you need - The MoonBite node for your OS (`moonbited` + `moonbite-cli`), placed in this folder next to the `mine` script. - A few GB of free RAM. Mining uses RandomX, a CPU algorithm designed so an ordinary computer is competitive and specialised hardware is not. ## Run it No account and no setup. Have your wallet app's Receive address ready, or skip it and let the miner make a wallet for you. **Windows — double-click `Mine-MoonBite.bat`.** That's it, no terminal. A window opens and stays open while it mines; closing it stops mining. This works even on PCs that block PowerShell scripts: the launcher runs `mine.ps1` with `-ExecutionPolicy Bypass` for that one run only. It changes no setting on your PC and needs no administrator rights. Some antivirus tools treat that line as suspicious; see [ANTIVIRUS.md](ANTIVIRUS.md). If you'd rather run `mine.ps1` directly from PowerShell and your PC blocks scripts, allow them for your own user once (no administrator needed): ```powershell Set-ExecutionPolicy -Scope CurrentUser RemoteSigned Unblock-File .\mine.ps1 ``` **Linux / macOS** ```bash ./mine.sh ``` **Windows, from PowerShell instead of double-clicking** ```powershell .\mine.ps1 ``` The script starts your node, connects to the network, waits until it has every block the network knows about, then mines. The first time, it asks where rewards should go: ``` Where should your mining rewards go? Paste your wallet address (MoonBite wallet app > Receive, starts with moon1), or just press Enter to create a wallet on this computer instead. Address: ``` Paste your wallet app's Receive address and every block pays straight into it. The address is checked (a typo is refused, not paid to a stranger) and saved. On every later start the saved address is shown: press Enter to keep it, or paste a different one. Press Enter at the first prompt and the node creates a wallet on this machine; the script then shows how to back it up, because until you do, a dead disk means lost coins. Unattended runs (startup scripts, no keyboard) never prompt: they use the saved address, or create the local wallet. To set or change the address without the prompt, pass it as an argument: ```bash ./mine.sh moon1youraddress # Linux / macOS .\mine.ps1 moon1youraddress # Windows, PowerShell Mine-MoonBite.bat moon1youraddress # Windows, double-click alternative: # drag the .bat onto a shortcut # with the address appended, or # run it once from a terminal ``` Leave it running; each block it finds is printed, and the reward is spendable after it matures (below). ## Data directory Your node and wallet live in `~/.moonbite` (Linux/macOS) or `%USERPROFILE%\.moonbite` (Windows). Set `MOONBITE_DATADIR` before running the script to put them somewhere else. ## What this download will never do - It is **only** the node, the CLI, these scripts and two text files. The wallet app is a separate download and is never included here; this archive is never included in the wallet download. - It installs nothing and adds nothing to startup. It mines only while the window is open. - It downloads nothing, never updates itself, never asks for administrator rights and never changes your antivirus or PowerShell settings. - Each start prints the SHA-256 of `moonbited` and `moonbite-cli` so you can compare them with the published `SHA256SUMS.txt`. Policy: `docs/ADR-013-miner-distribution-policy.md` in the repository. ## Verify the download, and about antivirus warnings Compare the archive and the executables against `SHA256SUMS.txt` from https://moonbite.org/mine, check the `SHA256SUMS.txt.minisig` signature when present, and for CI-built archives run `gh attestation verify --owner moonbitecoin`. CPU miners are routinely flagged by antivirus heuristics; `ANTIVIRUS.md` in this folder explains why, how to verify, and how to report a false positive. Nothing here will ever ask you to disable protection. ## The wallet app You do not need this to mine — the miner makes its own address, above. The MoonBite desktop wallet is a separate download for when you want to spend, send, or manage coins with a proper interface: the same wallet as moonbite.org/wallet, in its own window (self-custody, 12-word recovery phrase). Get it from moonbite.org/wallet (Download) or moonbite.org/download/wallet, then import the address this miner generated — or skip that step entirely and just point the miner at a wallet address you already made there. ## Your coins and your wallet - Your wallet is stored in your MoonBite data directory (`~/.moonbite` on Linux/macOS, `%USERPROFILE%\.moonbite` on Windows). - **Back up the `wallet` folder.** If you lose it, your coins are gone - no one can recover them for you. - A mined block's reward is spendable **100 blocks** after it is found (this is standard coinbase maturity, and protects the chain). ## Speed By default the miner uses every physical CPU core, one RandomX thread per core. That is the fastest setting: hyperthreads make RandomX slower, not faster, so the miner never goes above your physical core count. To leave room for other work, mine with fewer cores: ```bash ./mine.sh --cores 50% # Linux / macOS (or --cores 4) .\mine.ps1 -Cores 50% # Windows, PowerShell (or -Cores 4) Mine-MoonBite.bat -Cores 50% # Windows, from a terminal ``` or set `MOONBITE_CORES=50%` before starting. More cores means more guesses and a bigger share of the blocks. A new setting applies the next time the node starts. Difficulty retargets every 60 blocks (about two hours) toward a 2-minute block time, and each block pays 10 MBITE. ## Commands | Command | What it does | |---|---| | `./mine.sh` / `.\mine.ps1` | start the node and mine | | `./mine.sh address` | print your mining address | | `./mine.sh stop` | stop the node | ## It connects to these seed nodes Your node reaches the network through the public MoonBite seeds. They are set for you in the generated `moonbite.conf`; you do not need to configure anything.