> For the complete documentation index, see [llms.txt](https://docs.alephzero.org/aleph-zero/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.alephzero.org/aleph-zero/use/validate/running-an-aleph-node-on-testnet/building-and-running-from-source-advanced/set-environment-variables.md).

# Set environment variables

To run the node you will have to set several variables. Below you can find example configurations which you might want to tailor to your needs.

### Variables

It is the most convenient to put all of the variables into a file that you can later source, let's assume it's called `set_env.sh` and has the following contents:

```bash
export NAME="..."             # <-- FILL THIS
export PUBLIC_IP_OR_DNS="..." # <-- FILL THIS
export PUBLIC_ADDR="..."      # <-- FILL THIS
export BASE_PATH="$HOME/data" # choose any directory you'd like, `$HOME/.aleph_zero` is also a popular choice
export BOOT_NODES="/dns4/bootnode-eu-central-1-0.test.azero.dev/tcp/30333/p2p/12D3KooWRkGLz4YbVmrsWK75VjFTs8NvaBu42xhAmQaP4KeJpw1L/dns4/bootnode-us-east-1-0.test.azero.dev/tcp/30333/p2p/12D3KooWSv1nApKkcnq8ZVHJQLK5GJ4NKS9ebag9QrRTzksLTGUy"
export CHAIN="${BASE_PATH}/chainspec.json"
export NODE_KEY_PATH="${BASE_PATH}/p2p_secret"
export BACKUP_PATH="${BASE_PATH}/backup-stash"
export POOL_LIMIT="100"
export PORT="30333"
export VALIDATOR_PORT="30343"
export PUBLIC_VALIDATOR_ADDRESS="${PUBLIC_IP_OR_DNS}:${VALIDATOR_PORT}"
export RPC_PORT="9944"
export RUST_LOG="info"
export SYNC="Fast"
export TELEMETRY_URL='wss://telemetry.polkadot.io/submit/'
export TELEMETRY_VERBOSITY_LVL='0'
export VALIDATOR="true"
export RPC_MAX_CONNECTIONS="100"
export DATABASE_ENGINE="paritydb"
```

:exclamation:Note There are a couple parameters above you should fill by yourself (the first three):

1. **`NAME`** should be a name for your node. It’s mostly used for logging in various ways, so make it specific and recognizable.
2. **`PUBLIC_IP_OR_DNS`** should be set to the public, static IP of your node (or a domain name pointing to such address). Note that this should not include the port, which is specified by a separate variable (`VALIDATOR_PORT`).
3. **`PUBLIC_ADDR`** should contain a public address in the libp2p format that your node will be using. This can also be omitted: in that case it will be auto-generated.\
   The libp2p format is the following: `/ip4/<your ip>/tcp/30333` or `/dns4/<your domain>/tcp/30333` (the port number is what you set as `PORT` above).

Remember to `export` the variables for later use.

{% hint style="info" %}
Note that these variables should be available every time you run the binary, so you might want to put them in your `.bashrc` (or your shell's equivalent)&#x20;
{% endhint %}

{% hint style="info" %}
Note that the directory that's your `$BASE_PATH` has to be manually created if it doesn't exist:

`mkdir -p $BASE_PATH && cd $BASE_PATH`
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.alephzero.org/aleph-zero/use/validate/running-an-aleph-node-on-testnet/building-and-running-from-source-advanced/set-environment-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
