Skip to content

ltraveler/idena-runner

Repository files navigation

IDENA Runner Bash Script - fast idena-go network node deployment with possibility of multiple instances installation: 1 user - 1 idena-go node instance
Idena RUNNER Script

Bash Script implementation of the Idena network node installation wizard.
Install multiple instances of the Idena-Go in a simple and user-friendly way.

idena runner latest version Ubuntu minimum version idena-go latest release license Скрипт Idena Runner

🚀  Running idena_install.sh (requires root privileges)

Please make sure that you have a pure Ubuntu 20.04 installation. To install Idena node using this script, please folow these steps:

  • apt-get install -y git installing git package
  • git clone https://github.com/ltraveler/idena-runner.git clone the repository
  • cd idena-runner
  • chmod +x idena_install.sh to make the script executable
  • ./idena_install.sh to run the script

✅  Features

  • Multiple Idena instances installation: 1 user - 1 instance
  • Import the existing private/node keys during the installation process
  • Automatic updates crontask that can be schedulled during the installation process
  • Uncomplicated Firewall (UFW) configuration and automatic port rules updates during the idena-node instance installaltion
  • Possibility to install idena-go as a shared node with default recommended values

🙋  What the script is doing?

  1. Checking if the idena.service exists;
  2. Creating new user and password to run the Idena node daemon;
  3. Upgrading Ubuntu packages and installing all requiered dependecies;
  4. Downloading idena-go network node based on the version that user have entered. If the input is empty the script is downloading the latest one. The version history is available here;
  5. The script using pre-defined config.json file which can be changed during the installation process;
  6. Installing Idena-go and running it based on the config.json file from the repository;
  7. Changing API and Private keys of the node to the custom ones if the user wants so;
  8. Creating cron job to check for idena-go updates ones once a day. You can specify the frequency during the installation process;
  9. Creating Idena Daemon and running it;
  10. Installing and running firewall based on SSH and IPFS port numbers.

🏛️  In case if you are installing a shared node:

  1. The script will add --profile=shared to the service file;
  2. You can set the most important args: BlockPinThreshold, FlipPinThreshold, AllFlipsLoadingTime
    • Default values:
      • BlockPinThreshold = 0.3
      • FlipPinThreshold = 1
      • AllFlipsLoadingTime = 7200000000000

⚙️  About Idena Daemon

The script is creating a service daemon called idena. Which starts on the boot.

You can use these commands to control it:

  • service idena_$username status- to check the status
  • service idena_$username restart - to restart the service
  • service idena_$username stop - to stop the service
  • service idena_$username start - to start the service

*where $username is required instance username

💻  Command Line Flags and Arguments

Since version 0.3.0 the script could be run in silence mode (aka push installation). All or part of the answers could be sent via flags and relevant arguments in the command line. flags:
-u or --username - username
-p or --password - password in case of using -u without -p the password would be the same as username
-s or --shared - shared node installation
-v or --version - idena-go node client version or latest to download the latest one
-b or --blockpinthreshold - Block Pin Threshold if not set but -f and/or -l have been applied, the script will use the default recommended value [0.3]
-f or --flippinthreshold - Flip Pin Threshold if not set but -b and/or -l have been applied, the script will use the default recommended value [1]
-l or --allflipsloadingtime - All Flips Loading Time if not set but -b and/or -f have been applied, the script will use the default recommended value [7200000000000]
-r or --rpcport - RPC Port aka HTTP Port
-i or --ipfsport - IPFS Port
-k or --privatekey - IDENA Private Key aka nodekey
-a or --apikey - IDENA Node API Key
-d or --updatefreq - Update frequency in CRON expression format

Apart from -s or --shared the rest of the flags need an argument inside '' (apostrophe)

For example:
./idena_install.sh -u 'ratel' -p 'ratel' -s -v 'latest' -b '0.3' -f '1' -l '7200000000000' -r '9189' -i '41283' -k '6e17f7490f7922f3224d41769ce5ed2a01030de69d77163a291a77e8280aad3' -a '33e32cd86ecfb3179e50208428541a1e' -d '0 0 * * *'

✔️  Idena-runner instance update process (requires root privileges)

  1. Backup the private key (/home/idena_instance_username/idena-go/datadir/keystore/nodekey)
  2. Backup the node api.key (/home/idena_instance_username/idena-go/datadir/api.key)
  3. Run the latest version of the idena-runner script and put the same username that you have used to install the instance that you are trying to update. That will overwrite all required files. Attention: all files inside the idena-go folder will be permanently deleted.
  4. service idena_$username stop - to stop the updated instance.
  5. Restore your private and API keys from the backup that you have made on the 1st step.
  6. service idena_$username start - to start the updated instance.

🗑️  Idena-go instance uninstallation process (requires root privileges)

  1. service idena_username stop stopping idena user instance;
  2. pkill -u username killing all processes related to the user;
  3. deluser --remove-home username removing related to idena-go instance user and all his files and folders;
  4. rm /etc/cron.d/idena_update_username removing cron idena-go update related task;
  5. rm /etc/systemd/system/idena_username.service removing idena daemon service related to the instance that we are uninstalling;
  6. systemctl disable idena_username disabling idena daemon service related to the instance that we are uninstalling
  7. systemctl daemon-reload and systemctl reset-failed updating systemctl changes that we have made in the previous step;
  8. ufw show added | grep "IDENA Instance for user $username" | awk '{ gsub("ufw","ufw delete",$0); system($0)}' do not forget to replace $username to the real name of deleted user;
  9. sudo visudo you have to find and delete the line related to the deleted user at the end of the file;
  10. nano /etc/ssh/sshd_config - you have to delete username from DenyUsers group;
  11. sudo sshd -t - to be sure that your latest changes of sshd_config file is correct;
  12. sudo service sshd restart - to restart sshd daemon.

🤝  Idena Donations

  • 0xf041640788910fc89a211cd5bcbf518f4f14d831 - All donations are welcomed and appreciated;

ℹ️  Other information

  • If you are looking for a stable shared node service, please contact me on Telegram @ltrvlr

🗣️  Contact information

  • Email ltraveler@protonmail.com
  • Telegram @ltrvlr

For more detailed information about idena-go client please check the official idena-go github repository.

About

Bash Script implementation of the Idena network node installation wizard with the possibility to install multiple idena-go instances (1 user — 1 instance)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages