Guide | How to run your own Monero node
Running your own monero node has many benefits and this guide will teach you how.

​🗡 Why should I run my own Monero node?

  • To independently have the ability to send/receive/verify transactions while maintaining the highest privacy and security, you will want to run your own node.
  • If you do not run your own node, you are relying on other's nodes to verify and send your transactions.
  • To contribute to the decentralization of the Monero network.
  • To use a monero wallet requires connecting to a fully synched node. Best node is your own.
  • To connect to the monero network, you run a peer-to-peer application called monerod (the d stands for daemon) and it forms the backbone of the Monero network.
  • Optional: Offering your node as a public remote note is to volunteer your node as a public resource by helping onboard new monero nodes and relay other monero users transactions.
Monero nodes come in two flavours.
  • Full Node: Stores all blockchain data
  • Pruned Node: Stores a random 1/8th of the blockchain's data and requires much less disk space

🚀
Minimum Full Node System Requirements

  • Dual-core CPU
  • 4+ GB RAM
  • 160GB+ SSD HD

🤖
Minimum Pruned Node System Requirements

  • Same as full node yet with a smaller HD
  • 80GB+ SSD HD
As of early 2021, a pruned node uses 32GB and a full node uses 96GB of storage space.

🧱
1. Configuring ports and firewall

Kudos to r/Krakataua314
Full Public Node with port 18089, a restricted RPC port.
1
# By default, deny all incoming and outgoing traffic
2
sudo ufw default deny incoming
3
sudo ufw default allow outgoing
4
# Allow ssh access
5
sudo ufw allow ssh
6
# Allow monerod p2p port
7
sudo ufw allow 18080
8
# Allow monerod restricted RPC port
9
sudo ufw allow 18089
10
# Enable firewall
11
sudo ufw enable
Copied!
1
# Verify status
2
sudo ufw status numbered
Copied!
Setup service accounts.
1
# creates system user account for monero service
2
sudo adduser --system --group --no-create-home monero
Copied!
Create some folders the service needs & set their ownership:
1
# logfile goes here
2
sudo mkdir /var/log/monero
3
4
# blockchain database goes here
5
sudo mkdir /var/lib/monero
6
7
# create file for config
8
touch /var/lib/monero/monerod.conf
9
10
# set permissions to service account
11
sudo chown -R monero:monero /var/lib/monero
12
sudo chown -R monero:monero /var/log/monero
Copied!
Download the latest monero node binaries.
1
cd $HOME
2
wget --content-disposition https://downloads.getmonero.org/cli/linux64
Copied!
Verify the download hash signature.
1
#download latest hashes.txt file
2
wget https://www.getmonero.org/downloads/hashes.txt
3
4
#search hashes.txt file for the computed sha256sum
5
grep -e $(sha256sum monero-linux-x64-*.tar.bz2) hashes.txt
Copied!
A match appears and this confirms the file is valid.
Example output:
hashes.txt:b566652c5281970c6137c27dd15002fe6d4c9230bc37d81545b2f36c16e7d476 monero-linux-x64-v0.17.1.8.tar.bz2
Extract tar and copy to /usr/local/bin
1
tar -xvf monero-linux-x64-*.tar.bz2
2
sudo mv monero-x86_64-linux-gnu-*/* /usr/local/bin
3
sudo chown -R monero:monero /usr/local/bin/monero*
Copied!
Cleanup files.
1
rm monero-linux-x64-*.tar.bz2
2
rm hashes.txt
3
rm -rf monero-x86_64-linux-gnu-*/
Copied!
Configure your Monero Node with a config file.
1
sudo nano /var/lib/monero/monerod.conf
Copied!
Add this to the file.
1
#blockchain data / log locations
2
data-dir=/var/lib/monero
3
log-file=/var/log/monero/monero.log
4
5
#log options
6
log-level=0
7
max-log-file-size=0 # Prevent monerod from managing the log files; we want logrotate to take care of that
8
9
# P2P full node
10
p2p-bind-ip=0.0.0.0 # Bind to all interfaces (the default)
11
p2p-bind-port=18080 # Bind to default port
12
public-node=true # Advertises the RPC-restricted port over p2p peer lists
13
14
# rpc settings
15
rpc-restricted-bind-ip=0.0.0.0
16
rpc-restricted-bind-port=18089
17
18
# i2p settings
19
tx-proxy=i2p,127.0.0.1:8060
20
21
# node settings
22
prune-blockchain=true
23
db-sync-mode=safe # Slow but reliable db writes
24
enforce-dns-checkpointing=true
25
enable-dns-blocklist=true # Block known-malicious nodes
26
no-igd=true # Disable UPnP port mapping
27
no-zmq=true # ZMQ configuration
28
29
# bandwidth settings
30
out-peers=32 # This will enable much faster sync and tx awareness; the default 8 is suboptimal nowadays
31
in-peers=32 # The default is unlimited; we prefer to put a cap on this
32
limit-rate-up=1048576 # 1048576 kB/s == 1GB/s; a raise from default 2048 kB/s; contribute more to p2p network
33
limit-rate-down=1048576 # 1048576 kB/s == 1GB/s; a raise from default 8192 kB/s; allow for faster initial sync
Copied!
Configuration File Comments
  • Modify prune-blockchain to false if you want to store full blockchain
  • Modify public-node to false if you do not want other users to use your node.
  • rpc-restricted-bind-ip/port flagsenable restricted access to your node but allow full RPC from other Monero wallets on your LAN.
  • Limit the upload speed in case you have a data cap: limit-rate-up=8192 (in kB/s). Conversely, if you have an unlimited data plan, consider increasing the upload speeds to better support the Monero network. A node can typically use up to 1TB traffic per month.
