> For the complete documentation index, see [llms.txt](https://service.block-pro.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://service.block-pro.net/testnet/story/installation.md).

# Installation

## H**ardware Requirements**

<table><thead><tr><th>Node Type</th><th width="155">CPU</th><th width="160">RAM</th><th>Storage</th></tr></thead><tbody><tr><td>Testnet</td><td>4 Cores</td><td>16+</td><td>240+ GB SSD</td></tr></tbody></table>

## Server preparation

```
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
```

***

## GO 1.22.2

```
ver="1.22.2"
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" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

***

## Build

```
cd $HOME && mkdir -p go/bin/
wget -O geth https://github.com/piplabs/story-geth/releases/download/v0.10.1/geth-linux-amd64
chmod +x geth
mv ~/geth ~/go/bin/geth
git clone https://github.com/piplabs/story
cd $HOME/story
git checkout v0.12.1
go build -o story ./client
sudo mv $HOME/story/story $HOME/go/bin/
mkdir -p ~/.story/story
mkdir -p ~/.story/geth
```

```
story version
```

> **Result**
>
> * **version:** v0.12.1-stable
> * **git commit:** 20fed5e

```
geth version
```

> **Result**
>
> * **version:** 0.10.1-stable
> * **git commit:** b60a3ba8d47e60a6c78ca0570f7dac66e8976d93
> * **git commit date:** 20241025

***

## Initiation

{% hint style="info" %}
Change \<moniker> to your value, moniker is the name of your validator.
{% endhint %}

```
story init --network odyssey --moniker <moniker>
```

***

## Download genesis

```
wget -O $HOME/.story/story/config/genesis.json https://raw.githubusercontent.com/Shoni-O/files/refs/heads/main/testnet-files/story/genesis.json
```

```
sha256sum $HOME/.story/story/config/genesis.json
```

> **Result**
>
> * d332e9082222cc0dd6fe4e9943eafc89b2ce5e118a75ffa01b77e549fdd12587

***

## Download addrbook

```
wget -O $HOME/.story/story/config/addrbook.json https://raw.githubusercontent.com/Shoni-O/files/refs/heads/main/testnet-files/story/addrbook.json
```

***

## Enable prometheus and disable indexing

```
sed -i -e "s/prometheus = false/prometheus = true/" $HOME/.story/story/config/config.toml
sed -i -e "s/^indexer *=.*/indexer = \"null\"/" $HOME/.story/story/config/config.toml
```

## Create geth service file

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

[Service]
User=$USER
ExecStart=$HOME/go/bin/geth --odyssey --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 127.0.0.1 --http.port 8545 --ws --ws.api eth,web3,net,txpool --ws.addr 127.0.0.1 --ws.port 8546
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=$USER
WorkingDirectory=$HOME/.story/story
ExecStart=$HOME/go/bin/story run
Restart=on-failure
RestartSec=3
LimitNOFILE=4096

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

## Start

```
sudo systemctl daemon-reload
sudo systemctl enable story-geth
sudo systemctl enable story
sudo systemctl restart story-geth && sudo journalctl -fu story-geth -o cat
sudo systemctl restart story && sudo journalctl -fu story -o cat
```

## Create validator

{% hint style="info" %}
To create a validator you need to have 1024 tokens.

How to get 1024 tokens?

You need run node, let it synced the network. Then wait the form on 25th and fill it. If you get selected, you will get enough for creating/registering your validator to network Odyssey.
{% endhint %}

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

## Check the node status

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

## Check the sync status

```
curl -s http://localhost:26657/status | jq .result.sync_info
```

## Wallet

```
story validator export
```

## Delete node

```
sudo systemctl stop story-geth story
sudo systemctl disable story-geth story
rm /etc/systemd/system/story-geth.service /etc/systemd/system/story.service
sudo systemctl daemon-reload
cd $HOME
rm -rf .story story
rm -rf $(which story)
rm -rf $(which geth)
```
