Original Author: @Thaseus
A guide to running more than one Arweave node on the same server
When using Arweave for a single function such as packing or mining, the setup is straightforward: a single node performs a single function with the available resources. However, what if you have additional capacity on your server and wish to perform more tasks? For instance, you may want to mine storage modules while also syncing/packing the tip partition that isn't yet minable. Another use is to have your exit node/VDF forwarder separate from your miner node on the same server. While this setup is not mandatory, it provides the flexibility to segregate your miner node from your exit node on the same server if desired.
The primary consideration when running more than one node on a single server is the finite nature of your resources. For instance, if you are mining 16 partitions and have 50% CPU capacity remaining, you can allocate resources to pack the tip partition or other partitions that are not yet packed. However, it is crucial to adjust the packing speed to ensure that your CPU does not reach peak capacity, which could negatively impact your mining performance.
- Give each node a unique Erlang Node Name
- For each node copy the
./arweave/bin/arweave.env
file - Change
export NODE_NAME='[email protected]'
to a unique name, for exampleexport NODE_NAME='[email protected]'
- For each node copy the
- Have each node load its own
arweave.env
file- For each node copy the
./arweave/bin/start
and./arweave/bin/stop
files - Have each script source the appropriate
arweave.env
file, for examplesource $SCRIPT_DIR/arweave2.env
- For each node copy the
- Update your start command flags as necessary (e.g. to have each node use a different port)