What are the benefits of operating my own Monero node?
- Running your own Monero node gives you the independent capability to send, receive, and verify transactions, ensuring the utmost privacy and security.
- By not relying on others’ nodes to handle your transactions, you maintain a higher level of control and self-reliance.
- Operating your own node contributes to the decentralization of the Monero network, enhancing its overall resilience and security.
- To utilize a Monero wallet effectively, you need to connect to a fully synchronized node, and having your own node is the ideal choice.
- Connecting to the Monero network involves running a peer-to-peer application called monerod (with the “d” denoting daemon), which serves as the foundation of the Monero network.
- Additionally, you have the option to offer your node as a public remote note, volunteering your node as a public resource to assist in onboarding new Monero nodes and facilitating the relay of transactions for other Monero users.
There are two different types of Monero nodes available.
- 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
1. Adjusting port settings and firewall configurations.
Suggestion: The most recommended choice is to set up a Public Full Node using port 18089, which includes a restricted RPC port. This option ensures optimal support for the Monero network while enabling both yourself and others to utilize it as a remote node for wallets. By following the instructions provided in this guide, you will successfully deploy a Monero node configured in this manner. If desired, you can modify the port settings to achieve a more limited functionality.
# By default, deny all incoming and outgoing traffic
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow ssh access
sudo ufw allow ssh
# Allow monerod p2p port
sudo ufw allow 18080
# Allow monerod restricted RPC port
sudo ufw allow 18089
# Enable firewall
sudo ufw enable
# Verify status
sudo ufw status numbered
Setup service accounts.
# creates system user account for monero service
sudo adduser –system –group –no-create-home monero
Create some folders the service needs & set their ownership:
# logfile goes here
sudo mkdir /var/log/monero# blockchain database goes here
sudo mkdir /var/lib/monero# create file for config
touch /var/lib/monero/monerod.conf# set permissions to service account
sudo chown -R monero:monero /var/lib/monero
sudo chown -R monero:monero /var/log/monero
Download the latest monero node binaries.
cd $HOME
wget –content-disposition https://downloads.getmonero.org/cli/linux64
Verify the download hash signature.
#download latest hashes.txt file
wget https://www.getmonero.org/downloads/hashes.txt#search hashes.txt file for the computed sha256sum
grep -e $(sha256sum monero-linux-x64-*.tar.bz2) hashes.txt
A match appears and this confirms the file is valid.
Example output:
hashes.txt:b544452c5281970c6137c27dd11102fe6d4c9230bc37d81545b2f36c16e7d476 monero-linux-x64-v0.17.1.8.tar.bz2
Extract tar and copy to /usr/local/bin
tar -xvf monero-linux-x64-*.tar.bz2
sudo mv monero-x86_64-linux-gnu-*/* /usr/local/bin
sudo chown -R monero:monero /usr/local/bin/monero*
Cleanup files.
rm monero-linux-x64-*.tar.bz2
rm hashes.txt
rm -rf monero-x86_64-linux-gnu-*/
Configure your Monero Node with a config file.
sudo nano /var/lib/monero/monerod.conf
Add this to the file.
#blockchain data / log locations
data-dir=/var/lib/monero
log-file=/var/log/monero/monero.log#log options
log-level=0
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
public-node=true # Advertises the RPC-restricted port over p2p peer lists# rpc settings
rpc-restricted-bind-ip=0.0.0.0
rpc-restricted-bind-port=18089# i2p settings
tx-proxy=i2p,127.0.0.1:8060# node settings
prune-blockchain=true
db-sync-mode=safe # Slow but reliable db writes
enforce-dns-checkpointing=true
enable-dns-blocklist=true # Block known-malicious nodes
no-igd=true # Disable UPnP port mapping
no-zmq=true # ZMQ configuration# bandwidth settings
out-peers=32 # This will enable much faster sync and tx awareness; the default 8 is suboptimal nowadays
in-peers=32 # 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
Configuration File Comments
prune-blockchain
to false
if you want to store full blockchain- Modify
public-node
tofalse
if you do not want other users to use your node. rpc-restricted-bind-ip/port flags
enable 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.
cat > $HOME/monerod.service << EOF
[Unit]
Description=monerod
After=network.target[Service]
Type=forking
PIDFile=/var/lib/monero/monerod.pid
ExecStart=/usr/local/bin/monerod –config-file /var/lib/monero/monerod.conf –detach –pidfile /var/lib/monero/monerod.pid
User=monero
Group=monero
Restart=always
RestartSec=5[Install]
WantedBy=multi-user.target
EOF
Move the file to /etc/systemd/system/monerod.service
sudo mv $HOME/monerod.service /etc/systemd/system/monerod.service
Restart monerod in order for config change to take effect.
sudo systemctl daemon-reload
sudo systemctl enable monerod
sudo systemctl restart monerod
Check the systemd service with
journalctl -fu monerod
Review the logs for any errors. CTRL + C to exit.
tail -f /var/log/monero/monero.log
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 now your node’s block height with the following command.
monerod status
Now you can easily connect to your newly created node using your preferred clients like Monerujo, CakeWallet, or Monero-GUI. All you need to do is enter the IP or hostname of your node into the designated remote node field. Congratulations!
exactly what is was lookin for thanksss 🙂