πŸ”— Run your own local xDai node (Updated for London hardfork)

Great guide! You use this to avoid problems with public RPC’s, as I see… May I ask, what do you think are the drawbacks for running the node on your own machine?

Thanks guys :slightly_smiling_face:

@FriedRengi The main drawback of running it on your own machine is that the chain state needs resyncing after, for example, system hibernation. The RPC will still work, but it will only show the last synced state.

3 Likes

Thank you very much for the answer!

Thank you very much!!!

You Gem of an individual!

Thanks a lot for this!!! :honey_pot: :honey_pot: :honey_pot:

1 Like

One drawback to consider is your broadcasting the IP address of your box, with an open port, to the world. Before hackers can empty wallets, etc, they have to find them, thus any blockchain node is a high probability target.

If your using a machine at home with other stuff on the drives, make sure to do backups off the machine. If a box gets rootkited, etc, its too late for backups before wiping the disks.

7 Likes

WOW! what useful thread!!! this info is literally a gold mine, muchas gracias :100::raised_hands:

As a suggestion, any services like a blockchain client, http server, etc, on a public facing open port, should not be installed on a user account with root/sudo/admin privileges, like in the tutorial screen shot. Any successful privilege escalation exploit, script kiddie 101, results in the hacker getting root. Game over.

Create a new user account with no admin privileges & matching user group:

$ sudo useradd -m -s /bin/bash xdai
$ sudo groupadd xdai

Restrict read/write/execute permissions to the non-privileged user account(change folder paths to suit):

$ sudo chown -R xdai:xdai /opt/xdai_node
$ sudo chmod -R 750 /opt/xdai_node

Login to non-privileged account:
$ su - xdai

cd to client folder & start client:
$ ./openethereum

Now any privilege escalation, is in theory, restricted to the user with no admin/sudo power & only has write/execute permissions in the xdai client folder. So now, instead of 101 security issues, you only have 100 :slight_smile:

7 Likes

nice thanks for the guide

Publicly available ports aren’t required for running a simple local node though. I have zero public facing ports open in my network.

5 Likes

Thanks for sharing!!

cool ,I wanna try it

that’s cool,thank your sharing

A nice write up, thanks for sharing.

Might be worth running in a Docker container or small VM in the cloud to keep it online, there could be free tiers that are sufficient.

1 Like

Nodes consume a lot of bandwidth pretty constantly. When I ran an Eth1 node in the cloud I banged into my bandwidth limits pretty quickly.

Think about 1GB an hour of ambient transfer.

2 Likes

good! It help me do the best in xdai network!

OH, thank you for that work!

Thanks for sharing. I only have one computer. It seems unsuitable to be a node.

On the contrary, this is an excellent way to run a node on your personal one. It’s not a validator node after all. Just rememeber to have it sync back up before using it.

@tacotexmex excellent guide, a brother question what benefits does the activation of these nodes have