Create a monerod.service systemd unit file. Simply copy and paste the following.
1
cat > $HOME/monerod.service << EOF
2
[Unit]
3
Description=monerod
4
After=network.target
5
6
[Service]
7
Type=forking
8
PIDFile=/var/lib/monero/monerod.pid
9
ExecStart=/usr/local/bin/monerod --config-file /var/lib/monero/monerod.conf --detach --pidfile /var/lib/monero/monerod.pid
10
User=monero
11
Group=monero
12
Restart=always
13
RestartSec=5
14
15
[Install]
16
WantedBy=multi-user.target
17
EOF
Copied!
Move the file to /etc/systemd/system/monerod.service
1
sudo mv $HOME/monerod.service /etc/systemd/system/monerod.service
Copied!
Restart monerod in order for config change to take effect.
1
sudo systemctl daemon-reload
2
sudo systemctl enable monerod
3
sudo systemctl restart monerod
Copied!
Check the systemd service with
1
journalctl -fu monerod
Copied!
Review the logs for any errors. CTRL + C to exit.
1
tail -f /var/log/monero/monero.log
Copied!
Allow the node to sync. This may take a few hours up to a few days depending on your node's system resources.
Your node is completely synchronized the node status says height: n / n 100% and has the same block height as a public xmr block explorer such as https://blockchair.com/monero or http://xmrchain.net/
Check your node's block height with the following command.
1
monerod status
Copied!
Connect to your brand new node with your favorite clients such as Monerujo, CakeWallet or Monero-GUI. Simply enter your node's IP or hostname into the remote node field. Congrats!
🎊

Optional: Start mining

Like winning a lotto ticket, your monero node has a chance to mine a block. You may never win a block but your hashrate helps protect and strengthen the network.
Start with 1 thread, check your mining hashrate and increase if your CPU resources allow.
Run the following command.
1
monerod start_mining <YOUR XMR ADDRESS> <NUMBER OF THREADS>
Copied!

🛸
Optional: Setup I2P

