Author

Topic: [BitcoinTalk Node Tutorial #5] Hosting a Monero node on the same machine (Read 235 times)

legendary
Activity: 1512
Merit: 7340
Farewell, Leo
Is it better for the monero network to run a node over clearnet or tor? I've heard running over tor increases chances of a sybil attack
The only advantage of a Sybil attacker in Tor is that they can create an infinite number of onion addresses for free, which would come at a cost to do with IP addresses. I cannot think of any other advantage. If you're being Sybil attacked in a Proof-of-Work blockchain system, it means the attacker owns a good percentage of the hashrate, because otherwise, your client would stuck on a block height, and you could notice that you're being Sybil attacked.

In the case of an attacker who has the incentive and amount of money to Sybil attack, the cost to acquire a few IP addresses would really be negligible.
jr. member
Activity: 39
Merit: 27
Is it better for the monero network to run a node over clearnet or tor? I've heard running over tor increases chances of a sybil attack
hero member
Activity: 560
Merit: 1060
Does it go slow to you too?

Yes, it was actually slowing down my whole internet connection at home. I was trying to use watch some videos on YouTube and it was very slow.

What saved me was:

1. I changed in-peers and out-peers to much lower values.
2. I used the limit-rate to limit the up and down rate.

I think specifically I have set them to:
in peers = 8
out peers = 20
limit rate = 2048

I am not sure about the specific issue that you mention though...
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
I just tried installing a Monero full node on my Raspberry Pi 4 today. It didn't go well. Installation is spot on, and I'm glad that I could use the Monero GUI (which is officially supported by Monero dev team), but it's just too resource-requiring for a Pi that already runs a Bitcoin node.

The ugly part wasn't synchronization. That took a week on my HDD, and it's a reasonable amount of time given that Monero has an exponentially larger spend index size. The ugly part is that it's faster to run a pruned node on my main computer (with no running in the background) and open it up whenever I want to make a transaction, than connecting to my Raspberry Pi via remote node. It was trying to calculate the automatic fee, and had stuck...

Does it go slow to you too?
hero member
Activity: 560
Merit: 1060
Which model? My experience with Pi nodes was... mediocre, to say the least, in the (now somewhat distant) past. Especially due to initial block download time. Wink In my guide, I showed that you basically really want 8GB of RAM.

It's the Raspberry Pi 4b 8GB RAM as I mention in the first tutorial.

To be honest, I chose the RPi because it was very cheap, but if I had plenty of money I would probably choose an NUC. The 8GB RAM sound sufficient of course.  The IBD took 72hrs for me.

I highly recommend Core Lightning (as used in my guide). You can take my guide as a starting point. Smiley

Yes I will go with CLN and I will definetely take a look at it.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
Yeah mine too. I thought of running all the essentials on a rapberry pi.
Which model? My experience with Pi nodes was... mediocre, to say the least, in the (now somewhat distant) past. Especially due to initial block download time. Wink In my guide, I showed that you basically really want 8GB of RAM.

The only thing I haven't yet figured out is whether I will make it a Lightning node as well. If I do, I will probably do it using CLN and not LND. But I need to find the necessary time, otherwise I will never make it.
I highly recommend Core Lightning (as used in my guide). You can take my guide as a starting point. Smiley
hero member
Activity: 560
Merit: 1060
Thanks, I try to keep it updated, as seen in the changelog.
I'll update it again this week; it's been 6 months.. Roll Eyes

My guide is more focused on setting up a dedicated machine that runs all (and only) the Bitcoin 'essentials'.

Yeah mine too. I thought of running all the essentials on a rapberry pi. The only thing I haven't yet figured out is whether I will make it a Lightning node as well. If I do, I will probably do it using CLN and not LND. But I need to find the necessary time, otherwise I will never make it.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
I think with Core and Monero people will find the information online easily; just Electrs was surprising to me when I first installed it. Maybe I shall add information about that in my own guide.. Tongue
Very nice guide. Congrats to you too.
Thanks, I try to keep it updated, as seen in the changelog.
I'll update it again this week; it's been 6 months.. Roll Eyes

My guide is more focused on setting up a dedicated machine that runs all (and only) the Bitcoin 'essentials'.
hero member
Activity: 560
Merit: 1060
Looks great now, super comfortable to navigate. Smiley So you decided against something like a little 'disclaimer' or information regarding disk utilization at the top of the Bitcoin Core, Electrs and Monero guides?

No, absolutely not. I have just forgotten about it.  Tongue I am adding it now! I will run sudo du -sh on each directory and I will update the posts.

I think with Core and Monero people will find the information online easily; just Electrs was surprising to me when I first installed it. Maybe I shall add information about that in my own guide.. Tongue

Very nice guide. Congrats to you too.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
<~snip>
I will definetely do both, in fact the first suggestion is very useful. That way it is more apparent that the posts are part of a series, otherwise, one could miss it. Thanks
Looks great now, super comfortable to navigate. Smiley So you decided against something like a little 'disclaimer' or information regarding disk utilization at the top of the Bitcoin Core, Electrs and Monero guides?

I think with Core and Monero people will find the information online easily; just Electrs was surprising to me when I first installed it. Maybe I shall add information about that in my own guide.. Tongue
hero member
Activity: 560
Merit: 1060
<~snip>

I will definetely do both, in fact the first suggestion is very useful. That way it is more apparent that the posts are part of a series, otherwise, one could miss it. Thanks
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
I just realized that it's a series; maybe would be a good idea to add backlinks to all or at least the first tutorial to the top.
There are. Just check on top of each post. And there is also a link to the next one on the bottom of each post.
True, but I meant a full index, something like:

Yeah, I think as a user I'd like to see how much RAM & CPU, but maybe most importantly how much disk space, every additional piece of software uses. From my own experience, it should be just Bitcoin Core and Monero taking up most of the disk space.

Hey n0nce.

So:

Code:
Bitcoin 626G
Monero 174G
Electrs  66G
That's very good to know, thanks! I'd add it to the individual guides too, so users would know what they're 'getting into' before installing every one of these.
hero member
Activity: 560
Merit: 1060
Yeah, I think as a user I'd like to see how much RAM & CPU, but maybe most importantly how much disk space, every additional piece of software uses. From my own experience, it should be just Bitcoin Core and Monero taking up most of the disk space.

Hey n0nce.

So:

Code:
Bitcoin 626G
Monero 174G
Electrs  66G
hero member
Activity: 560
Merit: 1060
I just realized that it's a series; maybe would be a good idea to add backlinks to all or at least the first tutorial to the top.

There are. Just check on top of each post. And there is also a link to the next one on the bottom of each post.

So every post is linked with the previous and the next one.
hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
If you are interested in the hardware that I use, you can head back to the 1st tutorial of the series, in which I install bitcoin core on the same machine.
I just realized that it's a series; maybe would be a good idea to add backlinks to all or at least the first tutorial to the top.

If you want to know how much RAM and CPU the node uses, then I will definitely make sure to update the original post.
In fact it is interesting to see how much RAM all of the apps I have installed in the series use (Bitcoin Core, Electrs, Sparrow, Monero)
Yeah, I think as a user I'd like to see how much RAM & CPU, but maybe most importantly how much disk space, every additional piece of software uses. From my own experience, it should be just Bitcoin Core and Monero taking up most of the disk space.
hero member
Activity: 560
Merit: 1060
It would be interesting to add a few details in terms of requirements (computing and storage) to the top of the guide.

I remember fondly the days when people downloaded Bitcoin Core, back when it was the default wallet to run on your daily driver laptop, coming back a few days later to 'full hard drive' notifications from their operating system.. Wink

Especially, when someone is already running Bitcoin Core on the same machine and maybe even chose their SSD to fit a certain number of years worth of Bitcoin blockchain on it.

Hello.

If you are interested in the hardware that I use, you can head back to the 1st tutorial of the series, in which I install bitcoin core on the same machine.

If you want to know how much RAM and CPU the node uses, then I will definitely make sure to update the original post.

In fact it is interesting to see how much RAM all of the apps I have installed in the series use (Bitcoin Core, Electrs, Sparrow, Monero)

hero member
Activity: 882
Merit: 5834
not your keys, not your coins!
It would be interesting to add a few details in terms of requirements (computing and storage) to the top of the guide.

I remember fondly the days when people downloaded Bitcoin Core, back when it was the default wallet to run on your daily driver laptop, coming back a few days later to 'full hard drive' notifications from their operating system.. Wink

Especially, when someone is already running Bitcoin Core on the same machine and maybe even chose their SSD to fit a certain number of years worth of Bitcoin blockchain on it.
hero member
Activity: 560
Merit: 1060
Is important to mention that you can run bitcoin and monero on the same raspberry pi because the nodes run on a different port, some altcoins uses the same port than bitcoin and that can give use some problems but we can modify those ports in the config file and that should fix the problem.

I just remembered that I forgot to write about allowing incoming connections on 18080 and 18089 on my node's firewall. I will add it at the beginning of my tutorial. Take into consideration that I have used 18089 but the default for the RPC commands is 18080. Anyway, thanks for the comment and the reminder.
legendary
Activity: 3332
Merit: 3116
Great job with this tutorial apogio.

Is important to mention that you can run bitcoin and monero on the same raspberry pi because the nodes run on a different port, some altcoins uses the same port than bitcoin and that can give use some problems but we can modify those ports in the config file and that should fix the problem.

And for those who want to test this tutorial but don't have a R.Pi then feel free to try in your PC. you can download the source for any os here:

https://www.getmonero.org/downloads/#cli
hero member
Activity: 560
Merit: 1060
Links to other tutorials from the series:
[BitcoinTalk Node Tutorial #1] Running Bitcoin Core on Raspbian Lite (GUI-less) https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-1-running-bitcoin-core-on-raspbian-lite-gui-less-5476754
[BitcoinTalk Node Tutorial #2] Installing Electrs from source https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-2-installing-electrs-from-source-5477339
[BitcoinTalk Node Tutorial #3] Sparrow terminal / infinite Whirlpool mixes https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-3-sparrow-terminal-infinite-whirlpool-mixes-5470024
[BitcoinTalk Node Tutorial #4] Connecting BISQ to our node https://bitcointalksearch.org/topic/bitcointalk-node-tutorial-4-connecting-bisq-to-our-node-5478756

Size required on disk:
Code:
$ sudo du -sh /media/apogio/BTC/monero
174G /media/apogio/BTC/monero



Hosting a Monero node on the same machine

As I have mentioned in various places in this forum, I am a huge fun of Monero. So, without further delay, let's run a monero node on our Raspberry Pi.

Configuring Firewall to allow incoming connections on ports 18080 & 18089

I am using ufw for this tutorial. So the command should be:

Code:
sudo ufw allow 18080
sudo ufw allow 18089

Downloading & Installing Monero binaries

We will download the binaries in our Downloads folder and we will install them.

Code:
mkdir ~/Downloads/monero
wget https://downloads.getmonero.org/cli/linuxarm8
tar -xvf linuxarm8 -C monero
cd ~/Downloads/monero/monero-aarch64-linux-gnu-v0.18.3.1
sudo install -m 0755 -o root -g root -t /usr/local/bin monero*

Now, all the binaries are install in our /usr/local/bin directory.

Let's check if they work using the command

Code:
monerod --help

It should print an output that displays the available options for monerod binary.

Configuring Monero node

We are almost ready to roll, but we need to create the configuration file for our node. We will create it in our external SSD, in the path /media/apogio/BTC/monero.

Code:
nano /media/apogio/BTC/monero/monerod.conf

Now let's paste the following data inside the file:

Code:
# Data directory (blockchain db and indices)
data-dir=/media/apogio/BTC/monero

# Logs
log-file=/media/apogio/BTC/monero/monerod.log
max-log-file-size=0

# P2P configuration
p2p-bind-ip=0.0.0.0            # Bind to all interfaces (the default)
p2p-bind-port=18080            # Bind to default port
public-node=true

# RPC configuration
rpc-restricted-bind-ip=0.0.0.0            # Bind restricted RPC to all interfaces
rpc-restricted-bind-port=18089            # Bind restricted RPC on custom port to differentiate from default unrestricted RPC (18081)

# Node settings
no-igd=1                       # Disable UPnP port mapping
no-zmq=1

# Block known-malicious nodes from a DNSBL
enable-dns-blocklist=1

# Peers
out-peers=64
in-peers=1024

The last 2 lines will be removed after the initial blockchain synchronization.

Let's start our node by running the following:

Code:
monerod --config-file=/media/apogio/BTC/monero/monerod.conf --detach

Now monero runs on the background, downloading the blockchain. We can easily check the status by running:

Code:
monerod status

It will return something like the following example:

Code:
Height: 319704/3054494 (10.5%) on mainnet, not mining, net hash 14.05 MH/s, v1, 33(out)+0(in) connections, uptime 0d 0h 26m 3s

That's it, we are now running a monero node.

Connecting Monero GUI wallet to our node

The final step is to connect a wallet to our node. Of course we could use the monero-wallet-cli binary, but for our tutorial we will connect the Monero GUI wallet to our node.

After downloading the appropriate version for our OS, we will need to choose the "Advanced mode".



Create a new wallet:



Then head over to the node settings and simply add the IP where the node is hosted and the port.



Jump to: