> For the complete documentation index, see [llms.txt](https://2nh.gitbook.io/testnet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://2nh.gitbook.io/testnet/story.md).

# Story

<figure><img src="/files/jAtJLokabIQ3CwPDGABY" alt=""><figcaption></figcaption></figure>

**System Specs**

| Hardware  | Requirement |
| --------- | ----------- |
| CPU       | 4 Cores     |
| RAM       | 16 GB       |
| Disk      | 500 GB      |
| Bandwidth | 25 MBit/s   |

#### Installation <a href="#installation" id="installation"></a>

Install dependencies, if needed

```
sudo apt update
sudo apt-get update
sudo apt install curl git make jq build-essential gcc unzip wget lz4 aria2 -y
```

Install go, if needed

```
cd $HOME && \
ver="1.22.0" && \
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" && \
sudo rm -rf /usr/local/go && \
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" && \
rm "go$ver.linux-amd64.tar.gz" && \
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> ~/.bash_profile && \
source ~/.bash_profile && \
go version
```

Download Story-Geth binary

```
wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/geth-public/geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
tar -xzvf geth-linux-amd64-0.9.2-ea9f0d2.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
  echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp geth-linux-amd64-0.9.2-ea9f0d2/geth $HOME/go/bin/story-geth
source $HOME/.bash_profile
story-geth version
```

Download Story binary

```
wget https://story-geth-binaries.s3.us-west-1.amazonaws.com/story-public/story-linux-amd64-0.9.11-2a25df1.tar.gz
tar -xzvf story-linux-amd64-0.9.11-2a25df1.tar.gz
[ ! -d "$HOME/go/bin" ] && mkdir -p $HOME/go/bin
if ! grep -q "$HOME/go/bin" $HOME/.bash_profile; then
  echo 'export PATH=$PATH:$HOME/go/bin' >> $HOME/.bash_profile
fi
sudo cp story-linux-amd64-0.9.11-2a25df1/story $HOME/go/bin/story
source $HOME/.bash_profile
story version
```

Init Iliad node

```
story init --network iliad --moniker "Your_moniker_name"
```

**live peers**

```
PEERS="2f372238bf86835e8ad68c0db12351833c40e8ad@story-testnet-peer.itrocket.net:26656,fe5b39d2bd701ed12a953894cc1449d4c5c6d699@135.125.189.91:26656,9ed1e069802812f484faa68a2c6dd61f6bc1be0b@88.99.61.173:26656,a320f8a15892bddd7b5502527e0d11c5b5b9d0e3@69.67.150.107:29931,5ca8af7a122bc4a9a294704a711c7e5e430876ff@38.242.138.228:26656,00c495396dfee53a31476d7619d1cc252b9a47b9@89.58.62.213:26656,ba7a053ab29149aa5ffcdae0248428ce49c53bc0@185.119.116.250:26656,ee5ecaf1364cb3238113ba9a29813c17fab97694@157.173.197.110:26656,a03f525b72ece596b6ea3609b49c676751fafc14@94.141.103.163:26656"
sed -i -e "/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.story/story/config/config.toml
```

Create story-geth service file

```
sudo tee /etc/systemd/system/story-geth.service > /dev/null <<EOF
[Unit]
Description=Story Geth Client
After=network.target

[Service]
User=root
ExecStart=/root/go/bin/story-geth --iliad --syncmode full
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF
```

Create story service file

```
sudo tee /etc/systemd/system/story.service > /dev/null <<EOF
[Unit]
Description=Story Consensus Client
After=network.target

[Service]
User=root
ExecStart=/root/go/bin/story run
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
EOF
```

Reload and start story-geth

```
sudo systemctl daemon-reload && \
sudo systemctl enable story-geth && \
sudo systemctl start story-geth
```

Reload and start story

```
sudo systemctl daemon-reload && \
sudo systemctl enable story && \
sudo systemctl start story
```

Check logs

```
sudo journalctl -u story-geth -f -o cat
sudo journalctl -u story -f -o cat
```

Check sync status

```
curl localhost:26657/status | jq
```

Create validator

Export private key *By default, when you run `story init` a validator key is created for you. To view your validator key, run the following command:*

*In addition, if you want to export the derived EVM private key of your validator into the default data config directory, please run the following:*

```
story validator export --export-evm-key
```

*Note that to participate in consensus, at least 1 IP must be staked (equivalent to `1000000000000000000 wei`)! Faucet link:* [*https://faucet.story.foundation/*](https://faucet.story.foundation/)

```
story validator create --stake 1000000000000000000 --private-key "your_private_key"
```

Validator Staking

```
story validator stake \
   --validator-pubkey "VALIDATOR_PUB_KEY_IN_BASE64" \
   --stake 1000000000000000000 \
   --private-key xxxxxxxxxxxxxx
```

Replace `VALIDATOR_PUB_KEY_IN_BASE64`

Amount: `1000000000000000000`=1 IP Token

Check your Validator on Explorer: <https://testnet.story.explorers.guru/>

#### Snapshot <a href="#snap" id="snap"></a>

```
sudo systemctl stop story story-geth
cp $HOME/.story/story/data/priv_validator_state.json $HOME/.story/story/priv_validator_state.json.backup
rm -rf $HOME/.story/story/data $$HOME/.story/geth/iliad/geth/{chaindata,blobpool,nodes}
curl https://server-5.itrocket.net/testnet/story/story_2024-08-30_153938_snap.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.story
mv $HOME/.story/story/priv_validator_state.json.backup $HOME/.story/story/data/priv_validator_state.json
sudo systemctl restart story story-geth && sudo journalctl -u story -f
```
