Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Install Kava node
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
# Create a system user for running the service
sudo useradd -m -d /opt/kvd --system --shell /usr/sbin/nologin kvd
sudo -u kvd mkdir -p /opt/kvd/config
# Get Kava and build binaries
git clone
go install ./cmd/kvd ./cmd/kvcli
# Copy the binaries to /opt/go/bin/
sudo cp $HOME/go/bin/kv* /opt/go/bin/
# Create systemd unit file
echo "[Unit]
Description=Kava Node
ExecStart=/opt/go/bin/kvd start --home=/opt/kvd/
[Install]" > kvd.service
sudo mv kvd.service /etc/systemd/system/
sudo systemctl enable kvd.service
# Create the config skeleton as user gaiad
sudo -u kvd /opt/go/bin/kvd unsafe-reset-all --home=/opt/kvd
echo "You can copy the genesis.json file to /opt/kvd/config and edit the /opt/kvd/config/config.toml."
echo "Run 'sudo service kvd start' to start the service."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.