> 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-mainnet/building-and-running-from-source-advanced.md).

# Building and running from source \[advanced]

The differences with the Testnet procedure as as follows:

**The code version**

In the `aleph-node` repository, you need to checkout the tag returned by <https://alephzero.org/developers#developer-resources> (Mainnet section).

**Environment variables**

Same as on the Testnet.

**The database snapshot**

Needs to be downloaded from: <https://azero-snapshots.dev/mainnet/rocksdb-pruned.html> This link will always point to the latest version of the snapshot, taken weekly.

You need to save it to `chains/mainnet` in your data directory.

**The chainspec**

You can download the chainspec from: <https://raw.githubusercontent.com/Cardinal-Cryptography/aleph-node/r-15.2.0/bin/node/src/resources/mainnet_chainspec.json> , where `r-15.2.0`is Mainnet version tag taken from <https://alephzero.org/developers#developer-resources> (Mainnet section).

**The bootnodes**

In your environment, set the `BOOT_NODES` to:

```bash
BOOT_NODES=/dns4/bootnode-eu-central-1-0.azero.dev/tcp/30333/p2p/12D3KooWEF1Eo7uFZWdqFsTPP7CehpRt5NeXFwCe3157qpoU5aqd/dns4/bootnode-eu-central-1-1.azero.dev/tcp/30333/p2p/12D3KooWSeKnKHwumcVuWz2g5wn5xyWZpZJzuZXHJrEdpi8bj4HR/dns4/bootnode-us-east-1-0.azero.dev/tcp/30333/p2p/12D3KooWFQSGvQii2gRGB5T4M6TXhM83JV4bTEhubCBpdoR6Rkwk/dns4/bootnode-us-east-1-1.azero.dev/tcp/30333/p2p/12D3KooWSX2TbzpengsKsXdNPs6g2aQpp91qduL5FPax2SqgCaxa
```


---

# 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:

```
GET https://docs.alephzero.org/aleph-zero/use/validate/running-an-aleph-node-on-mainnet/building-and-running-from-source-advanced.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.
