⚙️Installation

🛠️ Hardware Requirements

Node TypeCPURAMStorage

Full (Recommended)

4 CPU

8GB

400 GB

Additional requirements

Chain IDValueVersion tagBinary NameBinary Home

iliad

Story-Geth

v0.9.4

story-geth

$HOME/.story

iliad

Story binary

v0.11.0

story

$HOME/.story

⏱️ Installation time: ~10-30 minutes

The installation time depends on many factors, such as your skills, resources and characteristics of your server, the most important: disk speed, internet connection, server load CPU, RAM, so this value may differ from the one indicated by us.

⚡ Automatic installation

bash <(curl -s https://raw.githubusercontent.com/UnityNodes/scripts/refs/heads/main/story/install-story-testnet.sh)

With the help of a one-line script, all the necessary commands will be executed automatically, you only need to check the operation of your node at the end

📝 Manual installation

📌Step 1: Installation packeges and dependencies

# Install dependencies for building from source
sudo apt update
sudo apt install -y lz4 jq make git gcc build-essential curl chrony unzip gzip snapd tmux bc

# Install Go
sudo rm -rf /usr/local/go
curl -L https://go.dev/dl/go1.21.6.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin' >> $HOME/.bash_profile
source .bash_profile

📌Step 2: Set moniker and install node

Give your validator a name by which you can find yourself in explorer, put it in ""

MONIKER=""

After that, insert the following node installation command

# Clone project repository
cd $HOME
wget -O geth https://github.com/piplabs/story-geth/releases/download/v0.9.4/geth-linux-amd64
chmod +x $HOME/geth
sudo mv $HOME/geth $(which geth)

cd $HOME
rm -rf story
git clone https://github.com/piplabs/story
cd story
git checkout v0.11.0
go build -o story ./client
sudo mv ~/story/story ~/go/bin/

# Initialize the node
story init --moniker "$MONIKER" --network iliad

# Download genesis and addrbook files
curl -Ls https://snapshots-testnet.unitynodes.com/story-testnet/genesis.json > $HOME/.story/config/genesis.json
curl -Ls https://snapshots-testnet.unitynodes.com/story-testnet/addrbook.json > $HOME/.story/config/addrbook.json

#Peers
PEERS="343507f6105c8ebced67765e6d5bf54bc2117371@38.242.234.33:26656,de6a4d04aab4e22abea41d3a4cf03f3261422da7@65.109.26.242:25556,7844c54e061b42b9ed629b82f800f2a0055b806d@37.27.131.251:26656,1d3a0e76b5cdf550e8a0351c9c8cd9b5285be8a2@77.237.241.33:26656,f1ec81f4963e78d06cf54f103cb6ca75e19ea831@217.76.159.104:26656,2027b0adffea21f09d28effa3c09403979b77572@198.178.224.25:26656,118f21ef834f02ab91e3fc3e537110efb4c1c0ac@74.118.140.190:26656,8876a2351818d73c73d97dcf53333e6b7a58c114@3.225.157.207:26656,caf88cbcd0628188999104f5ea6a5eed4a34422c@178.63.184.134:26656,7f72d44f3d448fd44485676795b5cb3b62bf5af0@142.132.135.125:20656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.story/story/config/config.toml
       
#Disable indexer
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.story/story/config/config.toml

# Download latest chain data snapshot(Story+Geth)
curl https://snapshots-testnet.unitynodes.com/story-testnet/story-testnet-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story

# Create a service story-geth
sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which geth) --iliad --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 0.0.0.0 --http.port ${STORY_PORT}545 --authrpc.port ${STORY_PORT}551 --ws --ws.api eth,web3,net,txpool --ws.addr 0.0.0.0 --ws.port ${STORY_PORT}546
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF

# Create a service story service
sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story Service
After=network.target

[Service]
User=$USER
WorkingDirectory=$HOME/.story/story
ExecStart=$(which story) run

