Skip to content

Commit

Permalink
Update install-terrad.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
evanorti committed Aug 7, 2023
1 parent 2a90243 commit 8ed326c
Showing 1 changed file with 98 additions and 0 deletions.
98 changes: 98 additions & 0 deletions docs/develop/terrad/install-terrad.mdx
Original file line number Diff line number Diff line change
@@ -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

<Admonition type="tip" icon="🛣" title="Set up your Go path">

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.

</Admonition>

<CH.Scrollycoding>
### 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
```
</CH.Scrollycoding>

## 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).


0 comments on commit 8ed326c

Please sign in to comment.