The Monero daemon (monerod) is the background service that syncs the blockchain, talks to peers, exposes RPC for wallets, and (optionally) serves the public as a remote node. This guide explains the most useful startup flags, with copy-paste examples for common setups.
First things first
- List all options:
monerod --help
andmonerod --help-advanced
- Use a config file:
monerod --config-file /path/to/monerod.conf
- Run as a service: on Linux, create a
systemd
unit so it auto-restarts and starts on boot.
Core flags you’ll use constantly
--data-dir
– Where the blockchain, p2p data, and logs live.--prune-blockchain
– Pruned node to save disk space (keeps what’s needed to validate; not archival).--detach
– Run in the background (daemonize).--log-file
,--log-level
– Write logs to a custom file; levels are integers (e.g.,0
quiet to4
very verbose).--max-concurrency
– Cap CPU threads for verification and background jobs.
P2P networking (node-to-node)
--p2p-bind-ip
,--p2p-bind-port
– IP/port for the peer-to-peer listener (default port is commonly 18080).--out-peers
,--in-peers
– Limit outbound/inbound peers for bandwidth or resource control.--add-peer
– Manually connect to a peer now (doesn’t persist across restarts).--add-priority-node
,--add-exclusive-node
,--seed-node
– Prefer, exclusively use, or bootstrap from specific peers.--limit-rate-up
,--limit-rate-down
– Throttle upload/download.--no-igd
– Disable UPnP/NAT-PMP (prevents automatic router port mapping).--hide-my-port
– Don’t advertise your port to the network (no inbound connections).
RPC & remote-node flags (wallets and tools talk here)
--rpc-bind-ip
,--rpc-bind-port
– Where the JSON-RPC server listens (default port often 18081).--restricted-rpc
– Serve a restricted API surface (safe for public remote-node use).--public-node
– Broadcast that you’re a public remote node.--confirm-external-bind
– Required when binding RPC to a non-loopback IP (e.g.,0.0.0.0
).--rpc-login
– HTTP basic auth for RPC. Strongly recommended if exposed beyond localhost.- ZMQ endpoints – Monero offers ZeroMQ notifications; use the appropriate
zmq
flags for your tooling (wallets and indexers sometimes use this).
Database & sync behavior
--db-sync-mode
– Choose a sync profile that balances safety and speed (e.g., a “safer” profile for SSD integrity vs a “faster” profile for quick catch-up). If unsure, leave default.--block-sync-size
– Blocks per batch when syncing; tune modestly if you have unusual bandwidth/latency.
Tip: Use an SSD/NVMe. HDDs will bottleneck monerod
badly during initial sync.
Privacy & proxy flags
--proxy
– Route P2P traffic via a SOCKS proxy (e.g., Tor at127.0.0.1:9050
).--tx-proxy
– Send transactions via Tor/I2P without exposing your IP (e.g.,--tx-proxy tor,127.0.0.1:9050
).
Security best practices when exposing a remote node
- Use
--restricted-rpc
and--rpc-login
. - Bind explicitly:
--rpc-bind-ip 0.0.0.0
+--confirm-external-bind
, then enforce firewall rules (e.g., allowlisted IPs or reverse proxy in front). - Disable UPnP with
--no-igd
. Keepmonerod
patched.
Copy-paste examples
1) Personal full node (desktop/laptop)
monerod \ --data-dir /var/lib/monero \ --detach \ --log-file /var/log/monero/monerod.log \ --max-concurrency 4
2) Pruned node (save disk space)
monerod \ --data-dir /var/lib/monero \ --prune-blockchain \ --detach \ --log-file /var/log/monero/monerod.log
3) Public remote node (restricted RPC + auth)
monerod \ --data-dir /srv/monero \ --rpc-bind-ip 0.0.0.0 \ --rpc-bind-port 18081 \ --restricted-rpc \ --public-node \ --rpc-login stronguser:strongpass \ --confirm-external-bind \ --no-igd \ --out-peers 64 --in-peers 32 \ --detach
Harden with a firewall and/or reverse proxy. Monitor logs and update regularly.
4) Route traffic through Tor (P2P + tx)
# Tor must be running locally (SOCKS at 127.0.0.1:9050) monerod \ --data-dir /var/lib/monero \ --proxy 127.0.0.1:9050 \ --tx-proxy tor,127.0.0.1:9050 \ --hide-my-port \ --detach
Using a config file
Place your settings in a config file (e.g., /etc/monerod.conf
or anywhere you prefer) and start with --config-file
.
# /etc/monerod.conf (example) data-dir=/srv/monero log-file=/var/log/monero/monerod.log log-level=1 prune-blockchain=1 out-peers=64 in-peers=32
RPC (public remote node)
rpc-bind-ip=0.0.0.0
rpc-bind-port=18081
restricted-rpc=1
public-node=1
confirm-external-bind=1
rpc-login=stronguser:strongpass
no-igd=1
monerod --config-file /etc/monerod.conf --detach
FAQ
Pruned vs full?
Pruned nodes keep only the minimum data needed to fully validate—great for laptops/SSDs with limited space. Full nodes keep the entire chain (helpful for archival and some tooling).
What if my wallet can’t connect?
- Confirm the daemon is synced and RPC is listening on the IP/port you expect.
- If remote, verify
--restricted-rpc
is set and your firewall/NAT forwards the port correctly. - Check
--rpc-login
credentials and logs for auth errors.
Which flags improve performance most?
Use an SSD/NVMe, keep --max-concurrency
reasonable (not simply “max cores”), and avoid overly aggressive --block-sync-size
on weak connections. For servers, run headless and minimize background services.
Quick checklist for a healthy node
- SSD/NVMe storage, adequate RAM, stable power/network.
- Run with
--detach
, capture logs, back up your config. - If public:
--restricted-rpc
,--rpc-login
, firewall, and routine updates.
That’s it! With these monerod startup flags you can tailor a private desktop node, a lean pruned node, or a hardened public remote node—whatever your Monero setup needs.