# Installation

1. **Update packages and install useful tools.**

```
sudo apt update && sudo apt upgrade --yes && \
sudo apt install git build-essential ufw curl jq snapd screen ncdu nano fuse ufw --yes
```

2. **Install `go` using `snap`**.

```
sudo snap install go --classic && \
echo 'export GOPATH="$HOME/go"' >> ~/.profile && \
echo 'export GOBIN="$GOPATH/bin"' >> ~/.profile && \
echo 'export PATH="$GOBIN:$PATH"' >> ~/.profile && \
source ~/.profile && \
go version
```

3. **Download latest binary.**

```
wget https://github.com/likecoin/likecoin-chain/releases/download/v4.2.0/likecoin-chain_4.1.1_Linux_x86_64.tar.gz
tar -xvf likecoin-chain_4.2.0_Linux_x86_64.tar.gz
chmod +x bin/liked
mv bin/liked /usr/local/bin/
rm CHANGELOG.md LICENSE README.md likecoin-chain_4.2.0_Linux_x86_64.tar.gz
liked version
```

4. **Initialize your node.**

```
liked init <node_name>
```

5. **Download genesis.**

```
curl https://raw.githubusercontent.com/likecoin/mainnet/master/genesis.json > ~/.liked/config/genesis.json
```

6. **Add seeds to `config.toml`.**

```
SEEDS="913bd0f4bea4ef512ffba39ab90eae84c1420862@34.82.131.35:26656,e44a2165ac573f84151671b092aa4936ac305e2a@nnkken.dev:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.liked/config/config.toml
```

7. #### Set up minimum gas price.

```
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"10000nanolike\"/;" ~/.liked/config/app.toml
```

8. **Set up pruning (optional).**

```
pruning="custom"
pruning_keep_recent="100"
pruning_keep_every="0"
pruning_interval="10"
sed -i -e "s/^pruning *=.*/pruning = \"$pruning\"/" $HOME/.liked/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.liked/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.liked/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.liked/config/app.toml
```

9. **Create service file.**

```
sudo tee /etc/systemd/system/liked.service > /dev/null <<EOF
[Unit]
Description=LikeCoin Daemon
After=network-online.target

[Service]
User=$USER
ExecStart=$(which liked) start
Restart=on-failure
RestartSec=3
LimitNOFILE=65535

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

10. **Enable and start service.**

```
systemctl daemon-reload
systemctl enable liked
systemctl restart liked
journalctl -u liked -f -o cat
```

{% hint style="info" %}
If you would like to speed up the sync process, you may try using State Sync.
{% endhint %}


---

# 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.stakeangle.com/mainnets/likecoin/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.
