Set Up Your Own Subnet
This is an advanced guide for creating a private, isolated network. This is useful for enterprise applications or private testing environments that require a controlled group of validators.
Create a custom Swarm Key
A custom subnet requires a unique network.key
to ensure only approved nodes can join.
-
Install the
ipfs-swarm-key-gen
Key Generation Tool.go install [github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen@latest](https://github.com/Kubuxu/go-ipfs-swarm-key-gen/ipfs-swarm-key-gen@latest)
-
Run the following command to create your unique network key.
ipfs-swarm-key-gen > ~/.ipfs/swarm.key
- Note: If you are not using the default IPFS path, replace
~/.ipfs/
with your custom path.
- Note: If you are not using the default IPFS path, replace
Configure and Run your Subnet
-
Once you have your custom
network.key
, you can start your subnet. -
Ensure all nodes that you want to be part of your subnet have a copy of the same
netwok.key
in their root directory.
Start Rubix node on custum subnet
Subnet with test tokens
-
Start your node with
-testNet
flag and netowrk.key in your build path../rubixgoplatform run -s -testNet -defaultSetup -p <node_name> -n <node_number> -grpcPort <grpc_port>
``
Subnet with Mainnet tokens
-
Start your node with your custom netowrk.key in your build path.
./rubixgoplatform run -s -defaultSetup -p <node_name> -n <node_number> -grpcPort <grpc_port>
``
Note: Do not use -testNet
flag in Mainnet