Start blockchain node on Ubuntu

Start Node by axmd-install.sh Script

You can start the axm node using the axmd-install.sh automation script. This script performs the following steps:

  • Downloads the latest version of the prebuilt axm-node binaries.

  • Downloads the prebuilt version of cosmovisor.

  • Downloads cosmovisor.service and copies it to /etc/systemd/system/.

  • Initializes the node with the provided name.

  • Sets up the directory structure and initializes node configuration files with recommended values.

  • Downloads the genesis file and places it into $DAEMON_HOME/config/genesis.json.

  • Downloads the latest binary blocks and places them into $DAEMON_HOME/data/.

Download the script from GitHub releases, change its permissions, and run:

curl -L -o axmd-install.sh https://github.com/axiome-pro/axm-node/releases/download/v1.0.3/axmd-install-1.0.3.sh
chmod 755 axmd-install.sh
./axmd-install.sh -m <moniker> -h <daemon-home> -r <enable rest>

Script parameters:

  • -m - moniker name (i.e., your node name).

  • -h - daemon home (where to place daemon config and data files). Also sets the $DAEMON_HOME variable for cosmovisor. Defaults to ~/.axmd/.

  • -r - specify to enable blockchain app legacy REST endpoints.

After running this script, you can check $DAEMON_HOME and correct your config files as needed (for config parameters, look in Cosmos SDK and Comet BFT docs).

Now you can start the node by running the cosmovisor service:

systemctl start cosmovisor 

P.S. You can safely remove $DAEMON_HOME/data/blocks-latest.tar.gz after start.

Start node from scratch

First, you need to obtain binaries using one of two possibilities: get prebuilt binaries from our releases or build binaries from source codes. When binaries are ready, you can start the node using the genesis file (which takes longer), or download binary blocks and start from them.

Get prebuilt binaries

Go to the Releases section of GitHub

Download appropriate file and move to /usr/local/bin

curl -L -o axmd https://github.com/axiome-pro/axm-node/releases/download/v1.0.1/axmd-linux-amd64-1.0.1
chmod 755 axmd
mv axmd /usr/local/bin

Build from sources

Make sure you have Docker installed.

Download this repo and check out v1.0.0 version with

git clone https://github.com/axiome-pro/axm-node.git -b v1.0.1 

Build the application with make

make build-all

Copy a built binary from the builds directory to somewhere your OS could find it (i.e. some directory in a $PATH)

cp build/linux_amd64/axmd /usr/local/bin/axmd

Starting node from genesis file

Initialize your node with

axmd init [moniker] where [moniker] is a name you like.

Replace a just created genesis file ($HOME/.axmd/config/genesis.json by default) with one downloaded from https://github.com/axiome-pro/axm-node/releases/download/v1.0.0/genesis.json

Validate genesis file sha256 checksum (efa132483274106bfbf425db2912218ed3219a6065491d73dc79abeba076be30)

In the node configuration file ($HOME/.axmd/config/config.toml by default) set peers, seeds and consensus parameters:

persitent_peers = ""
seeds = "eaxmple@eaxmple.com"
timeout_propose = "3s"
timeout_propose_delta = "500ms"
timeout_prevote = "1s"
timeout_prevote_delta = "500ms"
timeout_precommit = "1s"
timeout_precommit_delta = "500ms"
timeout_commit = "5s"

Start node with

axmd start

The node will download and replay blocks, it may take a while.

Additional: starting node with binary block data (for faster syncing)

Download latest binary blocks archive from our CDN to empty $HOME/data/ directory and extract it

curl -L -o latest.tar.gz https://axiome.fra1.cdn.digitaloceanspaces.com/blocks/blocks-latest.tar.bz2
tar -xzf latest.tar.gz

then you can run axmd as usual

Blocks for 1.0.3: https://axiome.fra1.cdn.digitaloceanspaces.com/axmd/blocks20240412.tar.gz

Blocks for 1.0.2: https://axiome.fra1.cdn.digitaloceanspaces.com/axmd/blocks20240404.tar.gz

Blocks for 1.0.1: https://axiome.fra1.cdn.digitaloceanspaces.com/blocks/blocks-latest.tar.bz2

Last updated