Skip to content
This new developer portal is under construction. For complete documentation, please refer to the old developer portal.

Configure a Node as a Relay

A benefit of Algorand’s decentralized network implementation is that a relay is effectively the same as any other node. The distinction currently is made by configuring a node to actively listen for connections from other nodes and having itself advertised using SRV records available through DNS.

It is possible to set up a relay for a personal network that does not require DNS entries. This is done using the following steps.

Install a Node

See this page for node hardware requirements. Follow the install instructions for the specific operating system that the relay will run on.

Edit the Configuration File

Edit the configuration file for the node as described in the configuration guide. Set the property NetAddress to ":4161" for TestNet or to ":4160" for MainNet. Then the file. Make sure the file is named config.json.

Concretely, your config.json file should look like the following for TestNet:

1
{
2
"NetAddress": ":4161"
3
}

Start the Relay Node

Start the node as described in the install guide. The node will now listen for incoming traffic on port 4161 for TestNet or on port 4160 for MainNet. Other nodes can now connect to this relay.

Connect a Node to the Relay

Any node can connect to this relay by specifying it in the goal node start command. Use 4161 for TestNet or 4160 for MainNet.

1
goal node start -p "ipaddress:4161"

The node can also be set up to connect to multiple relays using a ; separated list of relays.

1
goal node start -p "ipaddress-1:4161;ipaddress-2:4161"