2023-06-14 04:34:58 +01:00
---
title: Build Nwaku from Source
---
2023-06-15 17:28:53 +01:00
This guide provides detailed steps to build a `nwaku` node from the source to access the latest development version or a specific commit or tag of `nwaku` . If you prefer a more stable version, [download a pre-compiled binary ](https://github.com/waku-org/nwaku/tags ) instead.
2023-06-14 04:34:58 +01:00
2023-06-15 17:28:53 +01:00
:::info
2023-06-18 09:34:09 +01:00
A minimum of 2GB of RAM is required to build `nwaku` .
2023-06-15 17:28:53 +01:00
:::
2023-06-14 04:34:58 +01:00
## Install Dependencies
2023-06-14 13:08:58 +01:00
To clone and build nwaku, you will need the standard developer tools, including a C compiler, Make, Bash, and Git.
2023-06-14 04:34:58 +01:00
#### Linux
2023-06-15 03:09:14 +01:00
To install the dependencies on common Linux distributions, use:
2023-06-14 04:34:58 +01:00
```mdx-code-block
import Tabs from '@theme/Tabs ';
import TabItem from '@theme/TabItem ';
```
< Tabs >
< TabItem value = "debian" label = "Debian and Ubuntu" >
```bash
sudo apt-get install build-essential git
```
< / TabItem >
< TabItem value = "fedora" label = "Fedora" >
```bash
dnf install @development -tools
```
< / TabItem >
< TabItem value = "arch" label = "Arch Linux" >
```bash
2023-06-15 03:09:14 +01:00
# Using your favorite AUR helper
2023-06-14 13:08:58 +01:00
[AUR HELPER] -S base-devel
2023-06-14 04:34:58 +01:00
```
< / TabItem >
< / Tabs >
#### macOS
2023-06-15 03:09:14 +01:00
If you use [Homebrew ](https://brew.sh/ ) to manage packages, use:
2023-06-14 04:34:58 +01:00
```bash
brew install cmake
```
## Clone the Repository
Get the source code from the GitHub repository. The default branch is `master` , the release candidate for major updates.
```bash
git clone https://github.com/waku-org/nwaku
cd nwaku
```
2023-06-14 13:08:58 +01:00
:::tip
2023-06-14 04:34:58 +01:00
You can use `git tag -l` to check specific version tags.
:::
## Build the Binary
2023-06-15 17:28:53 +01:00
Build the `nwaku` binary:
2023-06-14 04:34:58 +01:00
```bash
make wakunode2
```
2023-06-14 13:08:58 +01:00
The first `make` invocation updates to all Git submodules. After each `git pull` , run `make update` to keep the submodules updated in the future.
2023-06-14 04:34:58 +01:00
```bash
make update wakunode2
```
## Run the Binary
2023-06-15 03:09:14 +01:00
Nwaku will create the `wakunode2` binary in the `./build/` directory.
2023-06-14 04:34:58 +01:00
```bash
2023-06-15 03:09:14 +01:00
# Run with default configuration
2023-06-14 04:34:58 +01:00
./build/wakunode2
2023-06-15 03:09:14 +01:00
# See available command line options
./build/wakunode2 --help
2023-06-14 04:34:58 +01:00
```
To learn more about running nwaku, please refer to:
- [Run a Nwaku Node ](/guides/run-nwaku-node#run-the-node )
2023-06-18 09:34:09 +01:00
- [Run Nwaku in a Docker Container ](/guides/nwaku/run-docker )
2023-06-15 03:09:14 +01:00
- [Run Nwaku with Docker Compose ](/guides/nwaku/run-docker-compose )
2023-06-15 21:42:35 +01:00
- [Node Configuration Methods ](/guides/reference/node-config-methods )
2023-06-14 04:34:58 +01:00
## Run Test Suite
2023-06-15 17:28:53 +01:00
Run the tests for both `Waku v1` and `Waku v2` :
2023-06-14 04:34:58 +01:00
```bash
make test
```