> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usexfg.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Mine Fuego (XFG) with the Built-in Miner

> Start CPU mining for XFG block rewards using fuegod's built-in miner or the standalone miner binary, with thread and address options.

Fuego uses a CPU-friendly proof-of-work algorithm, and you can start mining XFG using either the miner built into `fuegod` or the standalone `miner` binary included in the build output. The network targets one block every 480 seconds (8 minutes), which works out to roughly 180 blocks per day. Both mining methods send block rewards to an XFG address you control.

<Note>
  Fuego supports merge mining. If you want to mine XFG alongside another compatible coin simultaneously, see the [merge mining guide](/guides/merge-mining).
</Note>

## Method 1: Mine from the fuegod console

If `fuegod` is already running and synced, you can start mining directly from its interactive console without any additional setup.

<Steps>
  <Step title="Open the fuegod console">
    Start `fuegod` if it isn't running, and wait until `status` shows the node is synced.

    ```bash theme={null}
    ./fuegod
    ```
  </Step>

  <Step title="Start mining">
    In the daemon console, run `start_mining` with your XFG address and an optional thread count:

    ```
    start_mining fireYourXFGAddressHere 4
    ```

    If you omit the thread count, the daemon defaults to 1 thread. Replace `fireYourXFGAddressHere` with your actual XFG wallet address (it starts with `fire`).
  </Step>

  <Step title="Check your hashrate">
    Use `show_hr` to display the current mining speed:

    ```
    show_hr
    ```

    To stop printing the hashrate, use `hide_hr`.
  </Step>

  <Step title="Stop mining">
    To stop the miner without shutting down the daemon:

    ```
    stop_mining
    ```
  </Step>
</Steps>

<Tip>
  Set the thread count to match your CPU's physical core count for the best balance of hashrate and system responsiveness. You can check your core count with `nproc` on Linux or Task Manager on Windows.
</Tip>

## Method 2: Use the standalone miner binary

The `miner` binary lets you mine without keeping the `fuegod` interactive console open. It connects to a running `fuegod` instance over RPC.

<Steps>
  <Step title="Make sure fuegod is running">
    The standalone miner connects to `fuegod` via RPC. Start the daemon first and confirm it's synced:

    ```bash theme={null}
    ./fuegod --rpc-bind-port 18180
    ```
  </Step>

  <Step title="Run the miner binary">
    In a separate terminal, launch the `miner` binary with your address and desired thread count:

    ```bash theme={null}
    ./miner --address fireYourXFGAddressHere --threads 4
    ```

    By default, the miner connects to `fuegod` on `127.0.0.1:18180`. Adjust `--daemon-host` and `--daemon-rpc-port` if your daemon is on a different host or port.
  </Step>

  <Step title="Verify mining is active">
    The miner prints its status to the console, including the hashrate and blocks found. You can also confirm from the `fuegod` console using `show_hr`.
  </Step>
</Steps>

## Standalone miner flags

| Flag                       | Default              | Description                                                                             |
| -------------------------- | -------------------- | --------------------------------------------------------------------------------------- |
| `--address <XFG address>`  | required             | Your XFG wallet address to receive block rewards.                                       |
| `--daemon-host <host>`     | `127.0.0.1`          | Hostname or IP of the `fuegod` RPC server.                                              |
| `--daemon-rpc-port <port>` | `18180`              | RPC port of the `fuegod` instance to connect to.                                        |
| `--threads <count>`        | hardware concurrency | Number of CPU threads to use for mining. Cannot exceed your system's concurrency level. |
| `--scan-time <seconds>`    | `30`                 | How often (in seconds) the miner polls `fuegod` for a new block template.               |
| `--limit <count>`          | `0` (unlimited)      | Stop after mining this many blocks. Set to `0` to mine indefinitely.                    |

## Network parameters

| Parameter               | Value                                            |
| ----------------------- | ------------------------------------------------ |
| Block target time       | 480 seconds (\~8 minutes)                        |
| Expected blocks per day | \~180                                            |
| Mining algorithm        | CryptoNight (UPX2 from block v9 / height 826420) |
| Coinbase maturity       | 60 blocks before mined coins are spendable       |
