Is there any benefits for running a node?#
There is no financial incentive to run a node, doing so helps increase the security of the network.
Are nodes visible anywhere?#
Public nodes can be seen on nodespyder. Please note that unless you are running the node on a publicly accessible web-server, your node should be protected by your router.
- To run a public node see this example nginx.conf available.
- Using a remote node is insecure, please use them with caution.
How do I safely shut down?#
curl -X POST "http://127.0.0.1:9053/node/shutdown" -H "api_key: hello"
If you cannot safely shut-down, you can kill the ports.
kill -9 $(lsof -t -i:9053) kill -9 $(lsof -t -i:9030)
Running the node#
To run an Ergo node you need a JDK/JRE version >= 9 installed on your system.
We recommend Oracle Java SE or for Unix-based operating systems, SDKMAN.
curl -s "https://get.sdkman.io" | bash sdk install java 22.214.171.124.1-amzn
The only hardware requirements is ~20GB of space to store the chain, and ~8GB of RAM memory for handling the sync.
The node uses Java so should work across all operating systems. You can even run on a Raspberri Pi.
Note that due to the intensive disk I/O, 4-6GB of ram is recommended with a fast SSD, running with the
-Xmx4Gflag on JVM9/11
Please see the section on swagger
Unless you are running the node on a publicly accessible web-server, your node should be protected by your router.
If you wish to host a public node, there are a few important aspects your wallet and money's safety depends on:
- You should never make the
- Sensitive API methods require a security token, which should never be sent over untrusted channels.
- Access to the Ergo REST API must be restricted to known hosts. In particular, the API must not be accessible from the Internet.
Compiling from source#
Instead of downloading the precompiled Ergo jar, you can clone the repository and compile the jar from the source using the
sbt assembly command.
As a service#
[Unit] Description=ErgoNode Service [Service] User=user #change this to your workspace WorkingDirectory=/mnt/HC_Volume_19304500/ergo #path to executable. #executable is a bash script which calls jar file ExecStart=/mnt/HC_Volume_19304500/run_node.sh SuccessExitStatus=143 TimeoutStopSec=10 Restart=on-failure RestartSec=5 [Install] WantedBy=multi-user.target
echo "#!/bin/sh sudo /usr/bin/java -jar -Xmx4G ergo.jar --mainnet -c ergo.conf" > run_node.sh chmod +x run_node.sh
enable and start the service
sudo systemctl daemon-reload sudo systemctl enable node.service sudo systemctl start node sudo systemctl status node