> For the complete documentation index, see [llms.txt](https://uthersunlighter.gitbook.io/uthersunlighter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uthersunlighter.gitbook.io/uthersunlighter/babylon.md).

# Babylon

### Setting Up a Babylon Node

### System Requirements

The recommended system specifications for running a Babylon node are:

* Quad-core or larger AMD/Intel (amd64) CPU
* 32GB RAM
* 1TB NVMe storage
* 100Mbps bidirectional internet connection

### Initialize the Node Directory

1. Initialize a node configuration directory under `~/.babylond` using the command:

```
babylond init $NODENAME --chain-id bbn-test-3
```

2. Retrieve the genesis file and place it in the node directory:

```
wget https://github.com/babylonchain/networks/raw/main/bbn-test-3/genesis.tar.bz2
tar -xjf genesis.tar.bz2 && rm genesis.tar.bz2
mv genesis.json ~/.babylond/config/genesis.json
```

### Configure Peers and Settings

3. Edit the `~/.babylond/config/config.toml` file to add appropriate seed nodes and persistent peers.
4. In the `~/.babylond/config/app.toml` file, set `iavl-cache-size=0` to handle caching issues and configure the `btc-network` parameter.
5. Optionally, you can also modify the `minimum-gas-prices` attribute in `app.toml`.

### Set Up Cosmovisor

6. Install the latest version of Cosmovisor:

```
go install cosmossdk.io/tools/cosmovisor/cmd/cosmovisor@latest
```

7. Create the necessary directories for Cosmovisor:

```
mkdir -p ~/.babylond/cosmovisor/genesis/bin
mkdir -p ~/.babylond/cosmovisor/upgrades
```

8. Copy the `babylond` binary into the `cosmovisor/genesis` folder.
9. Set up a Cosmovisor service file `/etc/systemd/system/babylond.service`:

```
[Unit]
Description=Babylon Node
After=network-online.target

[Service]
User=$USER
ExecStart=$(which cosmovisor) run start
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target
```

### Start the Node

10. Reload the systemd daemon and enable/start the Babylon node service:

```
sudo systemctl daemon-reload
sudo systemctl enable babylond
sudo systemctl start babylond
```

You can then check the status of the node using `systemctl status babylond`.
