diff --git a/docs/develop/terrad/install-terrad.mdx b/docs/develop/terrad/install-terrad.mdx index e69de29bb..17e8b19a4 100644 --- a/docs/develop/terrad/install-terrad.mdx +++ b/docs/develop/terrad/install-terrad.mdx @@ -0,0 +1,98 @@ +--- +sidebar_position: 1 +--- + +import Admonition from '@theme/Admonition'; + +# Install Terrad + +Terrad is the command-line interface and node daemon that enables you to interact with the Terra blockchain. Terra Core is the official Golang reference implementation of the Terra node software. + +This guide is for developers who want to install Terrad and interact with the Terra Core without running a full node. If you want to run a full node or join a network, use the documentation on how to [run a full Terra node](../../full-node/run-a-full-terra-node/README.mdx). + +### Prerequisites + +- [Golang v1.20.0 linux/amd64](https://golang.org/doc/install) +- [Ensure your `GOPATH` and `GOBIN` environment variables are set up correctly](#from-source). +- Linux users: install build-essential. + +## From binary + +The easiest way to install Terrad and Terra Core is by downloading a pre-built Linux binary. You can find the latest Linux binaries on the [releases page](https://github.com/terra-money/core/releases). + +If you are not using Linux, follow the instructions below. + +## From source + + + +Before installing Terrad, ensure your Go path is set up correctly. + +1. Open your Bash profile in your code editor. If you use VS Code and _'zsh'_, you can run the following command in your terminal to open the file. + +```sh Terminal +code ~/.zshrc +``` + +2. Near the bottom of the file, add the following line: + +```sh Editor +export PATH=$PATH:$(go env GOPATH)/bin +``` + +Save the file and open a new terminal before proceeding. + + + + +### 1. Get the Terra Core source code + +Use `git` to retrieve [Terra Core](https://github.com/terra-money/core/) and check out the `main` branch, which contains the latest stable release. + +```sh Terminal +git clone https://github.com/terra-money/core +cd core +git checkout [latest version] +``` + +--- + +### 2. Build Terra Core from source + +Build Terra Core, and install the Terrad executable to your `GOPATH` environment variable. + +```sh Terminal +make install +``` + +--- + +### 3. Verify your Terra Core installation + +Verify that Terra Core is installed correctly. + +```sh Terminal +terrad version --long +``` + +--- + +If Terra Core is installed correctly, you will get the following output: + +```sh Output +name: terra +server_name: terrad +version: v2.0.0 +commit: ea682c41e7e71ba0b182c9e7f989855fb9595885 +build_tags: netgo,ledger +go: go version go1.20.3 darwin/amd64 +``` + + +## Next steps + +With Terrad installed, you can set up a local testing environment using [LocalTerra](../localterra/README.mdx). + +For more information on Terrad commands and usage, visit [Using Terrad](using-terrad.mdx). + +