Added content on setting RPC host to 0.0.0.0 (#665)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
MadelineMurray 6 years ago committed by GitHub
parent ace391be11
commit 08d36864fa
  1. 4
      docs/Reference/Pantheon-CLI-Syntax.md
  2. 28
      docs/Reference/Using-JSON-RPC-API.md

@ -528,6 +528,8 @@ rpc-http-host="0.0.0.0"
Specifies the host on which HTTP JSON-RPC listens.
The default is 127.0.0.1.
To allow remote connections, set to `0.0.0.0`
!!!note
This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#exposing-ports).
@ -675,6 +677,8 @@ ws-host="0.0.0.0"
Host for Websocket WS-RPC to listen on.
The default is 127.0.0.1.
To allow remote connections, set to `0.0.0.0`
!!!note
This option is not used when running Pantheon from the [Docker image](../Getting-Started/Run-Docker-Image.md#exposing-ports).

@ -27,19 +27,29 @@ Use the button to import our collection of examples to [Postman](https://www.get
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/cffe1bc034b3ab139fa7)
### Endpoint Address and Port
### Endpoint Host and Port
In this reference, the placeholder
`<JSON-RPC-http-endpoint:port>` and `<JSON-RPC-ws-endpoint:port>` means an endpoint (IP address and port)
of the JSON-RPC service of a Pantheon node respectively for http endpoint and for WebSocket endpoint.
The placeholder
`<JSON-RPC-http-endpoint:port>` and `<JSON-RPC-ws-endpoint:port>` represents an endpoint (IP address and port)
of the JSON-RPC service of a Pantheon node for HTTP and WebSocket requests.
To activate JSON-RPC using http or WebSocket, see [`--rpc-http-enabled`](../Reference/Pantheon-CLI-Syntax.md#rpc-http-enabled)
and [`--rpc-ws-listen`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-listen) options in the CLI documentation.
To enable JSON-RPC over HTTP or WebSockets, use the [`--rpc-http-enabled`](../Reference/Pantheon-CLI-Syntax.md#rpc-http-enabled)
and [`--rpc-ws-enabled`](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-enabled) options.
The transport attributes are:
Use the [--rpc-http-host](../Reference/Pantheon-CLI-Syntax.md#rpc-http-host) and [--rpc-ws-host](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-host)
options to specify the host on which the JSON-RPC listens. The default host is 127.0.0.1 for HTTP and WebSockets.
* HTTP: Listens by default on port 8545
* WebSockets: Listens by default on port 8546
Set the host to `0.0.0.0` to allow remote connections.
!!! caution
Setting the host to 0.0.0.0 exposes the RPC connection on your node to any remote connection. In a
production environment, ensure you are using a firewall to avoid exposing your node to the internet.
Use the [--rpc-http-port](../Reference/Pantheon-CLI-Syntax.md#rpc-http-port) and [--rpc-ws-port](../Reference/Pantheon-CLI-Syntax.md#rpc-ws-port)
options to specify the port on which the JSON-RPC listens. The default ports are:
* 8545 for HTTP
* 8546 for WebSockets
### HTTP and WebSocket Requests

Loading…
Cancel
Save