Skip to main content

Initialize And Run Node

This guide will help you to initialize and run the node. You can do it in two ways.

  • Using CLI
  • Using Docker compose

If this is your first time initializing the node, the process may take a little bit more time until all dependencies are downloaded. It will take around 7 minutes but can vary depending on your internet connection.

1. Initialize node​

Terminal
cargo run -p merod -- --node-name node1 --home data init --server-port 2428 --swarm-port 2528

NOTE: A --protocol flag defines protocol for the context. Currently, we support Starknet and NEAR protocol. By default, the protocol is set to NEAR protocol, but you can set it explicitly to Starknet by using the following command:

Terminal
cargo run -p merod -- --node-name node1 --home data init --server-port 2428 --swarm-port 2528 --protocol starknet

You can also view these settings in the config.toml file located within the node folder.

NearConfig >SnConfgi

2. Run node​

Terminal
cargo run -p merod -- --node-name node1 --home data run

Wait for a few moments and node logs should appear.

Node running

When you see something like this that means that node is now ready for use.

Was this page helpful?
Need some help? Check Support page