Introduction
Monero is one of the most important cryptocurrencies in my opinion. It does not have the same market share of Bitcoin, however, it is quite unique in one aspect: Privacy. Monero is just like cash, no one needs to know how much monero was sent or who sent it. It's the opposite of Bitcoin in this aspect. In fact, bitcoin is one worse than fiat money for privacy. You can read more details here: https://lukesmith.xyz/articles/monero-maximalism-or-how-bitcoin-is-a-coin/
Obs: I'm NOT recommending anyone to invest at Monero. Monero is supposed to be a coin, but since crypto is still too volatile, a lot of people use to invest. Do your own research, I'm not responsible for any investment that you do.
1 - Choose a VPS or setup it at home
First things first, you will need a server. You can use your own home pc if you prefer or a VPS. A VPS is easier because it will stay up 24/7 and you can always open ports there. At home, a lot of ISP providers do not allow you to open ports, so your node wouldn't be public. It would help the Monero network too, but you wouldn't be able to use it out of your house without opening the ports somehow (could be even with ngrok).
I recommend using CONTABO specifically for running a node since they offer an amazing price for storage VPS. You can check their pricing HERE. For a Monero node, the Storage VPS S is more than enough. Monero Blockchain is using about 175GB currently. It uses a bit less than 2GB of ram and barely uses any CPU when full synced (around 3% of usage).
2 - Securing VPS
First of all, disable password login. I've this guide for that.
After that, you can install and setup UFW if it is not installed yet:
sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow 18080
sudo ufw allow 18089
sudo ufw enable
3- Creating a user
Now, for security reasons, let's create a user instead of running Monero at root:
adduser monerouser
You can choose a password and then hit enter to finish the process. Once it is done, proceed to the next step
4- Changing settings and syncing node
Now, finally, enter the user for Monero
su monerouser
cd ~
After that, you can download the Monero Core:
wget -c https://downloads.getmonero.org/linux64
mkdir monero
tar -xjvf linux64 -C monero
Now, enter in the folder and start the core just to create the settings. Do not wait for the full sync, just start it and stop after a few seconds
./monerod
To stop it, you can use ctrl + C. Once it is stopped, we need to edit a few settings on bitmonero.conf
nano ~/.bitmonero/bitmonero.conf
Inside this file, insert the following:
# P2P full node
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
# node settings
enforce-dns-checkpointing=true
db-sync-mode=safe #Slow but reliable db writes
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
Once it is done, you can save the file with Ctrl + O and then enter.
Now, start you node in detached mode:
./monerod --detach
You're now done! You just need to wait your node to fully sync. To check your sync status, you can use:
monerod status
It will return something like this for you:
In my screenshot, my node is already fully synced, so it shows 100%. This process should take a few hours, but it depends on your internet and VPS speed.
Once it is fully synced, you can use your node at Cake Wallet for example. It will be the IP of your VPS and port 18089
Conclusion and credits
That is it! Running your own node is highly recommended by Monero. It will help the network to be more decentralized and it will provide more privacy for you.
This post wouldn't be possible without the help of the following resources:
https://www.getmonero.org/resources/user-guides/vps_run_node.html
https://www.coincashew.com/coins/overview-xmr/guide-or-how-to-run-a-full-node
If you enjoyed this article, you can share it your friends or subscribe to The Self Hosting Art to keep us motivated. Thank you for reading :)
You can also help with Monero, Litecoin, Bitcoin or Nano: Monero:837X2SppmrrPkBbpsy9HQU1RFxKhsBcn6GdQv2wR5wGoiw8ctfh6Rt36xaszveZHysYA5KSDBr51y5YuQ3YCV23sJS9nhqW BTC:bc1qrvgz7dzzlfllulakw87vzvtf7s2u8t0sxpjehr Litecoin:ltc1qycz6ssg6xjxttuld6l6ulzqdr3y70rm8wv2g9p Nano:nano_1jmd6dg4dbem7f3wrojr7g45ioe6eb5et3iq11f8urfxe8qausxipup8bhua