What does config.json do in XMRig?
config.json is XMRig’s settings file: it tells the mining program where to connect, which wallet to credit, and how to use your computer’s hardware. You can edit this file to change how XMRig runs without typing a long list of startup options each time.
What the file controls
XMRig is a standalone mining program, not a browser miner. Its configuration file brings most of its settings together in one place.
For Monero mining, the main settings you’ll usually care about are:
- Mining pool: The server that combines your mining work with other miners’ work so rewards can be shared.
- Wallet address: The public receiving address the pool uses to credit your mining rewards.
- CPU settings: How XMRig uses your processor, including its mining threads. A thread is one stream of work running on your processor.
- Connection security: Whether XMRig uses TLS, which encrypts the connection to a pool that supports it.
- Logging and monitoring: What status information XMRig shows or saves.
The file can also contain settings for graphics cards, backup pools, and remote monitoring. You do not need to change every option to get started.
How the settings are organized
The file uses JSON, a text format that stores named settings and their values. Related settings sit together in sections such as "pools", "cpu", and "randomx".
Inside a pool entry, you may see:
{
"url": "POOL_HOST:PORT",
"user": "YOUR_PUBLIC_XMR_ADDRESS",
"pass": "x",
"coin": "monero"
}
This is only an example of a pool entry, not a complete working configuration. Replace the placeholders with your pool’s connection details and your own public Monero address.
The "pass" value depends on the pool. Some accept "x"; others use it for a worker name or pool-specific options. Follow that pool’s instructions rather than guessing.
Your public wallet address belongs here. Your wallet’s seed phrase and private keys never do.
How XMRig finds and applies it
XMRig commonly uses a file named config.json alongside the program. To avoid uncertainty about which file it loads, you can specify one when starting it:
xmrig --config=/path/to/config.json
Command-line options can override corresponding file settings. If XMRig behaves differently from what you expect, check both the file and the command used to launch it.
XMRig can watch the configuration file for changes when its "watch" option is enabled. However, you should not assume every hardware-related change will take full effect immediately. Restarting XMRig is the clearest way to test a revised configuration.
How to edit it safely
Make a backup before you change anything, then use a plain-text editor. JSON punctuation matters: missing quotes, misplaced commas, or unmatched brackets can stop the file from loading.
Change one setting at a time and check XMRig’s startup messages. They help you confirm the selected pool, processor settings, and connection status.
Be cautious with configurations shared online. Someone else’s file may send rewards to their wallet or enable remote access you do not want. CPU settings also affect heat and responsiveness; allocating more threads does not always mean faster mining.
The bottom line
Think of config.json as XMRig’s saved instruction sheet. It controls your pool connection, reward address, and mining behavior—not a guaranteed income. Start with a trusted configuration, check your wallet address carefully, and adjust settings gradually.
