Skip to main content

Set up boot node

Boot nodes serve as initial connection points for nodes joining the Midnight Network. They help new nodes discover and connect to active peers in the network. While running a boot node is optional, doing so strengthens network decentralization and improves peer discovery.

This guide provides step-by-step instructions for setting up a boot node for Midnight.

Prerequisites

Before setting up your Midnight boot node, ensure you have the following:

Set up a boot node

Use the following command to run Midnight node in boot node mode. Choose the configuration for your target network.

midnight-node \
--chain /home/midnight/res/preview/chain-spec-raw.json \
--base-path /home/midnight/data \
--listen-addr /ip4/0.0.0.0/tcp/30333 \
--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--no-private-ip

Known network boot nodes

Use the boot nodes corresponding to your target network environment.

--bootnodes /dns/bootnode-1.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWK66i7dtGVNSwDh9tTeqov1q6LSdWsRLJvTyzTCaywYgK \
--bootnodes /dns/bootnode-2.preview.midnight.network/tcp/30333/ws/p2p/12D3KooWHqFfXFwb7WW4jwR8pr4BEf562v5M6c8K3CXAJq4Wx6ym

Next steps

With the boot node set up, run the RPC node to interact with the Midnight blockchain.