Restart=on-failure
RestartSec=5
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF

# Start the service and check the logs
sudo systemctl daemon-reload
sudo systemctl enable story story-geth
sudo systemctl restart story story-geth

📌Step 3: Node Health Check

Follow the commands to check if your node is working properly

  1. Check version

story version
  1. View sync status

while true; do 
  local_height=$(story status | jq -r .sync_info.latest_block_height)
  network_height=$(curl -s https://rpc.story-testnet.unitynodes.com/status | jq -r '.result.sync_info.latest_block_height')
  blocks_left=$((network_height - local_height))

  echo -e "\033[1;33m[Sync Status]\033[0m \033[1;32mNode Height:\033[0m \033[1;37m$local_height\033[0m | \033[1;32mNetwork Height:\033[0m \033[1;37m$network_height\033[0m | \033[1;32mBlocks Left:\033[0m \033[1;31m$blocks_left\033[0m"

  sleep 5
done

Blocks left - 0-1 everything is fine and your node catches up with the last block of the network.

  1. Check logs story service

sudo journalctl -u story.service -f -o cat

If your node is installed and fully synchronized with the network, proceed with the creation of the validator.

  1. Check logs story-geth

sudo journalctl -u story-geth.service -f -o cat

For any questions you may have during installation, please contact our chat team or other project validators.

  1. [OPTIONAL] Change port

If you get an error that the default ports are busy, you can change them with the following command Example this error: ERR failure when running app err="failed to listen on 127.0.0.1:26657: listen tcp 127.0.0.1:26657: bind: address already in use"

#CHANGE PORT
STORY_PORT=33
sed -i.bak -e "s%:26658%:${STORY_PORT}658%g;
s%:26657%:${STORY_PORT}657%g;
s%:26656%:${STORY_PORT}656%g;
s%^external_address = \"\"%external_address = \"$(wget -qO- eth0.me):${STORY_PORT}656\"%;
s%:26660%:${STORY_PORT}660%g" $HOME/.story/story/config/config.toml

📝 Create Validator

📌Step 1: View validator key

story validator export

Export EVM private key

story validator export --export-evm-key

View this private key and make backup

cat $HOME/.story/story/config/private_key.txt

Save your private key

📌Step 2: Request test tokens to your wallet address

  1. Import your wallet to Metamask using your private key

  2. Copy your "EVM" address from the imported wallet

  3. Request tokens in the faucet1 or faucet2 - to this address for further creation of a validator

If the node has synchronized and the tokens have arrived in the wallet, create a validator with the command below.

📌Step 3: Create validator

Create a validator

story validator create --stake 1000000000000000000 --private-key $(cat $HOME/.story/story/config/private_key.txt | grep "PRIVATE_KEY" | awk -F'=' '{print $2}')

After entering the command, you will receive hash transactions, check the status in the explorer if the status is successful - you have created a validator. You can find your validator here: explorer In the Active / Inactive lists.

📌Step 4: Backup

If you have successfully created a validator, be sure to save your validator.

Show priv_validator_key.json

cat $HOME/.story/story/config/priv_validator_key.json

SAVE YOUR PRIVATE KEY AFTER ENTERING THE COMMAND The priv_validator_key.json is the key with which you can always restore the operation of your validator, so keep it and in case of reinstallation/transfer of the validator to another server - transfer it too.

Also remember, if you are a validator with a sufficient number of delegated tokens and you are in an active set, signing blocks, always save priv_validator_state.json - this file contains information about the signed blocks of your validators, and in case of restoring the validator after reinstallation or on another server , this file won't give you the old blocks again, otherwise you'll end up in jail with no way out 💡 Hint:

  • View private key: cat $HOME/.story/story/config/priv_validator_key.json

  • View private state: cat $HOME/story/story/config/priv_validator_key.json

All the useful commands to manage your node in the section - Useful commands

Last updated