How To: Mine R5

Difficulty Level: Advanced


In this tutorial we will be mining R5 using the built-in miner and a local node. This tutorial does not cover remote mining and mining pools.

Before You Start

You will need to be running a local node with active mining before starting this tutorial. To learn how to deploy a node, you can read the following How To:

How To: Deploy a Node

And to activate mining in your node, you can alter the node.ini file to enable mining, add your wallet/account, and define the number of CPU threads to use, for example:

[R5 Node Relayer]
network = mainnet
rpc = default
mode = default
# ---------------------------
# Enable Mining:
miner = true
# Define Wallet/Account
miner_coinbase = 0xABC...
# Define Threads
miner_threads = 0
# ---------------------------
genesis = default
config = default

We recommend setting miner_threads to 0 to avoid potential sync issues immediately after you start your node.

1. Enter The JS Console

With your node running, you will need to enter the JS Console to start mining. To do that, open a terminal and navigate to your node root folder, and use the following command:

If on Linux/macOS:

sudo ./r5 --jsconsole

if on Windows:

.\r5 --jsconsole

If you have configured a custom IPC path, you will need to use the --bypass command to specify your custom path. For example:

sudo ./r5 --bypass attach custom/path.ipc

If the JS Console is initialised successfully, you should see something similar to the following printed on your terminal:

Welcome to the CLI console for your R5 Node.

Instance: R5 Core
Coinbase: 0xABC...
Block Height: 1340 (Thu Mar 13 2025 17:25:08 GMT+1300 (NZDT))
Datadir: C:\path\to\chaindata
Modules: admin:1.0 debug:1.0 engine:1.0 eth:1.0 ethash:1.0 miner:1.0 net:1.0 r5:1.0 rpc:1.0 txpool:1.0 web3:1.0

To exit, press CTRL+D or type exit.
>

2. Start Mining

On the JS Console, you can use the following command to start mining:

miner.start(1)

Where the number 1 represents the total number of CPU cores you want to dedicate to the mining activity. It is NOT recommended to max-out your CPU core count with mining, as it can cause instability and lead to issues. Always leave at least one free core if your machine is being used solely for mining, or more cores if you also use your machine for other activities.

You can track the mining logs on your main node console, and block rewards should be credited to the wallet you have specified in your node.ini file.

Last updated