How To: Connect Nodes Over LAN
Last updated
Last updated
Difficulty Level: Professional
If you have a mining farm or any setup that require multiple nodes to be ran, you can optimise connection speeds and efficiency by synchronising your nodes over LAN. The concept is simple:
You will first connect to the network and sync your master node; you will use your master node to synchronise all your other machines.
First, start your master node, connect and sync to the network. For more instructions on how to deploy your node, you can check the tutorial below.
Once running, access your node via the JS Console using the terminal:
Once in, use the command below to display your node information:
You should see a screen similar to this, and the red marking indicates where you will be able to identify your master node's enode
address:
Copy your enode
address and save it somewhere for later usage, replacing the 127.0.0.1
with your actual LAN IP address, for example 192.168.100.33
.
Make sure your master node's port 30337 is open for inbound and outbout connections, otherwise, other nodes won't be able to connect to it.
Access your node configuration file (for example, inside /config/mainnet.config
if you're on the mainnet), and add your master node's enode address to the list of static nodes:
Make sure you follow the same syntax as the other static nodes, making sure your enode address is wrapped in "
and that you add a comma ,
at the end.
Making sure that your additional nodes have the new configuration file inside their /config
folder, you can just start them normally, and they should use your LAN master node to sync to the network.
A checklist for everything to work:
Port 30337
needs to be open in all nodes.
You must replace 127.0.0.1
with your actual IP address.
You must ensure that all nodes have the updated config
file.