I'm looking to change the default port of monerod for RPC, but I wasn't sure is there a monerod hidden config file I can put in my home folder to set the settings? And what other useful settings are there? I want to make a public node so I can connect my monerujo wallet to it.
2 Answers
You can create one in any directory you have permissions to access and name it anything (such as monero.conf
). Add any of the options used on daemon startup, but leave off the leading double-dash (--
). The examples I have seen separate key from value with an equal sign (=
) instead of a space. (The space separator is used on the command line.)
Here's an example I found:
# /etc/monero/monerod.conf
# Data directory (blockchain db and indices)
data-dir=/nocow/blockchain/monero
# Log file
log-file=/var/log/monero/monerod.log
max-log-file-size=0 # Prevent monerod from managing the log files; we want logrotate to take care of that
# P2P full node
p2p-bind-ip=0.0.0.0 # Bind to all interfaces (the default)
p2p-bind-port=18080 # Bind to default port
# RPC open node
rpc-bind-ip=0.0.0.0 # Bind to all interfaces
rpc-bind-port=18081 # Bind on default port
confirm-external-bind=1 # Open node (confirm)
restricted-rpc=1 # Prevent unsafe RPC calls
no-igd=1 # Disable UPnP port mapping
# Slow but reliable db writes
db-sync-mode=safe
# Emergency checkpoints set by MoneroPulse operators will be enforced to workaround potential consensus bugs
# Check https://monerodocs.org/infrastructure/monero-pulse/ for explanation and trade-offs
enforce-dns-checkpointing=1
out-peers=64 # This will enable much faster sync and tx awareness; the default 8 is suboptimal nowadays
in-peers=1024 # 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
You can create one in ~/.bitmonero/bitmonero.conf
and add any of the options used on daemon startup.
-
-
Just run monerod --help and put whatever options you like in it (without the -- at the begining and an = then value). It's just to save running monerod with command line options every time (if you are using various options). E.g. fluffy-blocks=true Commented Jul 25, 2018 at 16:22
-
what is a generic .bitmonero.conf file to create a public node ? I'm not sure what settings I need.– Patoshi パトシ ♦Commented Jul 25, 2018 at 16:36
-
You don't need a conf file, it's just there as an option if you want to customize the default settings. Commented Jul 25, 2018 at 18:31