# Installation

{% tabs %}
{% tab title="Step 1" %}
{% code title="Install Pre Requisites" fullWidth="true" %}

```
sudo apt update
sudo apt install git build-essential curl jq lz4 --yes

wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz
rm go1.20.2.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin
cat <<EOF >> ~/.profile  
export GOPATH=$HOME/go  
export GO111MODULE=on  
export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin  
EOF

source ~/.profile

go version

# OUTPUT
# go version go1.20.2 linux/amd64
```

{% endcode %}
{% endtab %}

{% tab title="Step 2" %}
{% code title="Install Bitsong Node" fullWidth="true" %}

```
git clone https://github.com/bitsongofficial/go-bitsong.git
cd go-bitsong
git checkout v0.23.0
make install
bitsongd version

# OUTPUT
# 0.23.0
```

{% endcode %}
{% endtab %}

{% tab title="Step 3" %}
{% code title="Create Background Service" fullWidth="true" %}

```
sudo tee /etc/systemd/system/bitsongd.service > /dev/null << EOF

[Unit]
Description=Bitsong Node
After=network-online.target

[Service]
User=$USER
ExecStart=/home/$USER/go/bin/bitsongd start
Restart=always
RestartSec=3
LimitNOFILE=10000

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

{% endcode %}

{% code title="Enable Bitsong Node In Background" fullWidth="true" %}

```
sudo systemctl enable bitsongd
```

{% endcode %}
{% endtab %}

{% tab title="Step 4" %}
{% code title="Initialize Bitsong Node" fullWidth="true" %}

```
bitsongd config chain-id bitsong-2b
bitsongd init "your node name" --chain-id bitsong-2b
```

{% endcode %}

{% code title="Set Gas Price" fullWidth="true" %}

```
sed -i 's|^minimum-gas-prices *=.*|minimum-gas-prices = "0.0026ubtsg"|g' $HOME/.bitsongd/config/app.toml
```

{% endcode %}

{% code title="Get Genesis" fullWidth="true" %}

```
 wget https://snapshot.safeblock.space/bitsong/genesis.json -P $HOME/.bitsongd/config
```

{% endcode %}
{% endtab %}

{% tab title="Step 5" %}
Start by StateSync or Snapshot

{% content-ref url="state-sync" %}
[state-sync](https://docs.safeblock.space/mainnet-networks/bitsong/guides/state-sync)
{% endcontent-ref %}

{% content-ref url="snapshot" %}
[snapshot](https://docs.safeblock.space/mainnet-networks/bitsong/guides/snapshot)
{% endcontent-ref %}
{% endtab %}

{% tab title="Step 6" %}
{% code title="Start Bitsong Node" fullWidth="true" %}

```
sudo systemctl start bitsongd && sudo journalctl -fu bitsongd -o cat
```

{% endcode %}
{% endtab %}
{% endtabs %}
