I want to use RPCs to access a Geth node.
Do I have to execute admin.StartRPC on the node in order to activate the RPC server?
Asked
Active
Viewed 7,000 times
2 Answers
1
Instead of admin.startRPC(addr, port), when you start your node (if you are using geth) you can use the rpc flag
geth --rpc - this defaults to localhost:8545
You can also define your own address and port number with these options:
geth --rpc --rpcaddr <ip> --rpcport <portnumber>
geth --rpc --rpccorsdomain "http://localhost:3000"
Steven V
- 1,461
- 10
- 15
0
I use something like this: geth --rpcapi eth,net,web3 --rpccorsdomain * --rpc --rpcaddr 0.0.0.0
j4ys0n
- 193
- 6