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.10.0/geth-linux-amd64chmod+x $HOME/gethsudomv $HOME/geth $(whichgeth)cd $HOMErm-rfstorygitclonehttps://github.com/piplabs/storycdstorygitcheckoutv0.12.1gobuild-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="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 indexersed-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-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 8546
RestartSec=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: