Skip to content

Instantly share code, notes, and snippets.

@imylomylo
Created June 10, 2020 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imylomylo/99057dbbb5ab1151027568f5cdae06b7 to your computer and use it in GitHub Desktop.
Save imylomylo/99057dbbb5ab1151027568f5cdae06b7 to your computer and use it in GitHub Desktop.
Kava Install Mainnet CDP Upgrade
Modified from https://medium.com/kava-labs/kava-testnet-4000-guide-2e47565dc890
& https://github.com/Kava-Labs/kava/blob/master/contrib/kava-3/migration.md
# Updates ubuntu
sudo apt update
sudo apt upgrade -y
# Installs packages necessary to run go
sudo apt install build-essential -y
# Installs go
wget https://dl.google.com/go/go1.13.7.linux-amd64.tar.gz
sudo tar -xvf go1.13.7.linux-amd64.tar.gz
sudo mv go /usr/local# Updates environmental variables to include go
cat <<EOF>> ~/.profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
source ~/.profile

go version
# Should return go version go1.13.7 linux/amd64

git clone https://github.com/Kava-Labs/kava.git
cd kava
git checkout v0.8.1
make install

  # verify versions
  kvd version --long
  # name: kava
  # server_name: kvd
  # client_name: kvcli
  # version: 0.8.1
  # commit: 869189054d68d6ec3e6446156ea0a91eb45af09c
  # build_tags: netgo,ledger
  # go: go version go1.13.7 linux/amd64

run with systemd, put this in /etc/systemd/system/kvd.service

[Unit]
Description=Kava daemon
After=network-online.target

[Service]
User=me
ExecStart=/home/me/go/bin/kvd start
StandardOutput=file:/var/log/kvd/kvd.log
StandardError=file:/var/log/kvd/kvd_error.log
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

Create log dir and start

sudo mkdir /var/log/kvd
sudo systemctl enable kvd
sudo systemctl start kvd
sudo systemctl status kvd.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment