* Split website in 4: - build - run node - learn - research * only show pages of section in sidebar * home button on each sidebar * index.md for homepages * Add video tutorials * delete old getting-started * rename to "Waku node" * fix nwaku compose * add to dict * script revert research changes * fix broken links * move research index content * move research folder under learn * move research folder under learn: side bar and buttons * remove pointless links
4.1 KiB
| title | hide_table_of_contents | displayed_sidebar |
|---|---|---|
| Run Nwaku with Docker Compose | true | runNode |
nwaku-compose is a ready-to-use Docker Compose setup that configures the following automatically:
nwakunode running Relay and Store protocols with RLN enabled.- Simple frontend to interact with the node and Waku network to send and receive messages.
- Grafana metrics dashboard for advanced users and node operators to monitor the node.
Video tutorial
:::tip Check out the Waku Node Operator Cheatsheet to learn how to easily run, monitor, and interact with a node. :::
Prerequisites
- Git or GitHub Desktop
- Docker and Docker Compose
- Linea Sepolia RPC endpoint: You can get a free endpoint from Infura or any other Linea Sepolia RPC provider.
:::info
We recommend running a nwaku node with at least 2GB of RAM, especially if WSS is enabled. If running just a Relay node, 0.5GB of RAM is sufficient.
:::
Clone the repository
git clone https://github.com/waku-org/nwaku-compose
cd nwaku-compose
Configure the setup
Docker Compose reads the .env file from the filesystem. You can use .env.example as a template to provide the configuration values. The recommended process for working with .env files is to duplicate .env.example, rename it as .env, and then make the necessary value edits.
cp .env.example .env
${EDITOR} .env
:::caution
Ensure that you do NOT include any secrets in the .env.example file, as it could accidentally be shared in your Git repository.
:::
Run the node
Launch all the processes: nwaku node, database for storing messages, and Grafana for metrics with the following command. Your RLN membership is loaded into nwaku under the hood:
docker-compose up -d
View the logs of the node to confirm that it is running correctly:
docker-compose logs -f nwaku
Monitor the node
Visit http://localhost:3000/d/yns_4vFVk/nwaku-monitoring to view your node metrics in real time.
:::tip
To access Grafana from outside your machine, remove 127.0.0.1 and open the port. Consider setting up a password for Grafana to ensure security.
:::
Interact with the node
Your nwaku node provides a REST API on port 8645 for interacting with it:
# Get nwaku version
curl --location 'http://127.0.0.1:8645/debug/v1/version'
# Get nwaku info
curl --location 'http://127.0.0.1:8645/debug/v1/info'
Retrieve messages sent to a contentTopic. Please note that this query can be made to any Store node within the network:
curl --location 'http://127.0.0.1:8645/store/v1/messages?contentTopics=%2Fmy-app%2F2%2Fchatroom-1%2Fproto&pageSize=50&ascending=true' \
--header 'Accept: application/json'
:::tip If you encounter issues running your node or require assistance with anything, please visit the - Visit the #help-desk channel on Discord. :::
:::tip Congratulations!
You have successfully started a nwaku node with RLN enabled using Docker Compose. Have a look at the Node Configuration Examples and Advanced Configuration guides to learn how to configure nwaku for different use cases.
:::
