First we need to login as root.
ssh root@SERVER_IP
Adding user kira to our instance.
adduser --disabled-password kira
Making user kira sudoers user.
usermod kira -aG sudo
I suggest proceeding with key access to the user. You need to generate key pairs. If you don't feel like you can proceed furthe -skip it. Proceed to [Kira Manager Installation]
On your workstation(not HOST/Server) create a key pair.
mkdir -p keys && cd keys && mkdir -p kira && cd kira
ssh-keygen -t rsa
#Let's name them kira_key to avoid ambiguity in future
You should choose a destination and a passphrase to continue. After keys are created you need to copy them to your host. We need to make sure that a proper directory exists. On your HOST/Server execute following commands as root:
mkdir -p /home/kira/.ssh/ && cd /home/kira/.ssh/ && touch authorized_keys
Let's set proper permissions for this directory:
chown -R kira:kira /home/kira/.ssh
chmod 700 /home/kira/.ssh
chmod 600 /home/kira/.ssh/authorized_keys
We need to edit the sshd_config file to allow PubkeyAuthentication. To do this execute:
nano /etc/ssh/sshd_config
Find this two parameters:
PubkeyAuthentication yes
PasswordAuthentication no
Uncomment if needed. Set correct values ^^ CTRL + S CTRL + X - to save changes and exit
systemctl restart sshd.service
Now we want to copy the public key from our workstation to our HOST/server. To do so we need to execute following [on workstation]:
scp /home/$USER/keys/kira/kira_key.pub root@SERVER_IP:/home/kira/.ssh/
Let's check if we successfully copy our key. Execute this commands on your HOST/Server as root user
cat /home/kira/.ssh/kira_key.pub >>/home/kira/.ssh/authorized_keys
Now we can test our setup. We will try to connect from our workstation to HOST/Server using new credentials. Following command should be executed on workstation:
ssh -i /home/$USER/keys/kira/kira_key kira@SERVER
Something similar will appear:
Now we settled but login to HOST/Server looks like a pain. What we can to is to configure one more file to make our lives easier.
On the workstation we need to edit file config.
nano /home/$USER/.ssh/config
Add this to your file
Host kira
HostName SERVER_PIBLIC_IP
User kira
Port 22
IdentityFile /home/$USER/keys/kira/kira_key
Now we can login from our workstation to Kira node (HOST/Server) as simple as:
ssh kira
I don't have windows anywhere around. So here I will provide links and main idea. Main goal is to create a key pair. Public key should be copied on your server in /home//.ssh/authorized_keys And putty should have a link to your key while connecting to HOST/Server
Link1: "https://www.ssh.com/academy/ssh/putty/windows/puttygen"
Link2: "https://www.youtube.com/watch?v=-92wEg68SKQ"
Now we are ready to install kira. Log out from every terminal and then log in as kira user.
ssh kira
Now we want to start our installation script.
sudo -s
cd /tmp && read -p "Input branch name: " BRANCH && \
wget https://raw.githubusercontent.com/KiraCore/kira/$BRANCH/workstation/init.sh -O ./i.sh && \
chmod 555 -v ./i.sh && H=$(sha256sum ./i.sh | awk '{ print $1 }') && read -p "Is '$H' a [V]alid SHA256 ?: "$'\n' -n 1 V && \
[ "${V,,}" != "v" ] && echo "INFO: Setup was cancelled by the user." || ./i.sh "$BRANCH"
Script will ask us to enter the branch first.
Type: testnet-5 press Enter and after press V. Installation begins. Next screen will ask us if we accept TERMS and CONDITIONS.
Press any key to continue.
Here we have two options.
You will need to add your key to .secrets directory. Open a new terminal window. Login as kira.
sudo -s
touch /home/kira/.secrets/mnemonics.env && nano /home/kira/.secrets/mnemonics.env
Copy past your keys from backup. CTRL+S CTRL+X to save and exit the editor You are good to proceed!
Press 2. You will be prompted to choose bip39 seed words. From here you can use AUTOGENERATE function or to choose 24 words from here https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt and provide the whitespace-separated.
Here we should choose VALIDATOR MODE by pressing 2 Next step is to join network
Press J to participate in testnet-5
To continue we need to press S.
At this point we need to choose a TRUSTED node from the given list. Please check https://testnet-rpc.kira.network/download/peers.txt Type IP address like this:
Next we need to choose the way of syncing with network. Preferable way is snpashot. Press A to discover the fresh snap.
Setup will ask us about the current block height. Press ENTER.
Confirm configuration of your node one more time. Press A
Let your Kira Manager set up seeds for you. So just press A
Your node will be rebooted. Connection to your host interrupted. Don't worry. Give your host 2-5 minutes to rest.
And we need to connect to user kira again.
ssh kira
or use Putty
On the host machine type:
sudo -s
kira
Installation will ask you if you want to continue.Press V to continue installation. From here it will take some time. So brew some coffee...
Installation is finished. Now you can exit the kira setup. Press CTRL+C. And type
kira
Let KIRA MANAGER and your containers catch up. It may take some time. Be patient.
FINAL. Your Kira Manager should look like this(if you are newcomer):
and if you recovered your keys. Press J to join validator seat. Enter your moniker and that's it.
Open new session. Login as user.
sudo -s
ps -aux | grep containers-pkill* | awk '{print $2}' | xargs kill -9
-
Can we update node be re-init from t4 to t5 -No
-
What should I do if I am out of space -Try to delete snapshots. Check the command from here https://github.com/MrLutik/KiraTools/blob/main/README.md
-
How to check status of my node?
- Check if you have validator container up & runnig. Check your stats inside validator container(streak, rank, produceed blocks).
- What does the rank means?
- Please check here https://github.com/KiraCore/docs/blob/master/spec/iteration-2/kip_68.md#validator-rank
- What ports KM uses?
DEFAULT_P2P_PORT="26656"
DEFAULT_RPC_PORT="26657"
DEFAULT_PROMETHEUS_PORT="26660"
DEFAULT_GRPC_PORT="9090"
DEFAULT_INTERX_PORT="11000"
KIRA_FRONTEND_PORT="80"
KIRA_INTERX_PORT="11000"
KIRA_SEED_P2P_PORT="16656"
KIRA_SEED_RPC_PORT="16657"
KIRA_SEED_GRPC_PORT="19090"
KIRA_SEED_PROMETHEUS_PORT="16660"
KIRA_SENTRY_RPC_PORT="26657"
KIRA_SENTRY_P2P_PORT="26656"
KIRA_SENTRY_GRPC_PORT="29090"
KIRA_SENTRY_PROMETHEUS_PORT="26660"
KIRA_VALIDATOR_P2P_PORT="36656"
KIRA_VALIDATOR_RPC_PORT="36657"
KIRA_VALIDATOR_GRPC_PORT="39090"
KIRA_VALIDATOR_PROMETHEUS_PORT="36660"
KIRA_REGISTRY_PORT="5000"
- How to change config.toml in the docker container?
- You can change them with the bash function:
globGet XXX
globSet XXX YYY
List of config. values below.
CFG_timeout_commit=$(globGet CFG_timeout_commit)
CFG_pex=$(globGet CFG_pex)
CFG_moniker=$(globGet CFG_moniker)
CFG_allow_duplicate_ip=$(globGet CFG_allow_duplicate_ip)
CFG_addr_book_strict=$(globGet CFG_addr_book_strict)
CFG_fastsync=$(globGet CFG_fastsync)
CFG_fastsync_version=$(globGet CFG_fastsync_version)
CFG_handshake_timeout=$(globGet CFG_handshake_timeout)
CFG_dial_timeout=$(globGet CFG_dial_timeout)
CFG_trust_period=$(globGet CFG_trust_period)
CFG_max_txs_bytes=$(globGet CFG_max_txs_bytes)
CFG_max_tx_bytes=$(globGet CFG_max_tx_bytes)
CFG_send_rate=$(globGet CFG_send_rate)
CFG_recv_rate=$(globGet CFG_recv_rate)
CFG_max_packet_msg_payload_size=$(globGet CFG_max_packet_msg_payload_size)
CFG_cors_allowed_origins=$(globGet CFG_cors_allowed_origins)
CFG_snapshot_interval=$(globGet CFG_snapshot_interval)
CFG_statesync_enable=$(globGet CFG_statesync_enable)
CFG_statesync_temp_dir=$(globGet CFG_statesync_temp_dir)
CFG_create_empty_blocks_interval=$(globGet CFG_create_empty_blocks_interval)
CFG_max_num_outbound_peers=$(globGet CFG_max_num_outbound_peers)
CFG_max_num_inbound_peers=$(globGet CFG_max_num_inbound_peers)
CFG_prometheus=$(globGet CFG_prometheus)
CFG_seed_mode=$(globGet CFG_seed_mode)
CFG_skip_timeout_commit=$(globGet CFG_skip_timeout_commit)
CFG_unconditional_peer_ids=$(globGet CFG_unconditional_peer_ids)
CFG_persistent_peers=$(globGet CFG_persistent_peers)
CFG_seeds=$(globGet CFG_seeds)
CFG_grpc_laddr=$(globGet CFG_grpc_laddr)
CFG_rpc_laddr=$(globGet CFG_rpc_laddr)
CFG_p2p_laddr=$(globGet CFG_p2p_laddr)
Use case: https://github.com/KiraCore/kira/blob/master/workstation/containers/start-validator.sh