# Node-Install Instructions for Exchanges and Developers on how to run a KalyChain node. Developers please see Server Setup before proceding. # Install OpenJDK-17 Dependency 'sudo apt install openjdk-17-jre-headless -y' # Download The Binary 'wget https://github.com/KalyCoinProject/kalychain/releases/download/22.10.3/kaly-22.10.3.zip sudo apt install unzip -y && unzip kaly-22.10.3.zip sudo mv kaly-22.10.3 kaly && rm kaly-22.10.3.zip' # Download The Genesis File Clone this repo 'git clone https://git.cipherlabs.org/KalyChain/Node-Install' Make a Data Directory 'mkdir node && mkdir node/data' *Note In this example the node/data directories are where the blockchain and genesis file will be stored. You can choose to store these files in other locations based on your setup. If you change the location of these files then you will need to update the paths when starting the node. Copy the genesis file to the new node directory *do not use sudo, for testnet replace genesis.json with genesis_Testnet.json 'cp Node-Install/genesis/genesis.json node/genesis.json' # Start KalyChain Mainnet This repo cantains a bash script that will *Create a KalyChain systemd Service File *Start the KalyChain systemd Service *Enable KalyChain to start on system start After cloning this repo edit 'node/../kaly/bin/besu --data-path=data --genesis-file=./genesis.json' on line 17 of 'start_node.sh' if you have change the paths to the binary, data file or genesis locations. The make the file exicutable with 'chmod +x start_node.sh' Run this command to exicute the script and start the node. './start_node.sh' Verify the node is running with 'sudo systemctl status kaly.service' If you do not wish to stup a systemd service for KalyChain use this command to start the node '../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.193:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.209:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-ws-host=0.0.0.0 --revert-reason-enabled=true' The above comand assumes you want to run an RPC node with WebSockets enabled. The available API options are: ADMIN, DEBUG, EEA, ETH, NET, QBFT, TRACE, TXPOOL, and WEB3. The default is: ETH, NET, WEB3. Update '--rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL' to fit your use case, for example you can remove '--rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL' if you are not using WebSockets in your appliaction. Validators and or nodes who do not wish to provide RPC services can run '../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://bd1782617ae151ba6da627a35a1babc0a40ae127a718cdc13322acb357411f095d56db6141c99d7f8b63b7ce896ffffbadea34a4471bca297c916a94e1d9b818@169.197.143.193:30303 enode://3ea0e690890c824cb39867c9da0e201764ecd2960c2609ecceb40b3e48d374424f791d32d87eaf7430249649b5c45673178454455b22b133458afc5ddf126c3a@169.197.143.209:30303 --p2p-port=30303 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all"' Update '--host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-host=0.0.0.0 --rpc-ws-host=0.0.0.0' accourdingly for your setup. # Start KalyChain In Development or Testnet In development or testnet you can use Tmux Install Tmux sudo apt install tmux Creat Named Tmux Session tmux new -s kaly_chain Start the KalyChain Node cd node Use this command to start the KalyChain Testnet Node '../kaly/bin/besu --data-path=data --genesis-file=./genesis.json --bootnodes=enode://4a8d940d8e2100b04923d0b0a3fb4fb7075e239185593e52d0df7f9549c555b433b3118ca60a4012cde841b451c8b10bb934dd6fdc98e612a18baf13dacbe922@38.91.102.7:30303 enode://efff0692ee2c0cad9e1ddbd6e2c2143577c681827f4424a9ebf0aea315ca690c59a95a8b2de0088e652687f10d28f72b4c1eb5ccaefdf77c2e98984c3786c39d@169.197.143.143:30303 --p2p-port=30303 --rpc-http-enabled=true --rpc-http-api=ETH,NET,WEB3,TRACE,TXPOOL --rpc-ws-enabled=true --rpc-ws-api=ETH,NET,WEB3,TRACE,TXPOOL --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-ws-host=0.0.0.0 --revert-reason-enabled=true' You should now see the besu clinet start and connect to the KalyChain Blockchain. While running in the tmux window you can safely logout of your server and the besu clinet will continue to run. To bring up the Kalychain window again run this command 'tmux attach-session -t kaly_chain' See [Getting started with Tmux](https://linuxize.com/post/getting-started-with-tmux/) for more tmux command options.