> For the complete documentation index, see [llms.txt](https://docs.indonode.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.indonode.net/mainnet/sge/installation.md).

# Node Installation

<figure><img src="https://pbs.twimg.com/profile_images/1693591385469837313/6dYwFnXW_400x400.jpg" alt="" width="188"><figcaption></figcaption></figure>

\*\*\*

| Latest Version | Chain-id | Wasm     |
| -------------- | -------- | -------- |
| v1.1.0         | sgenet-1 | DISABLED |

### Setup Server

```shell
# Update Packages
sudo apt update && apt upgrade -y
sudo apt install curl git jq lz4 build-essential unzip fail2ban ufw -y

# Set Firewall
sudo apt install -y ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow ssh
sudo ufw allow 9100

# Enable Firewall
sudo ufw enable

# Install Go
ver="1.19.9"
wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz"
rm "go$ver.linux-amd64.tar.gz"
echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile
source $HOME/.bash_profile
go version
```

### Node Installation (Manual)

```sh
# Download and install binary
cd $HOME
rm -rf sge
git clone https://github.com/sge-network/sge
cd sge
git checkout v1.1.0
make install

# Set Configuration for your node
sged config chain-id sgenet-1
sged config keyring-backend file


# Init your node
# You can change "MyNode" to anything you like
sged init MyNode --chain-in sgenet-1


# Add Genesis File and Addrbook
curl -Ls https://snapshots.indonode.net/sge/genesis.json > $HOME/.sge/config/genesis.json
curl -Ls https://snapshots.indonode.net/sge/addrbook.json > $HOME/.sge/config/addrbook.json

#Configure Seeds and Peers
PEERS="$(curl -sS https://rpc.sge.indonode.net/net_info | jq -r '.result.peers[] | "\(.node_info.id)@\(.remote_ip):\(.node_info.listen_addr)"' | awk -F ':' '{print $1":"$(NF)}' | sed -z 's|\n|,|g;s|.$||')"
sed -i -e "s|^persistent_peers *=.*|persistent_peers = \"$PEERS\"|" $HOME/.sge/config/config.toml


# Set Pruning, Enable Prometheus, Gas Prices, and Indexer
PRUNING="custom"
PRUNING_KEEP_RECENT="100"
PRUNING_INTERVAL="19"

sed -i -e "s/^pruning *=.*/pruning = \"$PRUNING\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \
\"$PRUNING_KEEP_RECENT\"/" $HOME/.sge/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \
\"$PRUNING_INTERVAL\"/" $HOME/.sge/config/app.toml
sed -i -e 's|^indexer *=.*|indexer = "null"|' $HOME/.sge/config/config.toml
sed -i 's|^prometheus *=.*|prometheus = true|' $HOME/.sge/config/config.toml
sed -i -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.025usge\"/" $HOME/.sge/config/app.toml

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

# Download Latest Snapshot
curl -L https://snapshots.indonode.net/sge/sge-latest.tar.lz4 | lz4 -dc - | tar -xf - -C $HOME/.sge
[[ -f $HOME/.sge/data/upgrade-info.json ]] && cp $HOME/.sge/data/upgrade-info.json $HOME/.sge/cosmovisor/genesis/upgrade-info.json

# Start the Node
sudo systemctl restart sged
sudo journalctl -fu sged -o cat
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.indonode.net/mainnet/sge/installation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
