> ## 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.

# Configure the Fuego Daemon and Node Settings

> Reference for all fuegod startup flags: RPC and P2P ports, log levels, data directory, peer management, fee address, and CORS settings you can configure.

You can tune `fuegod` behavior at startup by passing flags on the command line. There is no separate config file — all options are provided as arguments each time you launch the daemon. This page covers the most useful flags for network binding, RPC access, peer management, and data storage.

## Network and RPC flags

These flags control how the daemon listens for peer connections and exposes its RPC interface.

| Flag                         | Default     | Description                                                                                              |
| ---------------------------- | ----------- | -------------------------------------------------------------------------------------------------------- |
| `--p2p-bind-port <port>`     | `10808`     | UDP/TCP port for peer-to-peer connections. Open this port in your firewall to allow inbound peers.       |
| `--p2p-external-port <port>` | —           | Advertise a different external P2P port (useful behind NAT or port forwarding).                          |
| `--rpc-bind-ip <ip>`         | `127.0.0.1` | IP address the RPC server listens on. Change to `0.0.0.0` only if you intend to serve remote clients.    |
| `--rpc-bind-port <port>`     | `18180`     | TCP port for the HTTP RPC interface used by wallets and tools.                                           |
| `--restricted-rpc`           | off         | Limit the RPC server to read-only, safe methods. Recommended when exposing RPC beyond localhost.         |
| `--enable-cors <domain>`     | —           | Add a `Access-Control-Allow-Origin` header for the specified domain, enabling browser-based RPC clients. |

<Warning>
  Do not bind `--rpc-bind-ip` to `0.0.0.0` without also enabling `--restricted-rpc`. Unrestricted public RPC access allows anyone to trigger mining, roll back the chain, or query sensitive pool data on your node.
</Warning>

## Logging

| Flag                | Default | Description                                                                                                                                                                                         |
| ------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--log-level <0-4>` | `2`     | Controls log verbosity. `0` is nearly silent; `4` (trace) prints everything. Level `2` is suitable for most day-to-day use. You can also change this at runtime with the `set_log` console command. |

## Data directory

| Flag                | Default          | Description                                                                                                                                            |
| ------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `--data-dir <path>` | Platform default | Directory where the daemon stores blockchain data, peer state, and pool state. Useful for running multiple nodes or storing data on a separate volume. |

The daemon creates and manages several files inside this directory:

| File               | Description                                             |
| ------------------ | ------------------------------------------------------- |
| `blocks.dat`       | Raw blockchain block data                               |
| `blockindexes.dat` | Index mapping block hashes to positions in `blocks.dat` |
| `poolstate.bin`    | Persistent mempool (unconfirmed transaction pool) state |
| `p2pstate.bin`     | Peer connection state, including known peer addresses   |

## Peer connection flags

| Flag                             | Description                                                                                                                                 |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
| `--add-peer <IP:port>`           | Connect to a specific peer at startup in addition to seed nodes.                                                                            |
| `--add-exclusive-node <IP:port>` | Connect only to this peer. The daemon skips seed nodes and the peer discovery process entirely. Useful for private or local testing setups. |
| `--seed-node <IP:port>`          | Use a custom seed node instead of (or in addition to) the hardcoded ones.                                                                   |

## Remote node / fee flags

| Flag                          | Description                                                                                                                                     |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `--fee-address <XFG address>` | Set a fee address for remote node usage. Wallets connecting to your node as a remote node can be charged a small fee that goes to this address. |

## Example: public RPC node

To run a node that serves RPC to remote clients on a non-default port with restricted access:

```bash theme={null}
./fuegod \
  --rpc-bind-ip 0.0.0.0 \
  --rpc-bind-port 18180 \
  --restricted-rpc \
  --enable-cors "*" \
  --fee-address fireYourXFGAddressHere \
  --log-level 2
```

## Example: private node with custom data directory

```bash theme={null}
./fuegod \
  --data-dir /mnt/storage/fuego-data \
  --p2p-bind-port 10808 \
  --rpc-bind-port 18180 \
  --log-level 1
```
