Prerequisites
Before you start the setup process, ensure that you have the following prerequisites:
Hardware Requirements
A dedicated server or VPS with sufficient resources (CPU, RAM, and storage) to run a Cosmos validator node.
Stable internet connection with adequate bandwidth.
Below are the hardware requirements for a Cosmos Hub validator
Validator
32GB
500GB-2TB*
Full
16GB
2TB
Default
16GB
1TB
Software Requirements
At present, most of the validator software fully supports installation on Linux distributions. We recommend you to use Ubuntu 20.04.3 LTS
or greater. Moreover, you need to install some additional software, depending on the requirements of the project you want to run the node. We will list some popular software below. All steps are listed below for a clean install.
Build Tools
sudo apt-get update
sudo apt install -y curl tar wget clang pkg-config libssl-dev jq build-essential git make lz4 unzip ncdu gcc
Install Golang
We suggest the following two ways to install Go. Check out the official docs and Go installer for the correct download for your operating system. Alternatively, you can install Go yourself from the command line. Detailed below are standard default installation locations, but feel free to customize.
At the time of this writing, the latest release is 1.20.3
. We're going to download the tarball, extract it to /usr/local
, and export GOROOT
to our $PATH
curl -OL https://go.dev/dl/go1.20.3.linux-amd64.tar.gz
sudo tar -C /usr/local -xvf https://go.dev/dl/go1.20.3.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Remember to add GOPATH
to your $PATH
environment variable. If you're not sure where that is, run go env GOPATH
. This will allow us to run the gaiad
binary in the next step. If you're not sure how to set your $PATH
take a look at these instructions.
export PATH=$PATH:/usr/local/go/bin
Install Docker
The Docker installation package available in the official Ubuntu repository may not be the latest version. To ensure we get the latest version, we’ll install Docker from the official Docker repository. To do that, we’ll add a new package source, add the GPG key from Docker to ensure the downloads are valid, and then install the package.
First, update your existing list of packages:
sudo apt update
Next, install a few prerequisite packages which let apt
use packages over HTTPS:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
Then add the GPG key for the official Docker repository to your system:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the Docker repository to APT sources:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
This will also update our package database with the Docker packages from the newly added repo.
Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:
apt-cache policy docker-ce
You’ll see output like this, although the version number for Docker may be different:
Output of apt-cache policy docker-ce
docker-ce:
Installed: (none)
Candidate: 5:19.03.9~3-0~ubuntu-focal
Version table:
5:19.03.9~3-0~ubuntu-focal 500
500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages
Notice that docker-ce
is not installed, but the candidate for installation is from the Docker repository for Ubuntu 20.04 (focal
).
Finally, install Docker:
sudo apt install docker-ce
Docker should now be installed, the daemon started, and the process enabled to start on boot. Check that it’s running:
sudo systemctl status docker
The output should be similar to the following, showing that the service is active and running:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2020-05-19 17:00:41 UTC; 17s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 24321 (dockerd)
Tasks: 8
Memory: 46.4M
CGroup: /system.slice/docker.service
└─24321 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
Install Rust and Cargo
The easiest way to get Cargo is to install the current stable release of Rust by using rustup. Installing Rust using rustup
will also install cargo
.
On Linux and macOS systems, this is done as follows:
curl https://sh.rustup.rs -sSf | sh
It will download a script, and start the installation. If everything goes well, you’ll see this appear:
Rust is installed now. Great!
After this, you can use the rustup
command to also install beta
or nightly
channels for Rust and Cargo.
For other installation options and information, visit the install page of the Rust website.
Install Node.js
Last updated