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.
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 sourcesudoaptupdatesudoaptinstall-ylz4jqmakegitgccbuild-essentialcurlchronyunzipgzipsnapdtmuxbc# Install Gosudorm-rf/usr/local/gocurl-Lhttps://go.dev/dl/go1.21.6.linux-amd64.tar.gz|sudotar-xzf--C/usr/localecho'export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin'>> $HOME/.bash_profilesource.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 repositorycd $HOMEwget-Ogethhttps://github.com/piplabs/story-geth/releases/download/v0.11.0/geth-linux-amd64chmod+x $HOME/gethsudomv $HOME/geth $(whichgeth)cd $HOMErm-rfstorygitclonehttps://github.com/piplabs/storycdstorygitcheckoutv0.13.0gobuild-ostory./clientsudomv~/story/story~/go/bin/# Initialize the nodestoryinit--moniker"$MONIKER"--networkodyssey# Download genesis and addrbook filescurl-Lshttps://snapshots-testnet.unitynodes.com/story-testnet/genesis.json> $HOME/.story/config/genesis.jsoncurl-Lshttps://snapshots-testnet.unitynodes.com/story-testnet/addrbook.json> $HOME/.story/config/addrbook.json#PeersPEERS="5c67635523b37d01f8466a9d8509e75ab0c1208c@152.53.108.188:26656,2af28ef38cb05d4f6d87ba085ccbc3bebbb43271@185.215.167.181:26656,6a1b35d7c8deae3f6b0588855300af1dfa8ebd17@49.12.172.31:13656,16b98ab14c106c6dbb26d21beb6b77b6e611fe32@135.181.212.253:2010,54a2735f0a96a3a6eec089652c1aa8f899d5769a@195.7.5.165:26656,b8ad3364924728ef0f434102d3f7803fb18c6f90@37.60.236.104:656,7c6a76119716ed6c0c98c8fe13a77e137e6a961a@37.60.246.162:26656,c238dc3f4cc3a298af3c63a5feadc6bb47684a61@100.42.183.110:656,979c7af4049e4bfb592734afb55050ba039cbaa7@141.95.97.1:26656,53a782f8358dfbb8a06e103a2eb949c9f027aca0@144.76.112.58:14656,363b71824f52093037d2b1de69fcb5cebf5d3058@37.60.234.0:656,6e3423d9a8128645d5cad9165e26fa2eac66d150@93.190.138.116:26656,28cd96eed349e843ea015392ca565fd052b7cf9a@84.247.140.178:656,fa294c4091379f84d0fc4a27e6163c956fc08e73@65.108.103.184:26656,45e497fdcdf954567c0ff0f220291cb0221236f0@77.237.234.158:26656,5eae68a6accfb78f0f3539d2922b5a68df16263f@65.109.156.123:14656,2806b03d75965227a818a38d59aba1cf62b2f634@37.60.236.178:656,7140598b3ad132261ccbfd1af679284c49035e13@195.26.241.251:26656,17334e0738463a9eac3466147283bf0637208cdb@37.60.234.243:656,ae51a59fdd1addf65bdcb47358da15f684435955@49.12.130.151:26656,8d932e886e4c5c9aac108758df228f01dd1f7ea5@148.72.138.188:26656,bbac56eacc65a4c7db8ae3199d2191c669fe508a@159.69.138.81:56656,75ac7b193e93e928d6c83c273397517cb60603c0@3.142.16.95:26656,8e6fce342f605ffe551cf8d76ca25c51b40a3bc8@141.94.155.97:26656,524cf2b9594cd6cf9d7b419a1cd02b0235fcadd6@84.247.165.71:656,5f3d13f7d0196073ddd229d10369a5e7fed99559@45.159.222.124:26656,6d073296c753eb17cedff590501fbf34d1d399f8@185.187.170.235:26656,89f06acb78296b3abcde19c31a5be31e688a60d0@100.42.183.228:656,01c3ad391364738fc45ecdb9fc6cd1f7b59f3251@38.242.218.19:26656"
sed-i-e"/^\[p2p\]/,/^\[/{s/^[[:space:]]*persistent_peers *=.*/persistent_peers = \"$PEERS\"/}" $HOME/.story/story/config/config.toml#Disable indexersed-i-e"s/^indexer *=.*/indexer = \"null\"/" $HOME/.story/story/config/config.toml# Download latest chain data snapshot(Story+Geth)curlhttps://snapshots-testnet.unitynodes.com/story-testnet/story-testnet-latest.tar.lz4|lz4-dc-|tar-xf--C $HOME/.story# Create a service story-gethsudotee/etc/systemd/system/story-geth.service>/dev/null<<EOF[Unit]Description=Story Geth daemonAfter=network-online.target[Service]User=$USERExecStart=$HOME/go/bin/story-geth --odyssey --syncmode full --http --http.api eth,net,web3,engine --http.vhosts '*' --http.addr 0.0.0.0 --http.port 8545 --ws --ws.api eth,web3,net,txpool --ws.addr 0.0.0.0 --ws.port 8546RestartSec=3LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF# Create a service story servicesudotee/etc/systemd/system/story.service>/dev/null<<EOF[Unit]Description=Story ServiceAfter=network.target[Service]User=$USERWorkingDirectory=$HOME/.story/storyExecStart=$(which story) runRestart=on-failureRestartSec=5LimitNOFILE=65535[Install]WantedBy=multi-user.targetEOF# Start the service and check the logssudosystemctldaemon-reloadsudosystemctlenablestorystory-gethsudosystemctlrestartstorystory-geth
📌Step 3: Node Health Check
Follow the commands to check if your node is working properly
Blocks left - 0-1 everything is fine and your node catches up with the last block of the network.
Check logs story service
sudojournalctl-ustory.service-f-ocat
If your node is installed and fully synchronized with the network, proceed with the creation of the validator.
Check logs story-geth
sudojournalctl-ustory-geth.service-f-ocat
For any questions you may have during installation, please contact our chat team or other project validators.
[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"
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: explorerIn the Active / Inactive lists.
📌Step 4: Backup
If you have successfully created a validator, be sure to save your validator.
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: