# Axelar Full Node

By [GLCstaked](https://paragraph.com/@glcstaked) · 2023-09-05

---

**Run a full node for Axelar chain**

Axelar is a cross chain protocol that supports cross chain transfers and messages,

**Hardware Requirements:** Recommended 6-8 cores, 16-32 GB RAM, 1 TB+ drive.

Step 1: Initial Setup
---------------------

**Increase Swap Space** (skip if you have 32GB)

Follow the steps from [here](https://github.com/GLCNI/RPC-node-deployments/blob/main/additional/swap_space.md):

**Update and install Dependencies**

    sudo apt update && sudo apt upgrade -y
    sudo apt install git build-essential ufw curl jq snapd make jq tar clang pkg-config libssl-dev gcc chrony -y
    

**Install Go:**

    wget -q -O - https://git.io/vQhTU | bash -s -- --version 1.20.5
    

_This script is made by osmosis-labs and installs_ `PATH` _variables to_ `.bashrc` _and sets up in a way compatible with the rest of the build. Go binary installs to_ `$HOME/.go` and `$HOME/go/bin`

Run `source $HOME/.bashrc` to take effect, confirm installed with `go version` which should return the version installed

    #to remove installation 
    wget -q -O - https://git.io/vQhTU | bash -s -- --remove
    

Step 2: Install Binary
----------------------

This method will clone Axelar’s core repository and build the binary from source, find Axelar repository and version releases [here](https://github.com/axelarnetwork/axelar-core): (use version tagged latest)

**Clone and build from Axelar Repository**

    git clone https://github.com/axelarnetwork/axelar-core
    cd axelar-core
    git fetch
    git checkout v0.33.3
    make build
    

Move Binary

    sudo mv ./bin/axelard /usr/local/bin/
    

Confirm installed:

    axelard version
    which axelard
    

You should now have a directory \``` .axelar` ``

Step 3: CLI configuration
-------------------------

See Here for more info: [https://docs.axelar.dev/node/config-cli](https://docs.axelar.dev/node/config-cli)

There is no `client.toml` file, create this manually or add the following commands to CLI commands

    --node tcp://localhost:26657 --gas auto --gas-adjustment 1.5 --chain-id mainnet
    

### Keys (optional)

This is not needed for a Full node for RPC provision, however should you wish to manage AXL wallet through your own node

Create New Keystore, add `--recover` to use existing seed

    axelard keys add <WALLET-NAME> --keyring-backend test
    

![This is an example only, make sure to save the seed.](https://storage.googleapis.com/papyrus_images/4ad869507c2145dfa153f38838e20b3237f556149b7eddc926d54319f24e0bcc.png)

This is an example only, make sure to save the seed.

    axelard keys show <WALLET-NAME> -a --keyring-backend test
    

Test Connection to CLI

If you created a `client.toml` this can test you are able to call your own node through `tcp://localhost:26657`, _this will not work until the node is fully synced._

    axelard query bank balances <WALLET ADDRESS>
    

Step 4: Configure Node
----------------------

**Initialize Node:**

    NODE_MONIKER=< enter any node name here >
    axelard init $NODE_MONIKER --chain-id mainnet
    

**Get Genesis**

    cd
    rm .axelar/config/genesis.json
    wget -O $HOME/.axelar/config/genesis.json "https://raw.githubusercontent.com/axelarnetwork/axelarate-community/main/resources/mainnet/genesis.json"
    

NOTE: TO SELF

compare the two files, delete as needed!

**Get Seeds**

    cd
    wget -O $HOME/.axelar/config/seeds.toml "https://raw.githubusercontent.com/axelarnetwork/axelarate-community/main/resources/mainnet/seeds.toml"
    

_NOTE: the genesis and seeds are from an Axelar repository which is older, other sources for these files can be used that may be more recent._

**Open API interfaces**

PENDING

Step 5: Download Chain Data
---------------------------

This install method is using snapshot data, this means downloading the blockchain history directly from a trusted source, many community members host this data, some examples: [bwarelabs.com](http://bwarelabs.com), [quicksync.io](http://quicksync.io), [staketab.com](http://staketab.com)

**Download LZ4**

    sudo apt-get update -y
    sudo apt-get install wget liblz4-tool aria2 -y
    

### Option 1: Use Quicksync

To Use Quicksync, pruning settings are default, nothing needs to change in the `config.toml` or `app.toml`

Remove data folder, backup validator state

    cd
    mkdir -p axelar-backups
    mv .axelar/data/priv_validator_state.json axelar-backups/priv_validator_state.backup
    rm -rf .axelar/data/
    

Get the latest URL

    SNAPSHOT_URL=`curl -L https://quicksync.io/axelar.json|jq -r '.[] |select(.file=="axelar-dojo-1-pruned")|.url'`
    

Extract Snapshot data into data folder

    cd ~/.axelar/
    wget -O - $SNAPSHOT_URL | lz4 -d | tar -xvf -
    
    cd
    mv axelar-backups/priv_validator_state.backup .axelar/data/priv_validator_state.json
    

### Option 2: Use Others

this may vary depending on provider, but this is an example for pruning settings that must be changed to use snapshot, check with the provider for details, the following example is using [bware](https://bwarelabs.com/)

**Change Prunning settings**

In app.toml

    pruning = "custom"
    pruning-keep-recent = "100"
    pruning-keep-every = "0"
    pruning-interval = "10"
    
    [state-sync]
    
    snapshot-interval = 0
    

In config.toml

    ...
    [tx_index]
    indexer = "null"
    

**Get snapshot URL**

    SNAPSHOT_URL=<enter url to download link here>
    

Remove data folder, backup validator state

    mkdir -p axelar-backups
    mv .axelar/data/priv_validator_state.json axelar-backups/priv_validator_state.backup
    rm -rf .axelar/data/
    

**Decompress archive**

    curl -L $SNAPSHOT_URL | tar -Ilz4 -xf - -C $HOME/.axelar
    mv axelar-backups/priv_validator_state.backup .axelar/data/priv_validator_state.json
    

Step 6: Setup node with SystemD
-------------------------------

### Option 1: Setup without Cosmovisor

Create System service to run node as a background service

    sudo tee /etc/systemd/system/axelard.service > /dev/null <<EOF
    [Unit] 
    Description=AXL node 
    After=network.target 
    [Service] 
    Type=simple
    User=$USER
    ExecStart=$(which axelard) start 
    Restart=on-failure
    RestartSec=10
    LimitNOFILE=65535
    [Install]
    WantedBy=multi-user.target
    EOF
    

**Enable and start service**

    sudo systemctl daemon-reload
    sudo systemctl enable axelard
    sudo systemctl start axelard
    

Check Status and logs

    sudo systemctl status axelard
    

    journalctl -u axelard -f
    

Check node Sync status

    curl localhost:26657/status | jq '.result.sync_info'
    

Example queries at the bottom [here](https://docs.axelar.dev/resources/mainnet):

### Option 2: Setup with Cosmovisor

[Cosmovisor](https://docs.cosmos.network/main/tooling/cosmovisor): is a process management tool to handle cosmos based chain upgrades seamlessly, it looks for chain upgrades and downloads & installs at the correct block height.

**Create directories for Cosmovisor**

    cd
    mkdir -p ~/.axelar/cosmovisor/genesis/bin
    mkdir -p ~/.axelar/cosmovisor/upgrades
    

create directory for corresponding binary version (change v0.33.3 accordingly)

    mkdir -p ~/.axelar/cosmovisor/upgrades/v0.33.3/bin
    

**Install Cosmovisor binary**

    go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
    

this should install cosmovisor binary to `$GOPATH/bin/cosmovisor`

**Copy binaries to Cosmovisor**

_Note on versions: if using snapshot (this guide) you are downloading the latest binary, with chain data manually downloaded and placed in the correct location, cosmovisor will look from the block height the node is currently on and the corresponding binary in the upgrades folder.  The binary_ also _needs to be placed in_ `~/.axelar/cosmovisor/genesis/bin` for first start up or an error will occur.

    cp /usr/local/bin/axelard ~/.axelar/cosmovisor/genesis/bin
    cp /usr/local/bin/axelard ~/.axelar/cosmovisor/upgrades/v0.33.3/bin/
    

**Create system service.**

System service to run node as background service through cosmovisor

    sudo tee /etc/systemd/system/cosmovisor.service > /dev/null <<EOF
    [Unit]
    Description=Axelar Daemon (cosmovisor)
    After=network-online.target
    
    [Service]
    User=$USER
    ExecStart=$HOME/go/bin/cosmovisor run start
    Restart=always
    RestartSec=10
    LimitNOFILE=65535
    Environment="DAEMON_NAME=axelard"
    Environment="DAEMON_HOME=$HOME/.axelar"
    Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
    Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
    Environment="DAEMON_LOG_BUFFER_SIZE=512"
    
    [Install]
    WantedBy=multi-user.target
    EOF
    

**Enable and start service.**

    sudo systemctl daemon-reload
    sudo systemctl enable cosmovisor
    sudo systemctl start cosmovisor

---

*Originally published on [GLCstaked](https://paragraph.com/@glcstaked/axelar-full-node)*
