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

# Installing

```
Desmos_NODENAME=<YOUR_MONIKER>
echo $Desmos_NODENAME
echo 'export Desmos_NODENAME='$Desmos_NODENAME >> $HOME/.bash_profile

Desmos_WALLET=<YOUR_WALLET>
echo $Desmos_WALLET
echo 'export Desmos_WALLET='$Desmos_WALLET >> $HOME/.bash_profile

chainName=desmos-mainnet
echo $chainName
echo 'export chainName='\"${chainName}\" >> $HOME/.bash_profile
source ~/.bash_profile
```

```
# https://docs.desmos.network/fullnode/overview/
sudo apt update && sudo apt upgrade -y
sudo apt install git mc nano build-essential ufw curl jq snapd --yes

wget -O go1.18.linux-amd64.tar.gz https://go.dev/dl/go1.18.linux-amd64.tar.gz
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.18.linux-amd64.tar.gz && rm go1.18.linux-amd64.tar.gz
cat <<'EOF' >> $HOME/.bash_profile
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin
EOF
. $HOME/.bash_profile
cp /usr/local/go/bin/go /usr/bin
go version
```

```
# https://docs.desmos.network/fullnode/setup
git clone https://github.com/desmos-labs/desmos.git && cd desmos
git checkout tags/v2.3.1
make install
/root/go/bin/desmos version
cp $HOME/go/bin/desmos /usr/local/bin
. $HOME/.bash_profile
desmos version
```

```
desmos keys add $Desmos_WALLET --dry-run
#Backup mnemonic
desmos init $Desmos_NODENAME --recover
```

```
# https://docs.desmos.network/mainnet/genesis-file/
curl https://raw.githubusercontent.com/desmos-labs/mainnet/main/genesis.json > ~/.desmos/config/genesis.json
# Check genesis file
jq -S -c -M '' /root/.desmos/config/genesis.json | shasum -a 256
# 619c9462ccd9045522300c5ce9e7f4662cac096eed02ef0535cca2a6826074c4  -
```

```
# https://nodejumper.io/desmos/installation
# https://docs.desmos.network/mainnet/seeds/
seeds="9bde6ab4e0e00f721cc3f5b4b35f3a0e8979fab5@seed-1.mainnet.desmos.network:26656,5c86915026093f9a2f81e5910107cf14676b48fc@seed-2.mainnet.desmos.network:26656,45105c7241068904bdf5a32c86ee45979794637f@seed-3.mainnet.desmos.network:26656"
peers="f090ead239426219d605b392314bdd73d16a795f@rpc1.nodejumper.io:32656"
sed -i -e "s/^seeds *=.*/seeds = \"$seeds\"/; s/^persistent_peers *=.*/persistent_peers = \"$peers\"/" ~/.desmos/config/config.toml

# https://nodejumper.io/desmos/installation
SNAP_RPC="http://rpc1.nodejumper.io:32657"; \
LATEST_HEIGHT=$(curl -s $SNAP_RPC/block | jq -r .result.block.header.height); \
BLOCK_HEIGHT=$((LATEST_HEIGHT - 2000)); \
TRUST_HASH=$(curl -s "$SNAP_RPC/block?height=$BLOCK_HEIGHT" | jq -r .result.block_id.hash); \
echo $LATEST_HEIGHT $BLOCK_HEIGHT $TRUST_HASH

sed -i -E "s|^(enable[[:space:]]+=[[:space:]]+).*$|\1true| ; \
s|^(rpc_servers[[:space:]]+=[[:space:]]+).*$|\1\"$SNAP_RPC,$SNAP_RPC\"| ; \
s|^(trust_height[[:space:]]+=[[:space:]]+).*$|\1$BLOCK_HEIGHT| ; \
s|^(trust_hash[[:space:]]+=[[:space:]]+).*$|\1\"$TRUST_HASH\"|" ~/.desmos/config/config.toml
```

```
# https://docs.desmos.network/fullnode/cosmovisor/
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@v1.0.0
strings $(which cosmovisor) | egrep -e "mod\s+github.com/cosmos/cosmos-sdk/cosmovisor"
sudo nano ~/.bash_profile
# Вставляем
export DAEMON_HOME=$HOME/.desmos
export DAEMON_NAME=desmos
export DAEMON_ALLOW_DOWNLOAD_BINARIES=true
export DAEMON_RESTART_AFTER_UPGRADE=true
export UNSAFE_SKIP_BACKUP=false

source ~/.bash_profile
echo $DAEMON_NAME

mkdir -p ~/.desmos/cosmovisor/genesis/bin/
cp $(which desmos) ~/.desmos/cosmovisor/genesis/bin/
cosmovisor version

```

Start cosmovisor by service

```
sudo tee /etc/systemd/system/desmosd.service > /dev/null <<EOF  
[Unit]
Description=Desmos Full Node
After=network-online.target

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

Environment="DAEMON_HOME=$HOME/.desmos"
Environment="DAEMON_NAME=desmos"
Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=true"
Environment="DAEMON_RESTART_AFTER_UPGRADE=true"
Environment="UNSAFE_SKIP_BACKUP=false"

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload \
&& sudo systemctl enable desmosd \
&& sudo systemctl restart desmosd \
&& sudo journalctl -u desmosd -f --no-hostname -o cat
```

```python
# https://docs.desmos.network/validators/setup
desmos keys add <key_name> --recover

desmos tx staking create-validator \
  --amount=1000000udsm \
  --pubkey=$(desmos tendermint show-validator) \
  --moniker="$Desmos_NODENAME" \
  --chain-id=$chainName \
  --commission-rate="0.10" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation="1" \
  --gas="auto" \
  --gas-adjustment=1.2 \
  --gas-prices="0.025udsm" \
  --from=$Desmos_WALLET
```

### Useful command

Balance

```
desmos q bank balances <desmos1...your..wallet...>
```
