Why do some ethereum related websites (for example regis.nu, there are many others) tell me they cannot find a node running at http://localhost:8545 and what can I do about that?
Regis.nu allowed me to create a "light-wallet" and then I had to put some ether in there, but I didn't really want to do that. I wanted to use my own wallet. I tried starting 'geth' but now I'm going into deep water and I can't swim.
So question: How can I start a node at http://localhost:8545?
Best Answer
http://localhost:8545
is the RPC port of your locally running Ethereum node software.When running
geth
, the Go implementation of the Ethereum node software, the command line parameters to create and configure this RPC service follows:The defaults for
--rpcaddr
,--rpcport
and--rpcapi
will allow the regis.nu webpage to connect to your localgeth
node. You will however need to configure the--rpccorsdomain
to allow your web browser to get access to your local Ethereum node.To start a node on your local machine providing the regis.nu webpage with access to your node, try:
Note: Setting
--rpccorsdomain
to"http://regis.nu"
will work with the regis.nu webpage. If you are having trouble connecting, start testing with"*"
to check whether the webpage can connect to your node, then find the correct setting to minimise your security risk - see Cross-origin resource sharing for more information. And note that using"*"
could be risky.Looking into the JavaScript code in regis.nu/main.js linked from regis.nu, you will see:
The page will firstly try connecting to your RPC port locally, then try the RPC port available at IP address 104.41.138.167 .
I loaded
http://regis.nu
in my web browser, then clicked on the Start button, but the website could not connect to the RPC port of my locally runninggeth
. I had to temporarily allowhttp://localhost
in my NoScript addon within my browser before the regis.nu web page was allowed to connect to my localgeth
node and list my accounts.Useful reference: