Node Setup Quick Start (testnet)
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. We will give the script permission to execute in the same command.
curl -O https://raw.githubusercontent.com/tellor-io/layer/refs/heads/main/scripts/setup/initial_config/configure_palmito_linux.sh && chmod +x configure_palmito_linux.shcurl -O https://raw.githubusercontent.com/tellor-io/layer/refs/heads/main/scripts/setup/initial_config/configure_palmito_mac.sh && chmod +x configure_palmito_mac.sh2.1 (optional) Edit the environment variables
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://node-palmito.tellorlayer.com/rpc/
export RPC_NODE_ID=ac7c10dc3de67c4394271c564671eeed4ac6f0e0
export KEYRING_BACKEND="test"
export PEERS="[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656,[email protected]:26656"
export LAYER_HOME="/home/$(logname)/.layer"
export STATE_SYNC_RPC="https://node-palmito.tellorlayer.com/rpc/"
export KEY_NAME="test"
# ...Use your favorite text editor to change these before running the script if desired.
nano configure_palmito_linux.sh # if linux
# --or--
nano configure_palmito_mac.sh # if mac3. Give the script permission to execute, and run it:
./configure_palmito_linux.sh # if linux
# --or--
./configure_palmito_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 6 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 12-24 hours to finish.
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

