# 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="/files/MXXKRyxl9RiOntLyaMZa" 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="/files/QCUGj0kPVWGI6AEAMXxu" 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="/files/3grMu2M4oPLtOEVl6B4p" 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="/files/29kyKYVylSj96Vj2SrNO" alt=""><figcaption></figcaption></figure>


---

# 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.oortech.com/oort/infra/witnesses-nodes/run-a-witness-node.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.
