Development environment
This page will go over setting up your development environment to run Celestia software. This environment can be used for development, building binaries, and running nodes.
Install dependencies
If you are on Ubuntu, first update and upgrade your OS:
bashsudo apt update && sudo apt upgrade -ysudo apt update && sudo apt upgrade -ybashsudo yum updatesudo yum updateInstall essential packages that are necessary to execute many tasks like downloading files, compiling, and monitoring the node:
bashsudo apt install curl tar wget aria2 clang pkg-config libssl-dev jq build-essential \ git make ncdu -ysudo apt install curl tar wget aria2 clang pkg-config libssl-dev jq build-essential \ git make ncdu -ybashsudo yum install curl tar wget aria2 clang pkg-config libssl-dev jq build-essential \ git make ncdu -ysudo yum install curl tar wget aria2 clang pkg-config libssl-dev jq build-essential \ git make ncdu -ybash# these commands are for installing Homebrew, wget and jq # follow the instructions from the output after running this command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # then install wget & jq brew install wget && brew install jq# these commands are for installing Homebrew, wget and jq # follow the instructions from the output after running this command /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" # then install wget & jq brew install wget && brew install jq
Install Golang
celestia-node is written in Golang so we must install Golang to build and run our node.
Set the version for your desired network:
bashver="1.23.0"ver="1.23.0"bashver="1.23.2"ver="1.23.2"bashver="1.23.2"ver="1.23.2"Download and install Golang:
bashcd $HOME 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"cd $HOME 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"bashcd $HOME wget "https://golang.org/dl/go$ver.linux-arm64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.linux-arm64.tar.gz" rm "go$ver.linux-arm64.tar.gz"cd $HOME wget "https://golang.org/dl/go$ver.linux-arm64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.linux-arm64.tar.gz" rm "go$ver.linux-arm64.tar.gz"bashcd $HOME wget "https://golang.org/dl/go$ver.darwin-arm64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.darwin-arm64.tar.gz" rm "go$ver.darwin-arm64.tar.gz"cd $HOME wget "https://golang.org/dl/go$ver.darwin-arm64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.darwin-arm64.tar.gz" rm "go$ver.darwin-arm64.tar.gz"bashcd $HOME wget "https://golang.org/dl/go$ver.darwin-amd64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.darwin-amd64.tar.gz" rm "go$ver.darwin-amd64.tar.gz"cd $HOME wget "https://golang.org/dl/go$ver.darwin-amd64.tar.gz" sudo rm -rf /usr/local/go sudo tar -C /usr/local -xzf "go$ver.darwin-amd64.tar.gz" rm "go$ver.darwin-amd64.tar.gz"Add your
/usr/local/go/bindirectory to your$PATHif you have not already:bashecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile source $HOME/.bash_profileecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile source $HOME/.bash_profilebashecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.zshrc source $HOME/.zshrcecho "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.zshrc source $HOME/.zshrcTIP
Use
echo $SHELLto figure out what type of shell you are using!To verify that the correct version of Go was installed correctly run:
bashgo versiongo version
The output will show the version installed.