# Run a witness node

## Set up a machine

To reliably run a witness node, you need to set up a machine in a cloud environment or a local data center. For optimal performance, the machine should meet the following minimum hardware specifications:

```
8-core CPU
32GB of RAM
2TB SSD
Network capacity of 100MB for inbound and outbound traffic
```

Nodes that do not meet these minimum requirements may experience reduced performance in block sealing, which could result in a lower reward for serving as a witness. The operation system of the machine could be either Linux or Windows.

## Build OORT node

Download the source code from [OORT Olympus GitHub repository](https://github.com/oort-tech/Olympus) and follow the instructions in the README to build the node. Once built, the compiled executable, `mcp`, will be located in the `build` folder. You can move `mcp` to any directory where you want the executable to reside.

If you are running the node on Linux, you can alternatively download the pre-compiled `mcp` executable from [OORT Olympus Releases](https://github.com/oort-tech/Olympus/releases).

## Create a witness account and export the keystore file

Step 1: Create a wallet account in OORT wallet

<figure><img src="https://3042436831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpto8YiwmW5zJgzTZg5nU%2Fuploads%2F9AeCHbzGS2u8ckSyDGS7%2Fimage.png?alt=media&#x26;token=00ce994b-bbbb-4bd5-bc63-1c6bdcab64c1" alt=""><figcaption></figcaption></figure>

Step 2: Export the account into a keystore file. You should specify a password for the file when you exporting it.

<figure><img src="https://3042436831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpto8YiwmW5zJgzTZg5nU%2Fuploads%2F9Sc1pPY55xpRLTV8cRcf%2Fimage.png?alt=media&#x26;token=d4bc132c-2a67-4301-8917-1ee775db5ee9" alt=""><figcaption></figcaption></figure>

Step 3: Copy the content of the keystore and save it to keystore.json file.

## Run the node as a witness

Step 1: Copy the saved keystore.json to the node machine.

Step 2: Identify a folder that will be set as the `<Your data path>` to store the configuration and local data of the node.

Step 3: Import the keystore file by running `./mcp --data_path=<Your data path> --account_import --file=<Your keystore file>`

Step 4: Modify `config.json` file in `<Your data path>`. Under the witness tag, set `witness` to be `true`, and `witness_account` set to be `<Your witness account address>` that was just created in Ale wallet. Leave the `password` field be empty.&#x20;

<figure><img src="https://3042436831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpto8YiwmW5zJgzTZg5nU%2Fuploads%2FbH89JiPjq5ElI8cINV8h%2FScreenshot%202024-08-12%20at%207.58.31%E2%80%AFPM.png?alt=media&#x26;token=534cf04b-ca6e-4b44-9801-b1dcf680f925" alt=""><figcaption></figcaption></figure>

&#x20;Step 5:  Run `./mcp --daemon --data_path=<Your data path>` It will be prompted asking for the password of the witness, which is the password of the keystore file.\
\
Step 6: To keep run the `mcp` in the background even when the terminal is killed. First, press `CTRL+D.`Then, type `bg %1` and then `disown %1` in then terminal`.`

<figure><img src="https://3042436831-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fpto8YiwmW5zJgzTZg5nU%2Fuploads%2F0vrer8PW7km0xCVhkDfw%2FScreenshot%202024-08-12%20at%208.22.03%E2%80%AFPM.png?alt=media&#x26;token=b08e949d-afda-431f-80f6-009ff43dbf70" alt=""><figcaption></figcaption></figure>
