A new version of Mina Docs is coming soon! This page will be rewritten.
Seed peers are our helpful allies that make it easy for the rest of us to connect to the network.
Most nodes connect to the Mina network using seed peers that are run explicitly at seed nodes.
Running a Seed Node
The two important things about seed nodes:
- Their address should be static
- They need high uptime and be able to support many connections -- thus they should avoid doing as much as possible other than "seeding"
Enforcing and publishing a static address
First of all, you need a static host where you'll be running your node. Preferably, you can use DNS and host your seed node at, for example:
seed.o1test.net. Alternatively, you can also set up a static ipv4 address such as
Secondly, you'll need to select the port that your node is running on. By default, it's on
Thirdly, you'll want to pregenerate your libp2p keypair -- this is used to identify you on the gossip network. To do so:
mina advanced generate-libp2p-keypair
This will generate a libp2p keypair on your machine.
And run your daemon with the
Finally you'd publish your DNS address like so:
Or a static IP one in this manner:
This address string can be used for folks to connect to you.
Tuning your node for uptime and high connections
Firstly, don't run block production or SNARK working on this node. Full stop. By doing neither of these things, the surface area for logic executing on this node reduces drastically.
It would be preferable to run with a larger
--max-connection flag. At least 100. You'll still be able to seed with more than 100 nodes in total, it's just that you'll only be able to maintain connections with 100 at once.
Create a file called ~/.mina-env to store your private configuration, passwords, etc.
EXTRA_FLAGS=" --discovery-keypair <PATH_TO_LIBP2P_KEY> --seed --max-connection 100"
Please note that
<PATH_TO_LIBP2P_KEY> could change in value depending on where you stored your libp2p keypair from the previous steps. In docker, the keypath will always be
/keys/filename due to where volumes are mounted.
Then follow along as normal with systemctl to start the mina service.
If you're using Docker, then here is a similar example:
docker run --name mina-seed-node -d \
--restart always \
-p 8302:8302 \
-v "$(pwd)/keys:/root/keys:ro" \
-v "$(pwd)/.mina-config:/root/.mina-config" \
-v "$(pwd)/.mina-env:/entrypoint.d/mina-env:ro" \
Make sure to create ~/.mina-env as described above so that it can be mounted into the docker container.
There will be a peers list hosted with a handful of O(1) Labs nodes and another much larger handful of addresses from folks unaffiliated with O(1). This list is curated for nodes that should be great seed peers and will try their best to keep the list up-to-date as well.
Alternate Peer Lists
We have a decentralized network after all -- we encourage other members in the community to host seed lists. To create a list, please talk to those you trust and use their addresses as seed peers.
To consume such alternate lists, you can swap the parameter
--peer-list-url to point to another one.