# Self Chain

* `Website` - <https://selfchain.xyz/>
* `Twitter` - <https://twitter.com/selfchainxyz>
* `Telegram` - <https://t.me/selfchainxyz>
* `Discord` -<https://discord.com/invite/selfchainxyz?ref=blog.selfchain.xyz>
* Staking: <https://staking.selfchain.xyz/>
* Self Chain Incentivized Testnet 2: <https://blog.selfchain.xyz/self-chain-incentivized-testnet-2/>

## **1. Minimum hardware requirement**

4 Cores, 8G Ram, 200G SSD, Ubuntu 22.04

## 2. Auto Install

```
sudo apt install curl -y && source <(curl -s https://nodesync.top/selfchain_auto)
```

### 2.1 Wallet

Add New Wallet Key

```
selfchaind keys add wallet
```

Recover existing key

```
selfchaind keys add wallet --recover
```

List All Keys

```
selfchaind keys list
```

### 2.2 Query Wallet Balance

```
selfchaind q bank balances $(selfchaind keys show wallet -a)
```

### 2.3 Check sync status

<mark style="color:red;">**False is synced**</mark>

```
selfchaind status 2>&1 | jq .SyncInfo.catching_up
```

### 2.4 Create Validator

Change your info

```
selfchaind tx staking create-validator \
  --amount 1000000uself \
  --pubkey $(selfchaind tendermint show-validator) \
  --moniker "MONIKER" \
  --identity="YOUR_KEYBASE_ID" \
  --details="YOUR_DETAILS" \
  --website="YOUR_WEBSITE_URL" \
  --chain-id self-dev-1 \
  --commission-rate="0.05" \
  --commission-max-rate="0.20" \
  --commission-max-change-rate="0.01" \
  --min-self-delegation "1" \
  --gas-prices="0.005uself" \
  --gas="auto" \
  --gas-adjustment="1.5" \
  --from wallet \
  -y
```

### 2.5 Edit Existing Validator&#x20;

```
selfchaind tx staking edit-validator \
--new-moniker="MONIKER" \
--identity="YOUR_KEYBASE_ID" \
--details="YOUR_DETAILS" \
--website="YOUR_WEBSITE_URL" \
--chain-id self-dev-1 \
--commission-rate=0.05 \
--gas-prices="0.005uself" \
--gas="auto" \
--gas-adjustment="1.5" \
--from wallet \
-y
```

### 2.6 Delegate Token to your own validator

```
selfchaind tx staking delegate $(selfchaind keys show wallet --bech val -a) 1000000uself --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

### 2.7 Withdraw rewards and commission from your validator

```
selfchaind tx distribution withdraw-rewards $(selfchaind keys show wallet --bech val -a) --commission --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

### 2.8 Unjail validator

```
selfchaind tx slashing unjail --from wallet --chain-id self-dev-1 --gas-prices=0.005uself --gas-adjustment 1.5 --gas auto -y 
```

### 2.9 Services Management

```
# Reload Service
sudo systemctl daemon-reload

# Enable Service
sudo systemctl enable selfchaind

# Disable Service
sudo systemctl disable selfchaind

# Start Service
sudo systemctl start selfchaind

# Stop Service
sudo systemctl stop selfchaind

# Restart Service
sudo systemctl restart selfchaind

# Check Service Status
sudo systemctl status selfchaind

# Check Service Logs
sudo journalctl -u selfchaind -f --no-hostname -o cat
```

## 3. Backup Validator

<mark style="color:red;">**Important**</mark>

```
cat $HOME/.selfchain/config/priv_validator_key.json
```

## 4. Remove node

```
sudo systemctl stop selfchaind && sudo systemctl disable selfchaind && sudo rm /etc/systemd/system/selfchaind.service && sudo systemctl daemon-reload && rm -rf $HOME/.selfchain && sudo rm -rf $(which selfchaind) 
```


---

# 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://services.nodesync.top/cosmos-testnet/self-chain.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.
