# Running the binary

#### File descriptor limit

Since you are not running the node in a docker, there is one additional OS level configuration you have to take care of. The node uses a lot of file descriptors, both for network connections as well as database handling. To check the limit run:

```bash
ulimit -Hn
```

If the returned value is at least 10000 you are set. Otherwise increase the limit to the recommended value by running:

```bash
DESCRIPTOR_CONFIG="$USER hard nofile 10000"
sudo echo $DESCRIPTOR_CONFIG >> /etc/security/limits.conf
```

Relogin and check the limit again to ensure the change took effect.

#### Run!

First, source the script you created two chapters back and set the config variables:

```bash
source set_env.sh
```

Once all of the variables mentioned in the previous chapters are set, you can start the node with the following command:

```bash
aleph-node \
  --validator \
  --enable-pruning \
  --database rocksdb
  --execution Native \
  --database paritydb \
  --name "${NAME}" \
  --base-path "${BASE_PATH}" \
  --pool-limit "${POOL_LIMIT}" \
  --chain "${CHAIN}" \
  --node-key-file "${NODE_KEY_PATH}" \
  --backup-path "${BACKUP_PATH}" \
  --rpc-port "${RPC_PORT}" \
  --ws-port "${WS_PORT}" \
  --port "${PORT}" \
  --validator-port "${VALIDATOR_PORT}" \
  --public-addr "${PUBLIC_ADDR}" \
  --public-validator-addresses "${PUBLIC_VALIDATOR_ADDRESS}" \
  --rpc-cors all \
  --no-mdns \
  --ws-max-connections "${WS_MAX_CONNECTIONS}" \
  --enable-log-reloading \
  --rpc-methods Unsafe \
  --bootnodes "${BOOT_NODES}" \
  --telemetry-url "${TELEMETRY_URL} ${TELEMETRY_VERBOSITY_LEVEL}" > ${LOG_FILE} 2>&1
```

#### Further improvements

We recommend restarting the node automatically whenever it crashes. This is a rare occurrence, but were the node to crash you might miss the performance targets for a session and receive lower rewards. You should also set up some monitoring to check whether the node operates correctly – the prometheus endpoint is likely to be useful – including checking for crashloops. The details of such setups are beyond the scope of this guide.


---

# 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.alephzero.org/aleph-zero/use/validate/running-an-aleph-node-on-testnet/building-and-running-from-source-advanced/running-the-binary.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.
