> For the complete documentation index, see [llms.txt](https://services.stakeangle.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://services.stakeangle.com/mainnets/omniflix/installation.md).

# 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. **Build the binary from source.**

```
git clone https://github.com/OmniFlix/omniflixhub
cd omniflixhub
git checkout v5.0.1
make install
omniflixhubd version
```

4. **Initialize your node.**

```
omniflixhubd config chain-id omniflixhub-1
omniflixhubd init <node_name> --chain-id omniflixhub-1
```

5. **Download genesis.**

```
curl https://raw.githubusercontent.com/OmniFlix/mainnet/main/omniflixhub-1/genesis.json > $HOME/.omniflixhub/config/genesis.json
```

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

```
SEEDS="9d75a06ebd3732a041df459849c21b87b2c55cde@35.187.240.195:26656,19feae28207474eb9f168fff9720fd4d418df1ed@35.240.196.102:26656"
sed -i.bak -e "s/^seeds *=.*/seeds = \"$SEEDS\"/" $HOME/.omniflixhub/config/config.toml
```

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

```
sed -i.bak -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.001uflix\"/;" ~/.omniflixhub/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/.omniflixhub/config/app.toml
sed -i -e "s/^pruning-keep-recent *=.*/pruning-keep-recent = \"$pruning_keep_recent\"/" $HOME/.omniflixhub/config/app.toml
sed -i -e "s/^pruning-keep-every *=.*/pruning-keep-every = \"$pruning_keep_every\"/" $HOME/.omniflixhub/config/app.toml
sed -i -e "s/^pruning-interval *=.*/pruning-interval = \"$pruning_interval\"/" $HOME/.omniflixhub/config/app.toml
```

9. **Create service file.**

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

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

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

10. **Enable and start service.**

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

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