Skip to main content

Join a network

It is highly recommended that you set up a private local network before joining a public network. This will help you get familiar with the setup process, and provide an environment for testing. The following sections outline this process. If you want to join a public network without setting up a private network, you can skip to join a public network.

Set up a local private network

Validators can set up a private Terra network to become familiar with running a full Terra node before joining a public network.

💡LocalTerra

If you are a developer and want to set up a local, WASM-enabled, private testnet for smart contracts, visit install LocalTerra.

Create a single node

The simplest Terra network you can set up is a local testnet with just a single node. In a single-node environment, you have one account and are the only validator signing blocks for your private network.

  1. Initialize your genesis file that will bootstrap the network. Replace the following variables with your own information:


    _1
    terrad init --chain-id=<testnet-name> <node-moniker>

  2. Generate a Terra account. Replace the variable with your account name:


    _1
    terrad keys add <account-name>

💡Get tokens

In order for Terrad to recognize a wallet address, it must contain tokens. For the testnet, use the faucet to send Luna to your wallet. If you are on mainnet, send funds from an existing wallet. 1-3 Luna are sufficient for most setup processes.

Add your account to the genesis

Run the following commands to add your account and set the initial balance:


_3
terrad add-genesis-account $(terrad keys show <account-name> -a) 100000000uluna
_3
terrad gentx <my-account> 10000000uluna --chain-id=<testnet-name>
_3
terrad collect-gentxs

Start your private Terra network

Run the following command to start your private network:


_1
terrad start

If the private Terra network is set up correctly, your Terrad node will be running on tcp://localhost:26656, listening for incoming transactions, and signing blocks.

Join a public network

These instructions are for setting up a brand new full node from scratch. You can join a public Terra network, such as the mainnet or testnet, by completing the following steps:

1. Select a network

Specify the network you want to join by choosing the corresponding genesis file and seeds list:

NetworkTypeGenesisAddressbookSeeds
phoenix-1MainnetGenesis LinkPeer List Community maintained by PolkachuSeeds List
pisco-1TestnetGenesis LinkPeer List Community maintained by PolkachuSeeds List
💡Selecting a network

Note that the versions of the network listed above are the latest versions. To find earlier versions, please consult the networks repo.

2. Download genesis file and address book

Genesis-transaction specifies the account balances and parameters at the start of the network to use when replaying transactions and syncing.

Addressbook lists a selection of peers for your node to dial to in order to discover other nodes in the network. Public address books of peers are made available by the Terra community.

Choose a testnet or mainnet address type and download the appropriate genesis-transaction and addressbook. Links to these are posted in the Select a network section.

  • For default Terrad configurations, the genesis and addressbook files should be placed under ~/.terra/config/genesis.json and ~/.terra/config/addrbook.json respectively.

Example:


_5
# Obtain the genesis for phoenix-1:
_5
wget https://phoenix-genesis.s3.us-west-1.amazonaws.com/genesis.json -O ~/.terra/config/genesis.json
_5
_5
# Obtain the addressbook for the phoenix-1 from Polkachu:
_5
wget https://snapshots1.polkachu.com/addrbook/terra/addrbook.json -O ~/.terra/config/addrbook.json

Continue to the Sync page to find out more about syncing your node.