---
description: Konstellation Mainnet guide
---

# Node Installation

## [EXPLORER](https://explorer.stavr.tech/Konstellation/staking)

* **Minimum hardware requirements**:

| Node Type | CPU | RAM  | Storage |
| --------- | --- | ---- | ------- |
| Mainnet   | 8   | 16GB | 250GB   |

## 1) Auto\_install script

```bash
source <(curl -s https://raw.githubusercontent.com/111STAVR111/props/refs/heads/main/Konstellation/konstm)
```

## 2) Manual installation

#### Preparing the server

```bash
sudo apt update && sudo apt upgrade -y
sudo apt install curl tar wget clang pkg-config libssl-dev jq build-essential bsdmainutils git make ncdu gcc git jq chrony liblz4-tool -y
```

### GO 1.21.6

```bash
ver="1.21.6"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

## Build 10.12.23

```bash
cd $HOME && mkdir -p go/bin/
git clone https://github.com/konstellation/konstellation
cd konstellation
git checkout v0.6.2
make build
mv $HOME/konstellation/build/knstld $HOME/go/bin/knstld
```

`knstld version --long | grep -e commit -e version`

* version: 0.6.2
* commit: 371486832893d7dc99a68ee333ca4d2e2c375f9e

## Initiation

```python
knstld init STAVR_guide --chain-id=darchub
knstld config chain-id darchub
```

### Create/recover wallet

```bash
knstld keys add <walletname>
           OR
knstld keys add <walletname> --recover
```

### Download Genesis

```python
wget -L -O $HOME/.knstld/config/genesis.json https://server-1.stavr.tech/Mainnet/Konstellation/genesis.json
```

`sha256sum $HOME/.knstld/config/genesis.json`

* f0e98b0749801ba0b2ea5f1eeff72df847ec78bde9b8ff9ca114bedc8afd8763

### Set up the minimum gas price and Peers/Seeds/Filter peers/MaxPeers

```bash
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0udarc\"/" $HOME/.knstld/config/app.toml
sed -i -e "s/^filter_peers *=.*/filter_peers = \"true\"/" $HOME/.knstld/config/config.toml
external_address=$(wget -qO- eth0.me) 
sed -i.bak -e "s/^external_address *=.*/external_address = \"$external_address:26656\"/" $HOME/.knstld/config/config.toml
peers=""
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" $HOME/.knstld/config/config.toml
seeds=""
sed -i.bak -e "s/^seeds =.*/seeds = \"$seeds\"/" $HOME/.knstld/config/config.toml
sed -i 's/max_num_inbound_peers =.*/max_num_inbound_peers = 50/g' $HOME/.knstld/config/config.toml
sed -i 's/max_num_outbound_peers =.*/max_num_outbound_peers = 10/g' $HOME/.knstld/config/config.toml
```

#### Pruning&#x20;

```bash
pruning="nothing"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.knstld/config/app.toml
```

#### Indexer (optional)

```bash
indexer="null" &&
sed -i -e "s/^indexer *=.*/indexer = \"$indexer\"/" $HOME/.knstld/config/config.toml
```

### Download addrbook

```bash
wget -O $HOME/.knstld/config/addrbook.json "https://server-1.stavr.tech/Mainnet/Konstellation/addrbook.json"
```

## Create a service file

```bash
sudo tee /etc/systemd/system/knstld.service > /dev/null <<EOF
[Unit]
Description=knstld
After=network-online.target

[Service]
User=$USER
ExecStart=$(which knstld) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

[Install]
WantedBy=multi-user.target
EOF
```

## StateSync Konstellation Mainnet

```bash
SOON
```

## SnapShot Mainnet updated every 5 hours

{% hint style="success" %}
<mark style="color:orange;">**You can check the size and time of snapshot creation with this command**</mark>\
`curl -sI https://server-1.stavr.tech/Mainnet/Konstellation/knstld-snap-1.tar.lz4 | grep "last" && curl -sI https://server-1.stavr.tech/Mainnet/Konstellation/knstld-snap-1.tar.lz4 | grep content-length | awk '{printf "%.2f GB\n", $2/1024/1024/1024}'`
{% endhint %}

```bash
cd $HOME
apt install lz4
sudo systemctl stop knstld
cp $HOME/.knstld/data/priv_validator_state.json $HOME/.knstld/priv_validator_state.json.backup
rm -rf $HOME/.knstld/data
LATEST_SNAPSHOT=$(curl -s https://server-1.stavr.tech/Mainnet/Konstellation/ | grep -oE 'knstld-snap-[0-9]+\.tar\.lz4' | while read SNAPSHOT; do HEIGHT=$(curl -s "https://server-1.stavr.tech/Mainnet/Konstellation/${SNAPSHOT%.tar.lz4}-info.txt" | awk '/Block height:/ {print $3}'); echo "$SNAPSHOT $HEIGHT"; done | sort -k2 -nr | head -n 1 | awk '{print $1}')
curl -o - -L https://server-1.stavr.tech/Mainnet/Konstellation/$LATEST_SNAPSHOT | lz4 -c -d - | tar -x -C $HOME/.knstld
mv $HOME/.knstld/priv_validator_state.json.backup $HOME/.knstld/data/priv_validator_state.json
wget -O $HOME/.knstld/config/addrbook.json "https://server-1.stavr.tech/Mainnet/Konstellation/addrbook.json"
sudo systemctl restart knstld && journalctl -fu knstld -o cat
```

### Start

```bash
sudo systemctl daemon-reload
sudo systemctl enable knstld
sudo systemctl restart knstld && sudo journalctl -fu knstld -o cat
```

#### Create validator

```python
knstld tx staking create-validator \
--commission-rate 0.1 \
--commission-max-rate 1 \
--commission-max-change-rate 1 \
--min-self-delegation "1" \
--amount 1000000udarc \
--pubkey $(knstld tendermint show-validator) \
--from <wallet> \
--moniker="STAVR_guide" \
--chain-id darchub \
--gas 300000 \
--identity="" \
--website="" \
--details="" -y
```

## [🧩Services and Tools🧩](https://stavr-team.gitbook.io/nodes-guides/mainnets/konstellation/statesync-snapshot)

## Monitoring

You can set up your node status alarm here - [Monitoring](https://stavr-team.gitbook.io/nodes-guides/monitoring)

## Security

You can create secure management of your wallet and your node by following this links.

[TMKMS](https://stavr-team.gitbook.io/nodes-guides/tmkms)               [Wallet Security](https://stavr-team.gitbook.io/nodes-guides/wallet-security)

### Delete node

```bash
sudo systemctl stop knstld
sudo systemctl disable knstld
rm /etc/systemd/system/knstld.service
sudo systemctl daemon-reload
cd $HOME
rm -rf konstellation
rm -rf .knstld
rm -rf $(which knstld)
```
