Starting a Full Node
How to Run an Onomy Full Node
Minimum system requirements:
Any modern Linux distribution
8 Core CPU (16+ Preferred)
32 GB of RAM (64+ Preferred)
500 GB of NVMe Gen 4+ storage
Make sure you have gone through Installation Steps prior to setting up a node.
There are a couple of ways to initialize and start a full node
Method 1: Initialize and start a full node using scripts (Recommended)
Method 2: Initialize and start a full node manually
Method 1: Initialize and start a full node using scripts
First, create the
.onomy/scripts
directory and cd into the newly created scripts folder.
Download scripts from GitHub using the commands below:
Add executable permissions to the scripts using
chmod +x *
Download the genesis file found on GitHub using the following command:
Start the initialization process with the following command:
bash init-full-node.sh
This script will ask you for the following...
Node Name [Text]: A name for your full node
Seed IPs [Comma separated list of IPs]: IP Addresses of seed nodes, There are a couple of IPs pre-configured, If you want to point your node to custom Seed node, you can do that here
Your IP Address [IP Address]
After the script is done, you will find node-id
in the output. Make sure to take a note of the node id as you might need it afterwards. If you forgot to save your node id, you can find it using onomyd tendermint show-node-id
in future.
Optionally allow CORS using the command
bash allow-cors.sh
Increase ulimit to > 65535 with the command
ulimit -n 65536
Recommended: Use StateSync to quickly sync with the blockchain. Download the
init-statesync.sh
script using:
Then, enter bash init-statesync.sh
It is recommended to run the node as a background service, enabling you to enter commands and utilize your terminal while the node operates. To do this, download the add-service.sh script.
Then, give it executable permissions with chmod +x add-service.sh
.
Next, run it from sudo user with
sudo ./add-service.sh onomyd ${PWD}/start-onomyd.sh
Change the
User
from root to your username if needed. First, enter the commandsudo vim /etc/systemd/system/onomyd.service
then pressi
to enter insert mode. Navigate toUser=root
and changeroot
to your own username (the one you use to log in to the terminal).Save and Exit by pressing
Esc
to exit insert mode. Then, type:wq
and pressEnter
to write the changes to the file and quitvim
.Reload systemd: After making changes to the service file, reload the systemd configuration to apply them:
Run
sudo ./add-service.sh onomyd ${PWD}/start-onomyd.sh
You may view the node log with the command
journalctl -f -u onomyd --output cat
and exit the log mode using ctrl+c.To quickly view the status of the node with details such as the latest block height it is synced to, use the command
onomyd status 2>&1 | jq
Success! Your node should be running. When you first start the node, give it enough time to sync with the blockchain. Once synced up, proceed to setting up your validator!
Method 2: Initialize and start a full node manually
Initialize onomy node and config files
onomyd init <node name> --chain-id onomy-mainnet-1
Copy Genesis file from onomy repo
If Onomy Github repository was downloaded in previous step, copy genesis file from the repo
cp onomy/genesis/genesis-mainnet-1.json $HOME/.onomy/config/genesis.json
Otherwise, download genesis file using wget
Change config to add various details
Setup state-sync (Optional)
We can setup state-sync to quickly sync up the node
These are the IP addresses for state sync nodes: 52.70.182.125, 44.195.221.88
Open one RPC endpoint of one of the state-sync nodes to get the details of latest block
Get latest block height from result.block.header.height parameter and latest block hast from result.block_id.hash parameter
Change the following parameters in config.toml file
Start the node
Increase open file limit to more than 65535
ulimit –n 65536
Start onomyd
onomyd start
If you are using cosmovisor then start cosmovisor
cosmovisor start
Check the status of the Onomy chain
You should be good to go! You can check the status of the Onomy chain by running:
Your node is fully synced when catching_up
is false.
You can also open the http://localhost:26657
in your browser and check available end-points
Note for cloud/server hosted versions of Ubuntu
Ensure you are using GLIBC 2.34 or higher, which typically comes with Ubuntu 22.04 LTS. To upgrade Ubuntu to the next available release, you can use the do-release-upgrade
tool. However, this tool is only recommended for server editions without a GUI. If you're running a desktop version, the update manager should prompt you to upgrade when a new release is available.
Prepare for the Upgrade:
Backup your important files and data.
Update all your currently installed packages with:
sudo apt-get update && sudo apt-get upgrade
Upgrade Ubuntu:
Install the
update-manager-core
package if it is not already installed:
sudo apt-get install update-manager-core
Start the upgrade process:
sudo do-release-upgrade
Follow the on-screen instructions to complete the upgrade process. After completion and restarting your server, you may check the version with ldd --version
to ensure you are up-to-date.
Last updated