Using RPC with User and Password

To enable user and password protection for the Gateway’s RPC, start the Gateway with the --rpc-user and --rpc-password arguments set to the values you want. Those values are stored during the Gateway startup in its configuration file.

Once you configure the Gateway to allow access to RPC using a username and password, you must use the bloxroute-cli using the --rpc-user and --rpc-password arguments.

<<< bloxroute-cli --rpc-user my_user --rpc-password my_password
>>> peers
"id": null,
"addr": "XXX.XXX.XXX.XXX 30303",
"direction": "OUTBOUND",
"state": "INITIALIZED"