joystream-node-install.sh 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash
  2. #My public key 5EyRepuyZTM2rjHwbGfjBmjutaR5QTxLULcra2aToigtpxb6
  3. #My node name 1497-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: *"
  7. echo "* https://github.com/Joystream/helpdesk/tree/master/roles/validators *"
  8. echo "****************************************************************************"
  9. cd
  10. wget -q https://github.com/Joystream/joystream/releases/download/v9.3.0/joystream-node-5.1.0-9d9e77751-x86_64-linux-gnu.tar.gz
  11. tar -vxf joystream-node-5.1.0-9d9e77751-x86_64-linux-gnu.tar.gz
  12. wget -q https://github.com/Joystream/joystream/releases/download/v9.3.0/joy-testnet-5.json
  13. printf "Enter your node name and press [ENTER]: "
  14. read NODENAME
  15. echo "[Unit]
  16. Description=Joystream Node
  17. After=network.target
  18. [Service]
  19. Type=simple
  20. User=$USER
  21. WorkingDirectory=$HOME
  22. ExecStart=$HOME/joystream-node --chain joy-testnet-5.json --pruning archive --validator --name $NODENAME --log runtime,txpool,transaction-pool,trace=sync
  23. Restart=on-failure
  24. RestartSec=3
  25. LimitNOFILE=10000
  26. [Install]
  27. WantedBy=multi-user.target" > joystream-node.service
  28. sudo mv joystream-node.service /etc/systemd/system/joystream-node.service
  29. sudo systemctl daemon-reload
  30. sudo systemctl start joystream-node
  31. sudo systemctl enable joystream-node
  32. echo "${GREEN}===============\nYour node is fully installed and running.\nNow go to the site (https://telemetry.joystream.org/#/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"