Introduction
Using the babylonnode CLI tool, you can install dependencies, configure your node installation, and then install and start up your node.
The CLI supports running the node either using Docker or via systemd. However, we recommend Docker as the more straightforward and easy-to-maintain method.
Each step specifies the commands for each mode - you should only run the commands for the mode of your choice (e.g. only those for the “Docker mode”), not both.
1. Install the babylonnode CLI
If you haven’t done so already, install the babylonnode CLI.
2. Install the dependencies on the host machine
This is required only to be run during first time setup on a new host machine. This is done through one simple call of the babylonnode CLI script.
Docker mode
babylonnode docker dependenciesOnce the process has completed, you will be asked to log out of your ssh session and log back in.
systemd mode
babylonnode systemd dependenciesThe script will install the software necessary for systemd mode. You’ll be asked to create a password for the radixdlt user (that’s the default user that the node process runs under).
Once you have entered and confirmed the password, you will be presented with a series of instructions to enable the radixdlt user to execute commands without the need for user intervention.
Execute following commands so that the radixdlt user can use sudo commands without needing you to enter a password:
$ sudo su
$ echo "radixdlt ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/radixdlt
$ exit3. Install the node
3.1. Create the config file
The CLI uses a two-phase config / install setup. First, you are lead through an interactive prompt to create a config.yaml file, which by default is stored at ~/babylon-node-config/config.yaml. This config file serves as a base for an actual node configuration, which is generated by babylonnode. It is also used for future upgrades, to avoid having to remember your settings later.
Record the password safely
A keystore file is created during the config command, and the password that was entered is written to the generated
config.yamlfile. If you wish, you can delete the line containingkeystore_password, but ensure you store the keystore password value safely, as it will be required in a later step.
Back up your keystore
The keystore file contains a randomly-generated private key that determines your node’s identity for peer to peer communications, and can allow it to act as a validator, if a validator entity’s public key is set to your node’s.
We recommend that you securely back up your key file as soon as you’ve generated it, and carefully protect it.
Docker mode
The config command has two modes for node setup.
If you are running a node for the first time, we recommend using the CORE mode. If you are already running an existing node using docker, you will need to use the DETAILED mode to migrate the setup, as it allows you to create a config file based on the answers that you have from existing setup.
CORE - This is a quick config mode to create a config file with simple defaults to run a non-validator full node.
babylonnode docker config -m COREDETAILED - This is a detailed config mode, where the user is asked all necessary questions based on the answers replied.
babylonnode docker config -m DETAILEDThe config file is created from the input. It will be used during the installation command. At default you can find it at ~/babylon-node-config/config.yaml.
systemd mode
First, log in as radixdlt
sudo su - radixdlt
cd /home/radixdltCORE - This is a quick config mode to create a config file with simple defaults to run a non-valiator full node.
babylonnode systemd config -m COREThe config file is created from the input. It will be used during the installation command. At default you can find it at ~/babylon-node-config/config.yaml.
Mainnet Seed Nodes
radix://node_rdx1qf2x63qx4jdaxj83kkw2yytehvvmu6r2xll5gcp6c9rancmrfsgfw0vnc65@babylon-mainnet-eu-west-1-node0.radixdlt.com,radix://node_rdx1qgxn3eeldj33kd98ha6wkjgk4k77z6xm0dv7mwnrkefknjcqsvhuu4gc609@babylon-mainnet-ap-southeast-2-node0.radixdlt.com,radix://node_rdx1qwrrnhzfu99fg3yqgk3ut9vev2pdssv7hxhff80msjmmcj968487uugc0t2@babylon-mainnet-ap-south-1-node0.radixdlt.com,radix://node_rdx1q0gnmwv0fmcp7ecq0znff7yzrt7ggwrp47sa9pssgyvrnl75tvxmvj78u7t@babylon-mainnet-us-east-1-node0.radixdlt.comStokenet Seed Nodes
radix://node_tdx_2_1qv89yg0la2jt429vqp8sxtpg95hj637gards67gpgqy2vuvwe4s5ss0va2y@babylon-stokenet-ap-south-1-node0.radixdlt.com,radix://node_tdx_2_1qvtd9ffdhxyg7meqggr2ezsdfgjre5aqs6jwk5amdhjg86xhurgn5c79t9t@babylon-stokenet-ap-southeast-2-node0.radixdlt.com,radix://node_tdx_2_1qwfh2nn0zx8cut5fqfz6n7pau2f7vdyl89mypldnn4fwlhaeg2tvunp8s8h@babylon-stokenet-eu-west-1-node0.radixdlt.com,radix://node_tdx_2_1qwz237kqdpct5l3yjhmna66uxja2ymrf3x6hh528ng3gtvnwndtn5rsrad4@babylon-stokenet-us-east-1-node1.radixdlt.com3.2. Install and setup the node
Run the following command and pay close attention to parameters:
Docker mode
babylonnode docker install
Optional - Use parameter
-f <path to config.yaml>if the config file is different from the/home/ubunu/babylon-node-config/config.yaml.Optional - Use parameter
-aor--autoapproveto run this command without any prompts. It is only recommended for automation purpose.Use parameter
-uor--updateto deploy latest versions of software.
systemd mode
Log in as
radixdltsudo su - radixdltThen ensure that you are in the /home/radixdlt directory:
cd /home/radixdltRun the following command, paying close attention to the parameters
babylonnode systemd install
Optional - The
-ioption is the external IP address of your server.Optional - The
-uflag is optional and is used only if you are upgrading from a previous version of the node. If applied to the command, it will create a backup of the old configuration file and ensure that the node has stopped before applying the changes.Optional - The
-tsetting is the address of a Radix node you can use to join the network (a seed node). Select one from the list of seed nodes.
4. Set passwords for the nginx server
By default there are two separate users configured for accessing the APIs:
admin: for accessing the Core API (/core/*endpoints) and the System API (/system/*endpoints)metrics: for accessing/prometheus/metrics
Execute the following commands to set the passwords for the nginx users:
Docker mode
User
Command to run
admin
babylonnode auth set-admin-password --setupmode DOCKERmetrics
babylonnode auth set-metrics-password --setupmode DOCKERsystemd mode
User
Command to run
admin
babylonnode auth set-admin-password --setupmode SYSTEMDmetrics
babylonnode auth set-metrics-password --setupmode SYSTEMDEnter your password at the prompt
As shown on screen, enter the following commands to set an environment variable for your password (remember to fill in your own password):
echo 'export NGINX_ADMIN_PASSWORD="nginx-password"' >> ~/.bashrc echo 'export NGINX_METRICS_PASSWORD="nginx-password"' >> ~/.bashrcAdd the new environment variable to your session by executing the following command:
source ~/.bashrc
5. Verifying that the node works
After you’ve installed the node using the commands above, it should start automatically. It should start processing the genesis transactions. Depending on your setup mode you can use either docker logs -f ubuntu-core-1 or journalctl -f -u radixdlt-node to view the logs. You should be seeing messages that begin with “Committing data ingestion chunk…” in the output log. This may take up to 30 minutes to fully process, depending on your hardware. Usually it finishes in around 10-15 minutes.
Warning
Don’t terminate (or restart) the node while the genesis transactions are being committed!
If you do so before the whole process is completed you’ll need to wipe the data directory and start from scratch.
After the process completes you should start seeing messages like “lgr_commit{epoch= … }”, which indicate that the node is working correctly (at which point you can safely stop/restart it any time you wish).
At this point you can also query the System API and the Core API.
System API’s health endpoint provides an overall health summary of a node:
babylonnode api system healthThe response should include "status":"SYNCING. All possible statuses have been described in detail here.
You can also inspect the Core API and query the current state of the ledger:
curl -k -u "admin:nginx-password" https://127.0.0.1/core/status/network-status -X POST -H 'Content-Type: application/json' --data '{"network": "mainnet"}' | jqThere’s a current_epoch_round field in the response and both the epoch and round number should be steadily growing as you re-run the query - this indicates that the node is correctly syncing the ledger state.
Congratulations! At this point you’ve got a fully operational Radix node connected to the network.
Note that it might take some time until it’s fully synced up with the latest ledger state. You can check the current epoch using one of the community-run Radix network dashboards on the internet.
7. Stopping your node
This command will shut down a systemd or docker node, and is executed differently depending on which kind of installation you’re running.
Docker mode
babylonnode docker stopOptional parameter -f can be used to point to config.yaml file
systemd mode
babylonnode systemd stopOptional parameter -f can be used to point to config.yaml file
8. Restarting your node
Restart the node using the following command:
Docker mode
babylonnode docker restartOptional parameter -f can be used to point to config.yaml file
systemd mode
babylonnode systemd restartOptional parameter -f can be used to point to config.yaml file
10. Advanced user config
For advanced users, there is an additional file that can be optionally mounted to provide additional configuration to the babylon-node application which will be appended to the configuration when executing the install command. This allows to add configuration that the babylonnode CLI does not natively support.
This file is located by default at ~/babylon-node-config/advanced-user.env-file for Docker and at ~/babylon-node-config/advanceduserconfig for systemd. The file will be picked up when executing install without needing to rerun the config command.
Advanced user config - Docker mode
Additional environment variables can be added by creating the file ~/babylon-node-config/advanced-user.env-file and writing environment variables in the format described here.
A file from a different location can be used during the install command by providing the option -aue or --advanceduserenvs followed with the desired location.
Refer to the default.config substitution file to find out what variables will be converted to which config parameters.
Please note that the file will only be mounted when executing install while the file is present at ~/babylon-node-config/advanced-user.env-file or the provided custom path.
Advanced user config - systemd mode
Additional configurations can be provided by creating a file at ~/babylon-node-config/advanceduserconfig and adding plain configuration to it. This configuration will be appended to the default.config file during templating when executing the install command.
A file from a different location can be used during the install command by providing the option -auc or --advanceduserconfig followed with the desired location.
Refer to the default.config substition file to find out the format and supported variables.
Please note that the file and changes to it will not be added when running start, restart or stop but only when executing the install command while the file at ~/babylon-node-config/advanceduserconfig or the provided custom location is present.
More information on using babylonnode
You can use babylonnode to carry out a variety of administrative tasks.
For a full reference on the commands the babylonnode CLI offers, please see the documentation on the CLI GitHub repository.
If you have any questions or run into problems, you can get support from the Radix team members and our fantastic community on our Discord server.