# installation

## Installation

The complete infrastructure for cross-chain smart contracts, applications, and modular functionality.

**Chain ID**: stratos-1 | **Latest Version Tag**: v0.11.2 | **Wasm**: OFF

[Website](https://www.thestratos.org) | [Discord](https://discord.gg/tpQGpC2nMh) | [Twitter](https://twitter.com/Stratos_Network)

### Chain explorer

<https://explorer.thestratos.org>

### Public endpoints

* rpc:&#x20;
* api:&#x20;

### Peering

**seed-node**

```
cdbd7ce27584e699d9b9e6d72a1551666c750e4d@35.86.41.142:26656,ce225e67f7a383b50c91aeb902a86dd3ecb70d65@34.84.212.13:26656
```

## Installation

**Chain ID**: stratos-1 | **Latest Version Tag**: v0.11.2 |

#### Install dependencies

**Update system and install build tools**

```bash
sudo apt -q update
sudo apt -qy install curl git jq lz4 build-essential tmux libgmp3-dev flex bison
sudo apt -qy upgrade
```

**Install PBC library**

```bash
wget https://crypto.stanford.edu/pbc/files/pbc-0.5.14.tar.gz
tar xfz pbc-0.5.14.tar.gz && cd pbc-0.5.14
./configure
make
sudo make install
sudo ldconfig
```

**Install Go**

```bash
sudo rm -rf /usr/local/go
curl -Ls https://go.dev/dl/go1.20.5.linux-amd64.tar.gz | sudo tar -xzf - -C /usr/local
eval $(echo 'export PATH=$PATH:/usr/local/go/bin' | sudo tee /etc/profile.d/golang.sh)
eval $(echo 'export PATH=$PATH:$HOME/go/bin' | tee -a $HOME/.profile)
```

**Download and build binaries**

```bash
# Clone project repository
cd $HOME
rm -rf stratos-chain
git clone https://github.com/stratosnet/stratos-chain.git
git checkout v0.11.2

# Build binaries
make install
stchaind version
```

**Initialize Node & Genesis**

```bash
stchaind init <NodeName> --chain-id=stratos-1
```

**Download Genesis**

```bash
curl -Ls wget https://raw.githubusercontent.com/stratosnet/mainnet/main/genesis/genesis.json > $HOME/.stchaind/config/genesis.json 
```

#### Create a service

```bash
sudo tee /etc/systemd/system/stchaind.service > /dev/null <<EOF
[Unit]
Description=stchaind Daemon
After=network-online.target
[Service]
User=$USER
ExecStart=$(which stchaind) start
Restart=always
RestartSec=3
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable stchaind
```

#### Initialize the node

```bash
# Set node configuration
stchaind config chain-id stratos-1
stchaind config keyring-backend file

# Add seeds
sed -i -e "s|^seeds *=.*|seeds = \"cdbd7ce27584e699d9b9e6d72a1551666c750e4d@35.86.41.142:26656,ce225e67f7a383b50c91aeb902a86dd3ecb70d65@34.84.212.13:26656\"|" $HOME/.stchaind/config/config.toml

# Set minimum gas price
sed -i -e "s|^minimum-gas-prices *=.*|minimum-gas-prices = \"1000000000wei\"|" $HOME/.stchaind/config/app.toml

# Set pruning
sed -i \
  -e 's|^pruning *=.*|pruning = "custom"|' \
  -e 's|^pruning-keep-recent *=.*|pruning-keep-recent = "100"|' \
  -e 's|^pruning-keep-every *=.*|pruning-keep-every = "0"|' \
  -e 's|^pruning-interval *=.*|pruning-interval = "19"|' \
  $HOME/.stchaind/config/app.toml
```

#### Snapshot (Nodestake.top❤)

```bash
SNAP_NAME=$(curl -s https://ss.stratos.nodestake.top/ | egrep -o ">20.*\.tar.lz4" | tr -d ">")
curl -o - -L https://ss.stratos.nodestake.top/${SNAP_NAME}  | lz4 -c -d - | tar -x -C $HOME/.stchaind
```

#### Start service and check the logs

```bash
sudo systemctl start stchaind && sudo journalctl -u stchaind -f --no-hostname -o cat
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.offellnode.top/nodes-mainnet/stratos/installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