Download I2p.
1
wget https://github.com/i2p-zero/i2p-zero/releases/download/v1.20/i2p-zero-linux.v1.20.zip
2
unzip i2p-zero-linux.v1.20
3
sudo cp -r i2p-zero-linux.v1.20/* /usr/local/bin
4
5
sudo chown -R i2p:i2p /usr/local/bin/router
6
7
rm i2p-zero-linux.v1.20.zip
8
rm -rf i2p-zero-linux.v1.20
Copied!
Setup service accounts.
1
# creates system user account for i2p service
2
sudo adduser --system --group --no-create-home i2p
Copied!
Create a i2pzero.service systemd unit file. Simply copy and paste the following.
1
cat > $HOME/i2pzero.service << EOF
2
[Unit]
3
Description=i2pzero
4
After=network.target
5
6
[Service]
7
Type=simple
8
User=i2p
9
Group=i2p
10
ExecStart=/usr/local/bin/router/bin/i2p-zero
11
Restart=always
12
RestartSec=5
13
14
[Install]
15
WantedBy=multi-user.target
16
EOF
Copied!
Move the file to /etc/systemd/system/i2pzero.service
1
sudo mv $HOME/i2pzero.service /etc/systemd/system/i2pzero.service
Copied!
Check the logs.
1
journalctl -fu i2pzero
Copied!
Restart i2pzero in order for config change to take effect.
1
sudo systemctl daemon-reload
2
sudo systemctl enable i2pzero
3
sudo systemctl start i2pzero
4
sudo systemctl status i2pzero
Copied!
Based on the status, open the port <NUMBER> on your firewall for best performance.
For best performance, please open port <NUMBER> on your firewall for incoming UDP and TCP connections. This port has been randomly assigned to you. For privacy reasons, please do not share this port with others.
1
cd $HOME/i2p-zero-linux
2
INBOUND_I2P=$(router/bin/tunnel-control.sh server.create 127.0.0.1 8061)
3
echo INBOUND I2P: $INBOUND_I2P
4
router/bin/tunnel-control.sh socks.create 8060
Copied!
Append the following to your monerod config file.
1
sudo nano /var/lib/monero/monerod.conf
2
3
tx-proxy=i2p,127.0.0.1:8060
4
anonymous-inbound=<Your INBOUND_I2P>,127.0.0.1:8061
Copied!
Open the i2p port.
1
# i2p port
2
sudo ufw allow 8060
Copied!
Restart monerod.
1
sudo systemctl restart monerod
Copied!

🛠
2. How to update a monero node

When a new release is cut, you will want to update to the latest stable release. The following shows you how to update your monero node.
Review release notes and check for breaking changes/features.
Download the latest monero node binaries.
1
cd $HOME
2
wget --content-disposition https://downloads.getmonero.org/cli/linux64
Copied!
Verify the download hash signature.
1
#download latest hashes.txt file
2
wget https://www.getmonero.org/downloads/hashes.txt
3
4
#search hashes.txt file for the computed sha256sum
5
grep -e $(sha256sum monero-linux-x64-*.tar.bz2) hashes.txt
Copied!
A match appears and this confirms the file is valid.
Also check the new version number matches your expectations.
Example output:
hashes.txt:b566652c5281970c6137c27dd15002fe6d4c9230bc37d81545b2f36c16e7d476 monero-linux-x64-v0.17.1.8.tar.bz2
Extract tar file.
1
tar -xvf monero-linux-x64-*.tar.bz2
Copied!
Stop, copy new binaries and restart monerod service.
1
sudo systemctl stop monerod
Copied!
1
sudo mv monero-x86_64-linux-gnu-*/* /usr/local/bin
2
sudo chown -R monero:monero /usr/local/bin/monero*
3
sudo systemctl start monerod
Copied!
Check the logs to verify the services are working properly and ensure there are no errors.
1
sudo systemctl status monerod
Copied!
Review the logs for any errors. CTRL + C to exit.
1
tail -f /var/log/monero/monero.log
Copied!
Cleanup files.
1
rm monero-linux-x64-*.tar.bz2
2
rm hashes.txt
3
rm -rf monero-x86_64-linux-gnu-*/
Copied!