start 5ire validator node as normal service systemd
Official documentation here https://docs.5ire.org/docs/system-admin/How-to-setup-a-5ireChain-node , only 2 commands in console. BUT, with each restart - a new container, and, accordingly, full synchronization. You can't really see the logs. Well, other delights of docker
We will run it as a normal service. Further commands, without much text, and so everything is clear
NAME=YOUR_NODE_NAME
IMAGE=5irechain/5ire-thunder-node:0.12
DOCKER_NAME=5ire-thunder-node
BIN=5irechain
BIN_DIR=$HOME/bin
DATA_DIR=$HOME/.5irechain
BACKUP_DIR=$HOME/backup
DAEMON=fired
DESCRIPTION="5irechain validator node"sudo apt update
sudo apt upgrade -y
sudo apt install -y curl jqsudo apt install -y docker.io
sudo usermod -aG docker $USER
newgrp docker
docker --versiondocker pull $IMAGE
docker create --name $DOCKER_NAME $IMAGEmkdir $BIN_DIR $DATA_DIR
docker cp $DOCKER_NAME:5ire/5irechain $BIN_DIR/5irechain
docker cp $DOCKER_NAME:5ire/thunder-chain-spec.json $DATA_DIR/thunder-chain-spec.json
echo "export PATH=$PATH:$BIN_DIR" >> $HOME/.bash_profile$BIN_DIR/$BIN \
--no-telemetry \
--chain $DATA_DIR/thunder-chain-spec.json \
--bootnodes /ip4/3.128.99.18/tcp/30333/p2p/12D3KooWSTawLxMkCoRMyzALFegVwp7YsNVJqh8D2p7pVJDqQLhm \
--pruning archive \
--base-path=$DATA_DIR \
--keystore-path $DATA_DIR/keystore \
--node-key-file $DATA_DIR/secrets/node.key \
--validator \
--name $NAME \
--in-peers 10 --out-peers 10 --in-peers-light 10 --log info \
--prometheus-port 9615 --ws-port 9944 --rpc-port 9933 --port 30333 \
--ws-external --rpc-external --unsafe-rpc-external --rpc-methods=unsafe \
--rpc-cors all
echo "
[Unit]
Description=$DESCRIPTION
After=network.target
[Service]
Type=simple
User=$USER
ExecStart= $(which $BIN) \\
--no-telemetry \\
--chain $DATA_DIR/thunder-chain-spec.json \\
--bootnodes /ip4/3.128.99.18/tcp/30333/p2p/12D3KooWSTawLxMkCoRMyzALFegVwp7YsNVJqh8D2p7pVJDqQLhm \\
--pruning archive \\
--base-path=$DATA_DIR \\
--keystore-path $DATA_DIR/keystore \\
--node-key-file $DATA_DIR/secrets/node.key \\
--validator \\
--name $NAME \\
--in-peers 10 --out-peers 10 --in-peers-light 10 --log info \\
--prometheus-port 9615 --ws-port 9944 --rpc-port 9933 --port 30333 \\
--ws-external --rpc-external --unsafe-rpc-external --rpc-methods=unsafe \\
--rpc-cors all
Restart=always
RestartSec=10
KillSignal=SIGINT
TimeoutStopSec=45
KillMode=mixed
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
" > $DAEMON.servicesudo cp $DAEMON.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable $DAEMON
sudo systemctl restart $DAEMON
journalctl -f -u $DAEMONmkdir $BACKUP_DIR
cp $DATA_DIR/secrets/node.key $BACKUP_DIRsudo ufw allow 30333/tcp
sudo ufw status | grep 30333Run this command on our PC, not on server! Dont forgot replace USER , IP to your values
ssh -p 22 -o ExitOnForwardFailure=yes -o ServerAliveInterval=60 \
-N -L 9944:localhost:9944 <USER>@<SERVER IP>//// I dont use MS Windows, sorry. And I dont know exactly how to do it////
But, you can always use google .
Here, for example, there is such a guide for PowerShell https://woshub.com/ssh-tunnel-port-forward-windows/
Here - for Mobaxterm https://superuser.com/questions/1601631/create-ssh-tunnel-using-mobaxterm-on-windows
Run the following command in the PowerShell console to install the OpenSSH client on Windows 10/11 or Windows Server 2022/2019:
Get-WindowsCapability -Online | ? Name -like 'OpenSSH.Client*'
To create an SSH tunnel with a remote host <SERVER_IP>, run the command:
ssh -L 9944:<SERVER_IP>:9944 <USER>@<SERVER_IP>
he following connection string is used in this example: LOCAL_PORT:DESTINATION_IP:DESTINATION_PORT and USER@DESTINATION_IP (the username and address of the remote SSH server)https://docs.5ire.org/docs/5ireChain-tools/validator-application . Install 5ire Wallet extension for your Chrome browser https://chrome.google.com/webstore/detail/5irechain-wallet/keenhcnmdmjjhincpilijphpiohdppno . Create wallet. Connect the node to the application using this link ws://127.0.0.1:9944 . Create validator inside the app. Add stake to the validator.
cp -R $DATA_DIR/keystore $BACKUP_DIRsee logs without redundant information
journalctl -n 100 -f -u $DAEMON | grep -v \\
-e "✨ Imported" \\
-e "💤 Idle" \\
-e "♻ ️ Reorg"see node id
curl --silent -H "Content-Type: application/json" -d '{"id":1, "jsonrpc":"2.0", "method": "system_localPeerId" }' \
http://localhost:9933 |jq ."result" update docker image
copy new binary && chain