joystream-node-install.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. # My public key 5EyRepuyZTM2rjHwbGfjBmjutaR5QTxLULcra2aToigtpxb6
  3. # My node name wasabi
  4. echo "****************************************************************************"
  5. echo "* This script will install and configure your Joystream node. *"
  6. echo "* The script was created based on the official instructions and the *"
  7. echo "* working community instructions: *"
  8. echo "* https://github.com/Joystream/helpdesk/tree/master/roles/validators *"
  9. echo "* https://seainvestments1.medium.com/b3608a8be10e *"
  10. echo "****************************************************************************"
  11. cd
  12. wget -q https://github.com/Joystream/joystream/releases/download/v9.3.0/joystream-node-5.1.0-9d9e77751-x86_64-linux-gnu.tar.gz
  13. tar -vxf joystream-node-5.1.0-9d9e77751-x86_64-linux-gnu.tar.gz
  14. wget -q https://github.com/Joystream/joystream/releases/download/v9.3.0/joy-testnet-5.json
  15. printf "Enter your node name and press [ENTER]: "
  16. read NODENAME
  17. echo "[Unit]
  18. Description=Joystream Node
  19. After=network.target
  20. [Service]
  21. Type=simple
  22. User=$USER
  23. WorkingDirectory=$HOME
  24. ExecStart=$HOME/joystream-node --chain joy-testnet-5.json --pruning archive --validator --name $NODENAME --log runtime,txpool,transaction-pool,trace=sync
  25. Restart=on-failure
  26. RestartSec=3
  27. LimitNOFILE=10000
  28. [Install]
  29. WantedBy=multi-user.target" > joystream-node.service
  30. sudo mv joystream-node.service /etc/systemd/system/joystream-node.service
  31. sudo systemctl daemon-reload
  32. sudo systemctl start joystream-node
  33. sudo systemctl enable joystream-node
  34. echo -e "${GREEN}===============\nYour node is fully installed and running.\nNow go to the site (https://telemetry.polkadot.io/#list/Joystream) and find your node by the name you gave it.\n\nWait for complete synchronization and proceed to the next step - Validator Setup\n(read - https://github.com/Joystream/helpdesk/tree/master/roles/validators#validator-setup).\n===============\033[0m"