Node Setup Quick Start
Use the guided setup shell scripts!
1. Install Prerequisites:
jq, yq, sed, curl, wget, make, and Go are required for running the various commands and config scripts and commands in this guide:
jq:sudo apt install jqsed:sudo apt install sedcurl:sudo apt install curlwget:sudo apt install wget
jq, yq, sed, curl, wget, make, and Go are required for running the various commands and config scripts and commands in this guide:
jq:brew install jqsed:brew install sedwget: brew install wget
Download the latest binary:
mkdir -p ~/layer/binaries && cd ~/layer/binaries && mkdir v5.1.2 && cd v5.1.2 && wget https://github.com/tellor-io/layer/releases/download/v5.1.2/layer_Linux_x86_64.tar.gz && tar -xvzf layer_Linux_x86_64.tar.gzmkdir -p ~/layer/binaries && cd ~/layer/binaries && mkdir v5.1.2 && cd v5.1.2 && wget https://github.com/tellor-io/layer/releases/download/v5.1.2/layer_Darwin_arm64.tar.gz && tar -xvzf layer_Darwin_arm64.tar.gz2. Download the script that matches your system:
Additional info about the scripts can be found here.
curl -O https://raw.githubusercontent.com/tellor-io/layer/refs/heads/main/scripts/setup/initial_config/configure_mainnet_linux.sh && chmod +x configure_mainnet_linux.shcurl -O https://raw.githubusercontent.com/tellor-io/layer/refs/heads/main/scripts/setup/initial_config/configure_mainnet_mac.sh && chmod +x configure_mainnet_mac.sh2.1. Edit the environment variables (optional)
If you'd like to use a custom home directory, custom peers or RPCs you can configure those at the top of the script. The defaults are:
# ...
export LAYER_NODE_URL=https://mainnet.tellorlayer.com/rpc/
export RPC_NODE_ID=cbb94e01df344fdfdee1fdf2f9bb481712e7ef8d
export KEYRING_BACKEND="test"
export PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656"
export LAYER_HOME="/home/$(logname)/.layer"
export STATE_SYNC_RPC="https://mainnet.tellorlayer.com/rpc/"
export KEY_NAME="test"
# ...Use your favorite text editor to change these before running the script if desired.
nano configure_mainnet_linux.sh # if linux
# --or--
nano configure_mainnet_mac.sh # if mac3. Give the script permission to execute, and run it:
./configure_mainnet_linux.sh # if linux
# --or--
./configure_mainnet_mac.sh # if macThe script should greet you and begin the guided setup!

Options:
Snapshot sync: Download a snapshot from a server, extract it into your data folder, and start the node. The node will need time to catch up downloading blocks. At the time of writing this takes about 3 hours to complete.
State sync: Sync up to the network using snapshots from peers and a good RPC. At the time of writing this takes about 9 hours to complete.
If you want to sync from a snapshot, be sure to select option 2 when asked if you want to set up a state sync, and option 2 again when asked if you want to start the node:

Visit http://layer-node.com and use the example commands shown there to download and extract the latest snapshot.
Move the chain data into your ~/.layer folder:
#
mv -f .layer_snapshot/data/application.db ~/.layer/data/application.db
mv -f .layer_snapshot/data/blockstore.db ~/.layer/data/blockstore.db
mv -f .layer_snapshot/data/cs.wal ~/.layer/data/cs.wal
mv -f .layer_snapshot/data/evidence.db ~/.layer/data/evidence.db
mv -f .layer_snapshot/data/snapshots ~/.layer/data/snapshots
mv -f .layer_snapshot/data/state.db ~/.layer/data/state.db
mv -f .layer_snapshot/data/tx_index.db ~/.layer/data/tx_index.db
rm -rf .layer_snapshot/Start the node!
./layerd start --home ~/.layer --keyring-backend test --key-name KEYNAME --api.enable --api.swaggerTo perform a state sync, simply choose option 1 when prompted, and option 1 again when asked if you want to start the node:

Start the node!
./layerd start --home ~/.layer --keyring-backend test --key-name KEYNAME --api.enable --api.swaggerLast updated

