Home

How do I generate a config.json for XMRig?

You can generate an XMRig config.json with the configuration wizard on the official XMRig website, or create one yourself from a small template. You mainly need your mining pool’s server address, your Monero wallet address, and a few settings for how much of your computer XMRig should use.

Gather your pool and wallet details

XMRig is mining software that runs on your computer, not inside your web browser. For Monero, it uses RandomX, a mining method designed to work well on CPUs—your computer’s main processors.

Before generating the file, collect:

  • Pool address and port: A mining pool combines your mining work with other people’s work and shares rewards. Its setup page lists a server address and port number.
  • Monero receiving address: Copy this from your own wallet. Never enter your wallet’s recovery words or private keys.
  • Pool password or worker name: Many pools accept x as the password. Others use this field to name your computer or set options.
  • TLS requirement: TLS encrypts the connection between XMRig and the pool. Use the port and TLS setting together exactly as your pool specifies.

Only mine on a computer you own or have clear permission to use.

Generate the file with the official wizard

Open the configuration wizard on the official XMRig website. Avoid lookalike download sites and advertisements offering “optimized” miners.

In the wizard:

  1. Add your pool, choosing it from the available options or entering its details manually.
  2. Enter your Monero receiving address.
  3. Add any password or worker details your pool requires.
  4. Enable CPU mining. Leave GPU options disabled for a straightforward Monero setup.
  5. Review the generated configuration, then download or copy it into a file named config.json.

The wizard runs in your browser, but the file it produces is for the installed XMRig program. It does not start browser mining.

Create a simple file manually instead

If you prefer, paste this starter configuration into a plain-text editor:

{
  "autosave": true,
  "cpu": {
    "enabled": true,
    "max-threads-hint": 50
  },
  "opencl": false,
  "cuda": false,
  "pools": [
    {
      "coin": "monero",
      "url": "POOL_HOST:PORT",
      "user": "YOUR_MONERO_WALLET_ADDRESS",
      "pass": "x",
      "tls": true
    }
  ]
}

Replace the uppercase placeholders with your actual details. This example assumes your pool offers a TLS connection; change "tls" to false only when using its non-TLS port.

max-threads-hint guides automatic CPU thread selection. A value of 50 is a gentler starting point, not a guaranteed 50% CPU usage limit. opencl and cuda disable the two GPU mining options.

JSON is a text format with strict punctuation. Keep double quotes around text, and do not add a comma after the last item in a group.

Save and test your configuration

Save the file beside the XMRig executable. Make sure your editor has not named it config.json.txt.

From that folder, launch it explicitly with:

xmrig -c config.json

On Windows, use xmrig.exe; on Linux or macOS, you may need ./xmrig.

Check the startup output for the correct pool, a successful connection, and eventually accepted shares—pieces of mining work the pool accepts. Watch temperatures and responsiveness, too. Generating a valid file does not guarantee profitable mining.

The bottom line

Use the official wizard for convenience, or edit the template for more control. Verify your wallet address, match the pool’s port and TLS settings, then test the saved file before leaving XMRig running.

All 1,000 questions

MyAiMiner.com

MyAiMiner.com — Monero mining blog. 1,000 questions. Clear answers.

Monero (XMR) Mining BLOG

Hashes0
Blocks accepted0
Blocks rejected0
Runtime00:00:00