diff --git a/docs/nodes/full-consensus-node.mdx b/docs/nodes/full-consensus-node.mdx index 3eb21af6735..4a0f20c3f2b 100644 --- a/docs/nodes/full-consensus-node.mdx +++ b/docs/nodes/full-consensus-node.mdx @@ -239,21 +239,44 @@ Please refer to the [ports](../../nodes/celestia-node/#ports) section for inform which ports are required to be open on your machine. ::: -### Optional: configure for RPC endpoint +### Optional: Configuring an RPC endpoint -You can configure your full consensus node to be a public RPC endpoint -and listen to any connections from Data Availability Nodes in order to -serve requests for the Data Availability API [here](../developers/node-tutorial.mdx). +You can configure your Consensus Full Node to be a public RPC endpoint. +This allows it to accept connections from Data Availability Nodes and +serve requests for the Data Availability API. -Run the following commands: +#### Expose RPC + +By default, the RPC service listens on `localhost` which means it can't +be accessed from other machines. To make the RPC service available publicly, +you need to bind it to a public IP or `0.0.0.0` (which means listening on all +available network interfaces). + +You can do this by editing the config.toml file: ```sh -EXTERNAL_ADDRESS=$(wget -qO- eth0.me) -sed -i.bak -e "s/^external_address = \"\"/external_address = \"$EXTERNAL_ADDRESS:26656\"/" $HOME/.celestia-app/config/config.toml sed -i 's#"tcp://127.0.0.1:26657"#"tcp://0.0.0.0:26657"#g' ~/.celestia-app/config/config.toml ``` -Restart `celestia-appd` in the previous step to load those configs. +This command replaces the `localhost` IP address with `0.0.0.0`, making the +RPC service listen on all available network interfaces. + +#### Note on `external-address` + +The `external-address` field in the configuration is used when your node +is behind a NAT and you need to advertise a different address for peers +to dial. Populating this field is not necessary for making the RPC +endpoint public. + +```sh +EXTERNAL-ADDRESS=$(wget -qO- eth0.me) +sed -i.bak -e "s/^external-address = ""/external-address = "$EXTERNAL-ADDRESS:26656"/" $HOME/.celestia-app/config/config.toml +``` + +#### Restart the node + +After making these changes, restart `celestia-appd` to load the new +configurations. ## Transaction indexer configuration options