It depends on what you want to do. If you just want to run a relay node, the above applies and you don’t have to configure anything.
If you want your relay to talk to a block producer, the relay needs to have a reference to the block producer and the block producer to the relay. Like so …
# Setup the Relay topology
# The Relay connects to the world + Producer
# Valency is a boolean - 0 disables the address
BLOCK_PRODUCER_IP=xxx.xxx.xxx.xxx
mkdir -p ~/cardano/config
cat << EOF > ~/cardano/config/mainnet-relay-topology.json
{
"Producers": [
{
"addr": "relays-new.cardano-mainnet.iohk.io",
"port": 3001,
"valency": 1
},
{
"addr": "$BLOCK_PRODUCER_IP",
"port": 3001,
"valency": 1
}
]
}
EOF
# Setup the Producer topology
# The Producer connects to the Relay (only)
cat << EOF > ~/cardano/config/mainnet-prod-topology.json
{
"Producers": [
{
"addr": "relay01.yourdomain.net",
"port": 3001,
"valency": 1
}
]
}
EOF
These files then need to be referenced in your docker run
command. I prefer to put them in dedicated volumes. Like so …
docker volume rm -f cardano-relay-config
docker run --name=tmp -v cardano-relay-config:/var/cardano/config centos
docker cp ~/cardano/config/mainnet-relay-topology.json tmp:/var/cardano/config/mainnet-topology.json
docker rm -f tmp
and then …
docker run --detach \
--name=relay \
--restart=always \
--hostname="relay" \
-p 3001:3001 \
-e CARDANO_UPDATE_TOPOLOGY=true \
-e CARDANO_PUBLIC_IP="relay01.yourdomain.net" \
-e CARDANO_TOPOLOGY="/var/cardano/config/mainnet-topology.json" \
-v cardano-relay-config:/var/cardano/config \
-v /mnt/disks/data00:/opt/cardano/data \
nessusio/cardano run
or similar.