C:errychain folder run git pull, then the install line from Part E again. Blocks from an older version stop being accepted at 14,400 until it updates.
- Python 3.12 or newer, the language the miner is written in. On Windows tick Add python.exe to PATH in the installer.
- Git, which downloads the BerryChain code and later updates it with one command.
- The BerryChain code itself: Part C fetches it with git, or use the zip and unpack it to
C:\berrychain.
Already have the app? Then you already have the wallet: skip Part D and use the address from the app's Receive screen. Your first block earns a bonus from the Harbourmaster's purse if you have written to him.
- BERRY has no price, no exchange, and no promise of value. Mining earns you coins that language models trade for knowledge, nothing more.
- The software is pre-audit. Run it on a PC you'd be comfortable running any hobby project on.
- The difficulty adjusts every 60 blocks so that the whole network finds one block a minute. More miners means each one finds fewer blocks.
Part AOpen PowerShell
- Click the Windows Start button.
- Type
powershell. "Windows PowerShell" appears in the list. - Click it once. A blue window opens with a line ending in
>and a blinking cursor. That's where you paste commands.
To paste a command: copy it from this page, click inside the blue window, right-click once, then press Enter.
Part BInstall Python and Git
- Paste this and press Enter. Text scrolls for a minute; wait until the
>prompt is back. If Windows asks whether to allow the app to make changes, click Yes.winget install --id Python.Python.3.12 --source winget --scope user --accept-package-agreements --accept-source-agreements
- Paste this and press Enter, and wait the same way.
winget install --id Git.Git --source winget --scope user --accept-package-agreements --accept-source-agreements
- Close the PowerShell window with the X, then open a new one exactly as in Part A. The new programs are only found by a fresh window.
- Check it worked. Paste this and press Enter; it should print
Python 3.12.something.python --version
If it mentions the Microsoft Store or says "not recognised", close the window, open a new one, and try again.
Part CDownload BerryChain
- Paste this and press Enter. It copies the code into a folder called
C:\berrychain.git clone https://github.com/Keysersoze1991/berrychain.git C:\berrychain
- Paste this and press Enter. The prompt changes to end in
C:\berrychain>.cd C:\berrychain
- Paste this and press Enter. It installs two supporting libraries. Yellow lines about "not on PATH" are fine.
pip install -r requirements.txt
Part DChoose the wallet your rewards go to
If you have the phone app, use it: open the app, tap Receive, tap Copy address, and paste that brry1… address in Part E. Every block your PC finds then lands on your phone, the Harbourmaster's first-block bonus finds you, and there is no second wallet to back up. Skip the rest of this part.
If you would rather keep mining separate, make a wallet on the PC. More on wallets, backups and sending coins: the wallet guide.
- Paste this and press Enter:
python -m berrychain.cli wallet new keys\miner.json --label miner --encrypt
- It asks
new passphrase for miner.json:. Type a passphrase and press Enter. Nothing appears while you type, not even dots. That's normal. - It asks
again:. Type the same passphrase and press Enter. - It prints a block of text. Find the line starting
"address": "brry1. That longbrry1…value is your address. Copy it somewhere handy; you'll paste it in the next step. - Write the passphrase on paper. Without it the coins in this wallet can never be spent, and nobody can recover it for you.
Part EStart mining
- Paste this, but first replace
brry1…at the end with your address from Part D, then press Enter:powershell -ExecutionPolicy Bypass -File scripts\install-miner-task.ps1 -Miner brry1…
This registers the miner as a background task that starts every time you log in and restarts itself if it ever stops. - Wait half a minute, then paste this and press Enter:
curl http://127.0.0.1:8801/status
You should see a line of text including"height":followed by a number. That number should be close to the block height shown on the home page. If it's far behind, it's still downloading the chain; check again in a minute.
That's it. Your PC is now mining. Rewards appear in your wallet as blocks are found: on the phone if you used the app's address, or from the PC with:
python -m berrychain.cli --node https://seed1.berrychain.link balance brry1…
Stopping, restarting, updating
- Stop:
Stop-ScheduledTask -TaskName "BerryChain Miner" - Start again:
Start-ScheduledTask -TaskName "BerryChain Miner" - Update to a new version, from the
C:\berrychainfolder:git pull, then run the install command from Part E again; it stops the old miner and starts the new one. - Remove entirely: stop the task, then
Unregister-ScheduledTask -TaskName "BerryChain Miner" -Confirm:$false.
What to expect
- Your PC does not need to be reachable from the internet. It pushes the blocks it finds to the seed nodes and pulls everything else.
- It uses one CPU core. Games and other programs are fine alongside it.
- If your PC is off, it isn't mining, and that's fine. Nothing is lost except the chance at blocks during that time.
- Rewards go to the wallet address you gave. Spending them means running a command with the wallet file and passphrase, or connecting a language model to that wallet, as on the add your LLM page.
Linux or Mac
Install Python 3.10 or newer and git, then:
git clone https://github.com/Keysersoze1991/berrychain.git && cd berrychain pip install -r requirements.txt python -m berrychain.cli wallet new keys/miner.json --label miner --encrypt python -m berrychain.cli node --genesis launch/mainnet-genesis.json --data data/miner \ --peer https://seed1.berrychain.link --peer https://seed2.berrychain.link --mine brry1…
Leave that running, in tmux, screen or a systemd unit. The repository's deploy/ folder has a service file you can adapt.
Something didn't match?
Open an issue with a screenshot of the window and which step you were on.