# Mainnet

### Joining the BitNet Mainnet

This guide walks you through how to join the **BitNet mainnet**, set up your node, and become a mainnet validator securely and efficiently.

***

#### 1. Server Timezone Requirement

Set your server timezone to **UTC**. Failure to do so may result in a `LastResultsHash` mismatch and **halt your node**.

Check your current timezone with:

```bash
timedatectl
```

***

#### 2. Install the BitNet Binary

Install the official `bitnetd` binary from the [BitNet repository](https://github.com/bitnet/bitnet). Always confirm you are using the version that matches the latest mainnet release:

```bash
bitnetd version
```

***

#### 3. Save Chain ID (Optional)

To simplify CLI usage, store the chain ID in your config:

```bash
bitnetd config chain-id bitnet_mainnet_9001
```

***

#### 4. Initialize the Node

Initialize your node with a custom moniker:

```bash
bitnetd init <your_moniker> --chain-id bitnet_mainnet_9001
```

{% hint style="success" %}
Only use **ASCII characters** in your moniker.
{% endhint %}

This creates the `~/.bitnetd` directory and all necessary subfolders.

***

#### 5. Download the Mainnet Genesis File

Retrieve and validate the `genesis.json`:

```bash
wget https://archive.bitnet.org/mainnet/genesis.json
mv genesis.json ~/.bitnetd/config/genesis.json
bitnetd validate-genesis
```

***

#### 6. Add Seed and Persistent Peers

**Seed Nodes**

Edit your `~/.bitnetd/config/config.toml` file to include:

```toml
seeds = "<node-id>@<ip>:<port>"
```

You may automate this:

```bash
SEEDS=$(curl -sL https://raw.githubusercontent.com/bitnet/mainnet/main/seeds.txt | awk '{print $1}' | paste -s -d, -)
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" ~/.bitnetd/config/config.toml
```

**Persistent Peers**

```bash
PEERS=$(curl -sL https://raw.githubusercontent.com/bitnet/mainnet/main/peers.txt | sort -R | head -n 10 | awk '{print $1}' | paste -s -d, -)
sed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \"$PEERS\"/" ~/.bitnetd/config/config.toml
```

***

#### 7. Create a Validator on Mainnet

Only proceed once your node is fully synced and you have BNC tokens.

```bash
bitnetd tx staking create-validator \
  --amount=1000000abnc \
  --pubkey=$(bitnetd tendermint show-validator) \
  --moniker="BitNetWhale" \
  --chain-id=bitnet_mainnet_9001 \
  --commission-rate="0.05" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1000000" \
  --gas="auto" \
  --gas-prices="0.025abnc" \
  --from=<key_name>
```

{% hint style="danger" %}
Never generate validator keys using **test** backends (e.g. insecure keyrings). Doing so may expose your funds via public JSON-RPC endpoints.
{% endhint %}

***

#### 8. Start the Node

Once all configurations are complete:

```bash
bitnetd start
```

After reaching +2/3 validator power, the BitNet mainnet will begin producing blocks.

***

#### 9. Share Your Peer

Get your node ID:

```bash
bitnetd tendermint show-node-id
```

Then share it in BitNet’s community `#find-peers` channel to help bootstrap peer connections.

***

*You're now fully integrated with the BitNet Mainnet!*
