---
title: Validator Installation
slug: validator-installation
description: Set up your Xandeum DevNet validator with ease using this comprehensive document. From user installation to downloading the Xandeum release, this guide covers it all. Discover the steps for creating a user, adding to the sudo group, and switching to the X
docTags: 
createdAt: 2023-08-19T03:02:55.649Z
---

# How To Setup a Xandeum DevNet Validator

:::hint{type="info"}
**NOTE:** This guide shows commands for text editors `nano` and `vim`. A quick search can find a guide or video to operate these text editors more efficiently and make your life easier.
:::



##

## 1) Update and setup our user

Start with a fresh instance of Linux as the `root` user.&#x20;

These instructions use [Ubuntu Server 22.04.2LTS](https://ubuntu.com/download/server)

:::hint{type="danger"}
BEFORE YOU CONTINUE!

Make sure you see your entire drive space as available!
Use `df -h` to see your free space. You want to see that you have all your space in a free partition. Ubuntu will want to default to 100g LVM. The preferance is to eliminate LVM and Raid and use all available space for your `/` mount point. If you don't show all your disk space, run the Ubuntu installer again and pay attention to the storage section.
:::



Get `root` user

:::hint{type="warning"}
Run as `sudo` or `root` user. If you don't have access to the root user, then you will need to prepend all your requests in this section with sudo.&#x20;

Notice in the screenshot below I start as user `sol`change to `root` user then back to `sol`.&#x20;

Root user has ALL the privledges and won't require sudo. But some items NEED to be ran as the `sol` user (ie rust install, validator build, etc)

Use `sudo -i` to change to root user and `exit` to end root user
:::

![](https://api.archbee.com/api/optimize/ePevXmvzgG-7aqJ72Gpg_/0naV05D9KRSBrRYLcDmc6_image.png)

Update your installation

:::CodeblockTabs
CLI

```linux
sudo apt-get update -y && 
sudo apt-get upgrade -y
```
:::

Install a few apps

:::CodeblockTabs
CLI

```linux
sudo apt install -y bzip2 vnstat
```
:::

:::CodeblockTabs
CLI

```linux
sudo systemctl enable --now vnstat
```
:::



Create Xandeum Validator User Account

:::hint{type="info"}
Skip creating a user if you already have it
:::



:::CodeblockTabs
CLI

```linux
sudo adduser sol
```
:::

:::hint{type="info"}
Enter a password and accept defaults to the following questions:

`New password:`
` Retype new password:`
` passwd: password updated successfully`
` Changing the user information for xand`
` Enter the new value, or press ENTER for the default`
`        Full Name []:`
`        Room Number []:`
`        Work Phone []:`
`        Home Phone []:`
`        Other []:`
`Is the information correct? [Y/n] y`
:::



Add new user to sudo group

:::CodeblockTabs
CLI

```linux
sudo usermod -aG sudo sol
```
:::

Change to the New User account

:::CodeblockTabs
CLI

```linux
su sol
```
:::



Switch the Xand home directory.&#x20;

:::hint{type="warning"}
NOTE: If you log in as `root` and switch to `sol` it will bring you into the `/root` dir!
So use `cd ~` to get to home dir each time you log in!
:::



:::CodeblockTabs
CLI

```linux
cd ~
```
:::

Test switching between `root` user and `xand` user

:::hint{type="info"}
Note: When you are root user, your line starts with `root` and when you are `sol` user the line starts with `sol`
:::



:::CodeblockTabs
CLI

```linux
sudo -i
```
:::

:::CodeblockTabs
CLI

```linux
exit
```
:::

::Image[]{src="https://api.archbee.com/api/optimize/ePevXmvzgG-7aqJ72Gpg_/L8iW3GIWRsQUv5WWq8h7q_image.png" size="54" width="319" height="257" position="center" showCaption="false"}

***

## 2) Choose which release you want to install

Go to the Xandeum Binaries repo and download the `tar.bz2` file to your server.
This guide is using version `v2.2.0-xandeum_c9b4b31d` but check for newer releases.
You can right-click on the file name to copy the download link.
[https://github.com/Xandeum/binaries/releases](https://github.com/Xandeum/binaries/releases)

![](https://api.archbee.com/api/optimize/ePevXmvzgG-7aqJ72Gpg_/tCNY--uFnEvrP5T_oDnoJ_image.png)

Set the version and filename variables

```none
ver="v2.2.0-xandeum_b5f66263"
file="v2.2.0-xandeum_b5f66263.tar.gz"
echo -e "\n"
echo version=$ver;
echo filename=$file
echo -e "\n"
```

:::CodeblockTabs
CLI

```linux
cd ~
wget https://github.com/Xandeum/binaries/releases/download/$ver/$file
```
:::

Create the needed `bin` folder

:::CodeblockTabs
CLI

```linux
mkdir ~/.local/share/xandeum/install/releases/$ver -p
```
:::

Extract the file into the new `bin` dir

Add a directory for connection info

:::CodeblockTabs
CLI

```linux
sudo mkdir -p /var/run/xandeum && chown sol:sol /var/run/xandeum && chmod 755 /var/run/xandeum
```
:::

Test a binary by running it in the local folder

:::CodeblockTabs
CLI

```linux
cd ~/.local/share/xandeum/install/releases/$ver/bin
```
:::

:::CodeblockTabs
CLI

```linux
./agave-validator -V
```
:::

![](https://api.archbee.com/api/optimize/ePevXmvzgG-7aqJ72Gpg_/Zg1G_q1M41LRxKRSzVYUj_image.png)

Remove downloaded file if binaries are working

:::CodeblockTabs
CLI

```linux
rm ~/$file
```
:::

### Set our symlink, PATH, and some convenient aliases

Set a symlink from our new release to the active\_release folder we will use in our `$PATH` later. (This command removes an old symlink to `active_release` if it exists)

:::CodeblockTabs
CLI

```linux
rm /home/sol/.local/share/xandeum/install/releases/active_release
ln -sf /home/sol/.local/share/xandeum/install/releases/$ver/bin /home/sol/.local/share/xandeum/install/releases/active_release
```
:::

Backup the old $PATH for reference.

:::CodeblockTabs
CLI

```linux
echo $PATH >> ~/PATH.bak
```
:::

Using your favorite editor to open the bashrc config:

:::CodeblockTabs
nano

```linux
nano ~/.bashrc
```

vim

```linux
vim ~/.bashrc
```
:::

Add the following lines at the very bottom and save your changes and exit.

:::CodeblockTabs
text

```linux
export PATH="/home/sol/.local/share/xandeum/install/releases/active_release:$PATH"
alias l="ls -a --color=auto"
alias ll="ls -alh --color=auto"
alias sv="solana validators --sort skip-rate --reverse"
alias sg="solana gossip"
alias se="solana epoch-info"
alias sb="solana balance"
```
:::

:::CodeblockTabs
CLI

```linux
source ~/.bashrc
```
:::

### Check your Install of the software

As `sol` user, time to test if everything worked.

:::CodeblockTabs
CLI

```linux
cd ~
agave-validator -V
```
:::

- Check Xandeum Software Version:
- Results should appear simlar to the following (check for correct version and src)

:::hint{type="success"}
![](https://api.archbee.com/api/optimize/ePevXmvzgG-7aqJ72Gpg_/1gHanX3GhgGWC68Wc98dM_image.png)
:::



***

##

## 3) Configure your validator instance.

:::hint{type="danger"}
Please observe proper security of your private keys!&#x20;

MainNet Keys should be created on a secure machine, not an unknown remote machine.

Record your 12 words (and bip39 passphrase) in a safe spot. For DevNet it's not critical if you lose them...but if on MainNet, losing the keys equals LOST FUNDS. There is no recovering from lost keys.

- For MainNet, your withdraw authority key should never be on your machine!
:::



### Generate your 3 DevNet keys.

:::hint{type="success"}
NOTE: If you already have created keys on this machine from the previous install,&#x20;
**DON'T CREATE NEW ONES!**
Skip to [Switch to Xandeum Cluster](https://docs.xandeum.com/xand-dev-v01/validator-v01-installation#jYB2c) instead.
:::



:::hint{type="info"}
- You can leave the  bip39 passphrase empty (only applies to DevNet/TesNet since it is not real money).
- Your 12 words and pubkey are shown immediatly after the prompt for bip39 passphrase.
- Take note of the public key it provides you (copy it down). It will help us help you should there be an issue.
:::

:::hint{type="warning"}
Run as `sol` user!
:::



:::CodeblockTabs
CLI

```linux
cd ~
```
:::

Create your3 keys...note down all 3 keyphrases before you continue on.

:::CodeblockTabs
CLI

```linux
solana-keygen new -o ~/validator-keypair.json
solana-keygen new -o ~/vote-keypair.json
solana-keygen new -o ~/withdraw-keypair.json
```
:::

To view your public key later

:::CodeblockTabs
CLI

```linux
solana-keygen pubkey ~/validator-keypair.json
```
:::

View your current configuration information

:::CodeblockTabs
CLI

```linux
solana config get
```
:::

### Switch to Xandeum cluster

:::CodeblockTabs
CLI

```linux
solana config set --url https://api.devnet.xandeum.com:8899
```
:::

### Set your new keypair to be used by default.

:::CodeblockTabs
CLI

```text
solana config set --keypair ~/validator-keypair.json
```
:::

### Testing our work so far.

- Check your connecrtion to the cluster

```linux
solana gossip
```

- Request an airdrop from the Xand Faucet

:::CodeblockTabs
CLI

```linux
solana airdrop 1 ~/validator-keypair.json
```
:::

Do this again 4 more times. (We are also giving you fake SOL tokens to get started.)

- There is a daily limit per wallet...These tokens on TestNet/DevNet are not real.

### Check your wallet balance.

:::CodeblockTabs
CLI

```linux
solana balance
```
:::

You should have \~5 tokens present if you do it 5x's.



### Create your vote account.

- Submit a transaction on the blockchain setting up your vote account

:::CodeblockTabs
CLI

```linux
solana create-vote-account --commission 0 ~/vote-keypair.json ~/validator-keypair.json ~/withdraw-keypair.json
```
:::

To find your Vote Account Pubkey later, use:

:::CodeblockTabs
CLI

```linux
solana-keygen pubkey ~/vote-keypair.json
```
:::

***

##

## 4) Configure your Start Script Configuration

### Create your validator configuration file using your editor

:::CodeblockTabs
nano

```linux
nano ~/validator-start.sh
```

vim

```linux
vim ~/validator-start.sh
```
:::

- There will be nothing in here, so copy and paste in the following configurations. Save and Exit.

:::CodeblockTabs
text

```none
#!/bin/bash
exec agave-validator \
        --known-validator G6x4w89TJA9oDBSRNcpeanaThqBUJbEv5DJRBZGrQHYV \
        --known-validator 5PW1SsXftQqKLF9FU88898BMG1vv3tqYRrVkGkFRwobs \
        --known-validator 96wn2RrHFxXNMNJCN64qZCpBPCkHVTuKfWoeRTGrCdDy \
        --known-validator DiEyTNni4uPwXaj9AX4pvFWvYFY5FKLEo3RRgN6Q22Lc \
        --known-validator 9HKXdh8Veb278efwgPjsRkQtyJEGhyGP8vkbCSmp4HgR \
        --entrypoint xand-5.devnet.xandeum.com:8000 \
        --entrypoint xand-4.devnet.xandeum.com:8000 \
        --entrypoint xand-3.devnet.xandeum.com:8000 \
        --entrypoint xand-2.devnet.xandeum.com:8000 \
        --entrypoint xand-1.devnet.xandeum.com:8000 \
        --expected-shred-version 48698 \
        --expected-genesis-hash 7BNTf1Z8KDUb3yCsNiVS5XH1CxfYG3HQP2VeHMVqP7AW \
        --snapshot-interval-slots 500 \
        --full-snapshot-interval-slots 10000 \
        --identity ~/validator-keypair.json \
        --vote-account ~/vote-keypair.json \
        --ledger ~/ledger/ \
        --dynamic-port-range 8000-10000 \
        --rpc-port 8899 \
        --log ~/validator.log \
        --no-poh-speed-test \
        --limit-ledger-size 30000000

```
:::

:::hint{type="warning"}
**Note**: Every trailing `\` is important!
Any commented lines `#` must be at the bottom of the script. This is to save a command that may be needed later but not used now.
:::

:::hint{type="info"}
**Note**: Change the location of `ledger` in the script to your second drive if you aren't using raid0
:::

:::hint{type="success"}
Here are the known-validators:

xand-1 9HKXdh8Veb278efwgPjsRkQtyJEGhyGP8vkbCSmp4HgR
xand-2 DiEyTNni4uPwXaj9AX4pvFWvYFY5FKLEo3RRgN6Q22Lc  &#x20;

xand-3 96wn2RrHFxXNMNJCN64qZCpBPCkHVTuKfWoeRTGrCdDy
xand-4 5PW1SsXftQqKLF9FU88898BMG1vv3tqYRrVkGkFRwobs
xand-5 G6x4w89TJA9oDBSRNcpeanaThqBUJbEv5DJRBZGrQHYV



:::



### Make the script you just made executable.

:::CodeblockTabs
CLI

```linux
chmod a+x ~/validator-start.sh
```
:::

***

##

## 5) System Tuning

:::hint{type="warning"}
Run as `root` user, use `sudo -i`
:::



Optimize sysctl knobs (copy block and paste into teminal, press return)

:::CodeblockTabs
CLI

```linux
sudo bash -c "cat >/etc/sysctl.d/21-agave-validator.conf <<EOF
# Increase UDP buffer sizes
net.core.rmem_default = 134217728
net.core.rmem_max = 134217728
net.core.wmem_default = 134217728
net.core.wmem_max = 134217728

# Increase memory mapped files limit
vm.max_map_count = 2000000

# Increase number of allowed open file descriptors
fs.nr_open = 2000000
EOF"
```
:::

:::CodeblockTabs
CLI

```linux
sudo sysctl -p /etc/sysctl.d/21-agave-validator.conf
```
:::

Open the file `/etc/systemd/system.conf` in your editor

:::CodeblockTabs
nano

```linux
sudo nano /etc/systemd/system.conf
```

vim

```linux
sudo vim /etc/systemd/system.conf
```
:::

Add the following to the `[Manager]` section. Save and exit.

:::CodeblockTabs
CLI

```linux
DefaultLimitNOFILE=2000000
```
:::

Reload the daemon

:::CodeblockTabs
CLI

```linux
sudo systemctl daemon-reload
```
:::

Increase process file desriptor count limit. (copy block and paste into teminal, press return)

:::CodeblockTabs
CLI

```linux
sudo bash -c "cat >/etc/security/limits.d/90-agave-nofiles.conf <<EOF
# Increase process file descriptor count limit
* - nofile 2000000
EOF"
```
:::

:::hint{type="success"}
This section is complete. Exit all shells or reboot to activate changes!
:::





Continue on to [Setup System Service](docId\:pRPru_NT8eeIJyjB16Mna)



