# Testnet

First we need to install **Node.js**. If you are not tech-savvy, don't worry, it's straight-forward. If you already have Node installed, you can skip its installation and move straight to the Pear installation.

Important: Do NOT apply the below inside trac-msb folders if you previously created a validator for Hypermall. Follow the docs below on what folder names to use as suggestion so there won't be no collision.

### **Prerequisites**

&#x20;\- On Windows you should install `git` . Please follow offical [documentation](https://git-scm.com/install/windows).

### **Windows**

Open a PowerShell (right click > run as admin) and enter:

```powershell
# allow script execution
# if you are an admin, you may use more restricted settings based on your dev op rules
Set-ExecutionPolicy Unrestricted

# Download and install fnm:
winget install Schniz.fnm

# set some environment options
fnm env --use-on-cd | Out-String | Invoke-Expression

# Download and install Node.js:
fnm install 22

# Verify the Node.js version:
node -v # Should print a version like "v22.14.0".

# Verify npm version:
npm -v # Should print a version like "10.9.2".
```

### **MacOS/Linux**

Open a terminal/console and enter:

```bash
# Download and install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash

# in lieu of restarting the shell
\. "$HOME/.nvm/nvm.sh"

# Download and install Node.js:
nvm install 22

# Verify the Node.js version:
node -v # Should print a version like "v22.15.0".

nvm current # Should print a version like "v22.15.0".

# Verify npm version:
npm -v # Should print a version like "10.9.2".
```

Once you confirmed the commands "node -v" and "npm -v" return no error but print a version number,  we can proceed.\
Should curl for some reason not exist, then install it first. If it is missing on MacOS, you can try "/usr/bin/curl" instead of just "curl".

### **Installing Pear Runtime**

Next is installing the **Pear Runtime**. The MSB runs on top of it and allows for efficient MSB execution. In principle running the MSB using plain Node works, but it is recommended to use Pear.

Simply execute the following in your shell / console / terminal:

```bash
npm i -g pear
pear -v
```

If pear asks you to set the paths after installation, please execute the "export" command that is provided.

"pear -v" should print the current version that you installed and you're ready to continue installing the MSB. It is important that you use the exact version of the MSB as this is the final release that everyone running an MSB must be operating on:

### **Install Testnet MSB Validator**

Run the following commands:

```
git clone https://github.com/Trac-Systems/main_settlement_bus.git msb-testnet
cd msb-testnet
git fetch --tags
git checkout -B 0.2.17 v0.2.17
npm install
npm run start -- --stores-directory ./experimental_store --network testnet
```

### **Post Install**

`npm run start` starts the MSB in the current directory `.` and `experimental_store` is the name of the database (located in `experimental_store/testnet`). The database also contains a backup of your identity.&#x20;

**Note:** To run multiple instances, simply use a different store name than `experimental_store`. You will need to run multiple instances if you own more than one license, because each validator has its associated identity.

After the MSB started the first time without identity, you should see the following information:

<figure><img src="/files/M38nukTasibz2iMIgSGc" alt=""><figcaption></figcaption></figure>

Please type `1` and hit enter and show you the seed phrase.

The MSB has been fully started if you something like this (`isWriter`: false and balance `0` on new setups):

<figure><img src="/files/fxvstcSRutNIeKx6JG4p" alt=""><figcaption></figcaption></figure>

o stop your MSB, enter "/exit" (use the CTRL + C keys on your keyboard only as last resort).&#x20;

To restart use the exact same start parameters you used earlier from within your MSB installation folder.

### **Getting Whitelisted**

We are assuming that your MSB instance (your MSB Address) isn't whitelisted yet. You will need a minimal amount of $tTNK to complete the whitelist. You can fund your testnet address (highlighted) with our [faucet](https://faucet.trac.network/).\
\
You can find your transactions on the [testnet explorer](https://testnet.trac.network/). **TAP wallet** supports testnet.\
\
If you want to become TESTNET validator, then please ask then please ask the team in the Trac Network [Discord](https://discord.gg/trac).<br>

Once received, you will be added to the whitelist after some processing time (up to 24 hours). Once added, type  the command `/add_writer` and hit enter. After a few seconds you should see a confirmation about your MSB being added.&#x20;

From that moment on, every transaction that your MSB validates will add to your fee balance for your MSB Address. You can use the built-in wallet features to get balances and perform transfers.

<mark style="color:red;">**Important:**</mark>**&#x20;Never USE YOUR MAINNET private keys on TESTNET. Just generate new seedphrase again.**

### Further Information

*This guide covers the basic steps to install and run an MSB validator node.*

*If you would like to learn more or explore additional configuration options, please refer to the official* [*repository*](https://github.com/Trac-Systems/main_settlement_bus)*.*


---

# Agent Instructions: 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:

```
GET https://docs.trac.network/documentation/validators/installation/testnet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
