# Installation

**Step 1: Update and install packages for compiling**

```
sudo apt update && sudo apt upgrade -y
sudo apt install curl git wget htop tmux build-essential jq make lz4 gcc unzip -y
```

**Step 2: Install Rust**

```php
curl https://sh.rustup.rs -sSf | sh
```

Select 1 and enter

**Step 3: Go to home**

```php
source $HOME/.cargo/env
```

**Step 4: Update rust**

```php
rustup update nightly
```

**Step 5: Add tools**

```php
rustup target add wasm32-unknown-unknown --toolchain nightly
```

**Step 6: Access Avail folder**

```php
mkdir avail
cd avail
```

**Step 7: Download Binary**

```
wget https://github.com/availproject/avail/releases/download/v2.2.5.1/x86_64-ubuntu-2204-avail-node.tar.gz
```

**Step 8: Extract**

```
tar -xf x86_64-ubuntu-2204-avail-node.tar.gz
```

**Step 9: run node**

```php
./avail-node --chain mainnet --name "Validator Moniker" --validator -d ./node-data
```

CTRL + C to escape (You need to run validator to your system to make system running 24/7)

**Step 10: Edit service file**

```php
sudo nano /etc/systemd/system/availd.service
```

*Change your Validator Moniker*

```php
[Unit]
Description=Avail Validator
After=network.target
StartLimitIntervalSec=0
[Service]
User=root
ExecStart= /root/avail/avail-node -d /root/avail/node-data --chain mainnet --validator --name "Validator Moniker"
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
```

**Step 11: Enable the service file**

```php
sudo systemctl daemon-reload
sudo systemctl enable availd.service
```

**Step 12: Start service file**

```php
sudo systemctl start availd.service
```

**Step 13: Check status of service**

```php
sudo systemctl status availd.service
```

**Step 14: Check logs**

```php
journalctl -f -u availd
```

Thank's to ADAM\_VNBnode for the guide it's very clear and we reshare for our community \
Source : <https://github.com/vnbnode/VNBnode-Guides/blob/main/Mainnet/Avail/avail_mainnet.md>
