Skip to content

Monero Configuration File

Applicability

By default Monero looks for bitmonero.conf in Monero data directory.

To use a specific config file add --config-file option:

./monerod --config-file=/etc/monerod.conf

The --config-file option is available for:

  • monerod
  • monero-wallet-cli
  • monero-wallet-rpc
  • monero-gen-trusted-multisig

Syntax

  • option-name=value
  • valueless-option-name=1 for options that don't expect value
  • # comment
  • whitespace is ignored

Reference

All configuration options are the same as command line options for the binary.

Skip the -- from --option-name.

Example:

./monerod --log-level=4 --stagenet

translates to:

log-level=4
stagenet=1     # use value "1" to enable the value-less options like --stagenet

Templates

monerod.conf

This config is tailored for desktop usage on mainnet 🔗

# ~/.bitmonero/bitmonero.conf
#
# Configuration file for monerod. For all available options see the MoneroDocs:
# https://docs.getmonero.org/interacting/monerod-reference/

# Data directory (blockchain db and indices)
data-dir=~/.bitmonero   # Blockchain storage location

# Optional pruning
#prune-blockchain=1           # Pruning saves 2/3 of disk space w/o degrading functionality but contributes less to the network
#sync-pruned-blocks=1         # Allow downloading pruned blocks instead of prunning them yourself

# Centralized services
check-updates=disabled         # Do not check DNS TXT records for a new version
enable-dns-blocklist=1           # Block known malicious nodes

# Log file
log-file=~/.bitmonero
log-level=0                    # Minimal logs, WILL NOT log peers or wallets connecting


# P2P full node
#p2p-bind-ip=0.0.0.0            # Bind to all interfaces (the default)
#p2p-bind-port=18080            # Bind to default port
#no-igd=1                       # Disable UPnP port mapping

# RPC open node
#public-node=1                  # Advertise to other users they can use this node for connecting their wallets
rpc-restricted-bind-ip=0.0.0.0 # Bind to all interfaces (the Open Node)
rpc-restricted-bind-port=18089 # Bind to a new RESTICTED port (the Open Node)

# RPC TLS
rpc-ssl=autodetect             # Use TLS if client wallet supports it (Default); A new certificate will be regenerated every restart

# ZMQ
#zmq-rpc-bind-ip=127.0.0.1      # Default 127.0.0.1
#zmq-rpc-bind-port=18082        # Default 18082
zmq-pub=tcp://127.0.0.1:18083  # ZMQ pub
#no-zmq=1                       # Disable ZMQ RPC server

# Mempool size
max-txpool-weight=2684354560   # Maximum unconfirmed transactions pool size in bytes (here ~2.5GB, default ~618MB)

# Database sync mode
#db-sync-mode=safe:sync        # Slow but reliable db writes

# Network limits
out-peers=24              # This will enable much faster sync and tx awareness; the default 8 is suboptimal nowadays
in-peers=48               # The default is unlimited; we prefer to put a cap on this

limit-rate-up=1048576     # 1048576 kB/s == 1GB/s; a raise from default 2048 kB/s; contribute more to p2p network
limit-rate-down=1048576   # 1048576 kB/s == 1GB/s; a raise from default 8192 kB/s; allow for faster initial sync

# Tor/I2P: broadcast transactions originating from connected wallets over Tor/I2P (does not concern relayed transactions)
#tx-proxy=i2p,127.0.0.1:4447,16.disable_noise  # I2P
#tx-proxy=tor,127.0.0.1:9050,16,disable_noise  # Tor

# Tor/I2P: tell monerod your onion address so it can be advertised on P2P network
#anonymous-inbound=PASTE_YOUR_I2P_HOSTNAME,127.0.0.1:18085,64         # I2P
#anonymous-inbound=PASTE_YOUR_ONION_HOSTNAME:18084,127.0.0.1:18084,64 # Tor

# Tor: be forgiving to connecting wallets
disable-rpc-ban=1

monero-wallet-cli.conf

This config is tailored for desktop usage on stagenet 🔗.

# ~/.bitmonero/stagenet/monero-wallet-cli.conf

# Pick network
stagenet=1

# Connect to a remote full node
daemon-address=YOUR.NODE.IP:38081
#trusted-daemon=1

# Log file
log-file=/tmp/monero-wallet-cli.log

# wallet-file=~/.bitmonero/stagenet/wallets/MoneroExampleStagenetWallet