> For the complete documentation index, see [llms.txt](https://nodebook-xyz.gitbook.io/hydradx/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://nodebook-xyz.gitbook.io/hydradx/english/node-set-up.md).

# Node set up

{% hint style="success" %}
Now you can use [official documentation](https://docs.hydradx.io/node_setup).

I was glad to help you ;)
{% endhint %}

{% hint style="warning" %}
It is recommended to use **Ubuntu 20.04**‌
{% endhint %}

Setting up an environment:

```
sudo apt-get update
curl https://getsubstrate.io -sSf | bash -s -- --fast 
source ~/.cargo/env
```

Clone repo and build the node:

```
git clone https://github.com/galacticcouncil/HydraDX-node.git
cd HydraDX-node
cargo build --release
```

If you get an error that `git` is not installed on your system, install it:

```
sudo apt install git
```

To run a benchmark Python 3.8+  is required.‌&#x20;

Installing Python 3.9:

```
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.9
```

If you have problems installing via `apt` you can compile `python3.9` from source according to the [guide](https://linuxize.com/post/how-to-install-python-3-9-on-ubuntu-20-04/#installing-python-39-on-ubuntu-from-source).‌

If you have different versions of Python installed and the benchmark runs on the old one by default, you can specify which version to use to run it:

```
sed -i "s|python3 |python3.9 |g " ./scripts/check_performance.sh
```

Run the benchmark:

```
./scripts/check_performance.sh
```

If you get an error `Toolchain ...... Nightly toolchain required`:

```
git fetch
git checkout bench-perf-update
./scripts/init.sh
rustup default nightly
./scripts/check_performance.sh
```

After a few minutes you will get a result like:

```
HydraDX Node Performance check ...
Running benchmarks - this may take a while...
Results:
         Pallet          |   Time comparison (µs)    |     diff*     |
amm                      |     1030.0 vs 1035.2      |      -5       |     OK
exchange                 |    1108.08 vs 1109.01     |       0       |     OK
transaction_multi_payment|      281.0 vs 277.87      |       3       |     OK
```

If all 3 results are OK, your server has successfully passed the test and is ready to start the node.

{% hint style="success" %}
At this stage you can stop until the HydraDX team publishes information about the upcoming testnet.
{% endhint %}

As a test, you can run a `stakenet` node in the `lerna` chain.

{% hint style="info" %}
I recommend using tmux or systemd
{% endhint %}

```
./target/release/hydra-dx --chain lerna
```

If you want to set a **name** for your node (by default, a random one is generated on every startup), use the --name key:

```
./target/release/hydra-dx --chain lerna --name "User #NodeBook"
```

> I will really appreciate it if you include the **#NodeBook** hashtag in the node name :)

The list of nodes in the network can be found [**here**](https://telemetry.polkadot.io/#list/HydraDX%20Snakenet).‌

If your node is running "strange", you can restart it and display the logs to identify problems:

```
RUST_LOG=debug RUST_BACKTRACE=1 ./target/release/hydra-dx -lruntime=debug  --chain lerna
```
